/* * Copyright (C) the FFLAS-FFPACK group * Written by Clément Pernet * This file is Free Software and part of FFLAS-FFPACK. * * ========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======== *. */ #define ENABLE_ALL_CHECKINGS 1 #define __FFLASFFPACK_SEQUENTIAL #include "fflas-ffpack/fflas-ffpack-config.h" #include #include #include #include #include "fflas-ffpack/ffpack/ffpack.h" #include "fflas-ffpack/utils/args-parser.h" #include "fflas-ffpack/utils/test-utils.h" #include #include using namespace std; using namespace FFLAS; using namespace FFPACK; using Givaro::Modular; using Givaro::ModularBalanced; template bool run_with_field (Givaro::Integer q, size_t b, size_t n, size_t iters, uint64_t seed){ bool ok = true ; int nbit=(int)iters; while (ok && nbit){ Field* F= chooseField(q,b,seed); if (F==nullptr) return true; cout<<"Checking with ";F->write(cout)<one, A, lda, X, ldx, F->mOne, Y, n); if (! fiszero(*F,n,n,Y,n)){ //FFLAS::WriteMatrix (std::cerr<<"Y = "< >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,b,n,iters,seed); ok = ok && run_with_field >(q,(b?b:512),n/4+1,iters,seed); } while (loop && ok); return !ok ; } /* -*- 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