/* Copyright (c) FFLAS-FFPACK * Written by Clement Pernet * ========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 __FFLASFFPACK_OPENBLAS_NT_ALREADY_SET 1 #include "fflas-ffpack/fflas-ffpack-config.h" #include #include #include #include "fflas-ffpack/fflas-ffpack.h" #include "fflas-ffpack/utils/timer.h" #include "fflas-ffpack/utils/test-utils.h" #include "fflas-ffpack/utils/fflas_randommatrix.h" #include "fflas-ffpack/utils/fflas_io.h" #include "fflas-ffpack/utils/args-parser.h" using namespace std; using namespace FFLAS; using namespace FFPACK; template void run_with_field(int q, size_t n, size_t m, size_t t, size_t r, size_t iter, uint64_t seed){ Field F(q); typedef typename Field::Element_ptr Element_ptr; FFLAS::Timer chrono; Element_ptr A, TS; double time_gen = 0, time_cbxts =0; for (size_t i=0;i (n); size_t * Q = fflas_new (n); Element_ptr L = fflas_new(F,n,n); // Element_ptr R = fflas_new(F,n,n); Element_ptr U = fflas_new(F,n,n); Element_ptr Xu = fflas_new(F, 2*t, n); size_t * Ku = fflas_new (r+1); size_t * Mu = fflas_new (n); size_t * Tu = fflas_new(r); Element_ptr Xl = fflas_new(F, n, 2*t); size_t * Kl = fflas_new (r+1); size_t * Ml = fflas_new (n); size_t * Tl = fflas_new(r); size_t r2; chrono.clear(); chrono.start(); r2 = LTBruhatGen (F, FflasNonUnit, n, A, lda, P, Q); // getLTBruhatGen(F, n, r, P, Q, R, n); getLTBruhatGen(F, FflasLower, FflasUnit, n, r, P, Q, A, lda, L,n); size_t NbBlocksL = CompressToBlockBiDiagonal(F, FflasLower, n, t, r, P, Q, L,n ,Xl,2*t,Kl,Ml,Tl); getLTBruhatGen(F, FflasUpper, FflasNonUnit, n, r, P, Q, A, lda, U, n); size_t NbBlocksU = CompressToBlockBiDiagonal(F, FflasUpper, n, t, r, P, Q, U,n ,Xu,n,Ku,Mu,Tu); chrono.stop(); if (r2!=r){ std::cerr<<"ERROR: r != r2"< >(q, n, m, t, r, iter, seed); 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