/* -*- mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s /* * Copyright (C) FFLAS-FFPACK * 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======== *. */ //-------------------------------------------------------------------------- // Test for fgesv : 1 computation // //-------------------------------------------------------------------------- // Clement Pernet //------------------------------------------------------------------------- //#define __FFLASFFPACK_DEBUG 1 #define TIME 1 #include #include using namespace std; #include "fflas-ffpack/field/modular-balanced.h" #include "fflas-ffpack/utils/timer.h" #include "fflas-ffpack/utils/fflas_io.h" #include "fflas-ffpack/ffpack/ffpack.h" using namespace FFPACK; typedef Givaro::Modular Field; int main(int argc, char** argv){ int n,m,mb,nb; cerr< " <(n*nb); ldx = nb; } else { X = FFLAS::fflas_new(mb*m); ldx = m; } } if ( ((side == FFLAS::FflasRight) && (n != nb)) || ((side == FFLAS::FflasLeft)&&(m != mb)) ) { cerr<<"Error in the dimensions of the input matrices"< 0){ std::cerr<<"System inconsistent"<(mb*nb); if (m==n) if (side == FFLAS::FflasLeft) FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, m, nb, n, one, A, n, B, nb, zero, B2, nb); else FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, mb, n, m, one, B, nb, A, n, zero, B2, nb); else if (side == FFLAS::FflasLeft) FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, m, nb, n, one, A, n, X, ldx, zero, B2, nb); else FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, mb, n, m, one, X, ldx, A, n, zero, B2, nb); FFLAS::fflas_delete( B); FFLAS::fflas_delete( X); FFLAS::ReadMatrix (argv[3],F,mb,nb,B); bool wrong = false; for (int i=0;i