/* Copyright (c) 2012 FFLAS-FFPACK * Written by J.G. Dumas * ========LICENCE======== * This file is part of the library FFLAS-FFPACK. * * FFLAS-FFPACK is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ //#include "goto-def.h" #include "fflas-ffpack/fflas-ffpack-config.h" #include #include #include #include "fflas-ffpack/fflas/fflas.h" #include "fflas-ffpack/utils/timer.h" #include "fflas-ffpack/utils/args-parser.h" #define CUBE(x) ((x)*(x)*(x)) template void launch_wino(const Field &F, const size_t &n, const size_t &NB, const size_t &wino, const bool &asmax, const size_t &seed, const bool compare) { typedef typename Field::Element Element ; typename Field::RandIter G(F); if (compare) F.write(std::cout << "Field ") << std::endl; double basetime(0.0), time(0.0); Element *A, *C; A = FFLAS::fflas_new(n*n); C = FFLAS::fflas_new(n*n); for (size_t i=0; i WH (F,(int)w); time = 0. ; chrono.clear(); for(size_t i=0; i F1(q); Givaro::Modular F2(q); Givaro::Modular F3(q); Givaro::ModularBalanced F4(q); Givaro::ModularBalanced F5(q); Givaro::ModularBalanced F6(q); // ZZ F7; // ZZ F8; // ZZ F9; launch_wino(F1,n,iter,w,levelasmax,seed,true); launch_wino(F2,n,iter,w,levelasmax,seed,true); launch_wino(F3,n,iter,w,levelasmax,seed,true); launch_wino(F4,n,iter,w,levelasmax,seed,true); launch_wino(F5,n,iter,w,levelasmax,seed,true); launch_wino(F6,n,iter,w,levelasmax,seed,true); // launch_wino(F7,n,iter,winomax,seed); // launch_wino(F8,n,iter,winomax,seed); // launch_wino(F9,n,iter,winomax,seed); } else { if (balanced) { if (type == "double") launch_wino(Givaro::ModularBalanced(q),n,iter,w,levelasmax,seed,false); else if (type == "float") launch_wino(Givaro::ModularBalanced(q),n,iter,w,levelasmax,seed,false); else if (type == "int") launch_wino(Givaro::ModularBalanced(q),n,iter,w,levelasmax,seed,false); } else { if (type == "double") launch_wino(Givaro::Modular(q),n,iter,w,levelasmax,seed,false); else if (type == "float") launch_wino(Givaro::Modular(q),n,iter,w,levelasmax,seed,false); else if (type == "int") launch_wino(Givaro::Modular(q),n,iter,w,levelasmax,seed,false); } } if (compare || levelasmax) std::cout << "Lauch with:"; FFLAS::writeCommandString(std::cout, as) << std::endl; return 0; } /* -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s