Commit 69f34f8e authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Added namespace Legacy into TNL::Matrices.

parent 9bb9c802
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ namespace Benchmarks {

// silly alias to match the number of template parameters with other formats
template< typename Real, typename Device, typename Index >
using SlicedEllpack = Matrices::SlicedEllpack< Real, Device, Index >;
using SlicedEllpack = Matrices::Legacy::SlicedEllpack< Real, Device, Index >;

template< typename Matrix >
int setHostTestMatrix( Matrix& matrix,
@@ -173,10 +173,10 @@ benchmarkSpmvSynthetic( Benchmark & benchmark,
                        const int & elementsPerRow )
{
   // TODO: benchmark all formats from tnl-benchmark-spmv (different parameters of the base formats)
   benchmarkSpMV< Real, Matrices::CSR >( benchmark, size, elementsPerRow );
   benchmarkSpMV< Real, Matrices::Ellpack >( benchmark, size, elementsPerRow );
   benchmarkSpMV< Real, Matrices::Legacy::CSR >( benchmark, size, elementsPerRow );
   benchmarkSpMV< Real, Matrices::Legacy::Ellpack >( benchmark, size, elementsPerRow );
   benchmarkSpMV< Real, SlicedEllpack >( benchmark, size, elementsPerRow );
   benchmarkSpMV< Real, Matrices::ChunkedEllpack >( benchmark, size, elementsPerRow );
   benchmarkSpMV< Real, Matrices::Legacy::ChunkedEllpack >( benchmark, size, elementsPerRow );
}

} // namespace Benchmarks
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ main( int argc, char* argv[] )
//   return ! Matrices::resolveMatrixType< MainConfig,
//                                         Devices::Host,
//                                         SpmvBenchmark >( benchmark, metadata, parameters );
   using MatrixType = Matrices::SlicedEllpack< double, Devices::Host, int >;
   using MatrixType = Matrices::Legacy::SlicedEllpack< double, Devices::Host, int >;
   const bool status = SpmvBenchmark< MatrixType >::run( benchmark, metadata, parameters );

   if( rank == 0 )
+3 −3
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ struct LinearSolversBenchmark
   {
      // direct solvers
      if( parameters.getParameter< bool >( "with-direct" ) ) {
         using CSR = Matrices::CSR< RealType, DeviceType, IndexType >;
         using CSR = Matrices::Legacy::CSR< RealType, DeviceType, IndexType >;
         SharedPointer< CSR > matrixCopy;
         Matrices::copySparseMatrix( *matrixCopy, *matrixPointer );

@@ -567,7 +567,7 @@ configSetup( Config::ConfigDescription& config )

   config.addDelimiter( "Linear solver settings:" );
   Solvers::IterativeSolver< double, int >::configSetup( config );
   using Matrix = Matrices::SlicedEllpack< double, Devices::Host, int >;
   using Matrix = Matrices::Legacy::SlicedEllpack< double, Devices::Host, int >;
   using GMRES = Solvers::Linear::GMRES< Matrix >;
   GMRES::configSetup( config );
   using BiCGstabL = Solvers::Linear::BICGStabL< Matrix >;
@@ -621,7 +621,7 @@ main( int argc, char* argv[] )
//   return ! Matrices::resolveMatrixType< MainConfig,
//                                         Devices::Host,
//                                         LinearSolversBenchmark >( benchmark, metadata, parameters );
   using MatrixType = Matrices::SlicedEllpack< double, Devices::Host, int >;
   using MatrixType = Matrices::Legacy::SlicedEllpack< double, Devices::Host, int >;
   const bool status = LinearSolversBenchmark< MatrixType >::run( benchmark, metadata, parameters );

   if( rank == 0 )
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class CusparseCSRBase
   public:
      typedef Real RealType;
      typedef Devices::Cuda DeviceType;
      typedef Matrices::CSR< RealType, Devices::Cuda, int > MatrixType;
      typedef Matrices::Legacy::CSR< RealType, Devices::Cuda, int > MatrixType;

      CusparseCSRBase()
      : matrix( 0 )
+7 −7
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ namespace Benchmarks {

// Alias to match the number of template parameters with other formats
template< typename Real, typename Device, typename Index >
using SlicedEllpackAlias = Matrices::SlicedEllpack< Real, Device, Index >;
using SlicedEllpackAlias = Matrices::Legacy::SlicedEllpack< Real, Device, Index >;

// Segments based sparse matrix aliases
template< typename Real, typename Device, typename Index >
@@ -114,8 +114,8 @@ benchmarkSpMV( Benchmark& benchmark,
               bool verboseMR )
{
    // Setup CSR for cuSPARSE. It will compared to the format given as a template parameter to this function
    typedef Matrices::CSR< Real, Devices::Host, int > CSR_HostMatrix;
    typedef Matrices::CSR< Real, Devices::Cuda, int > CSR_DeviceMatrix;
    typedef Matrices::Legacy::CSR< Real, Devices::Host, int > CSR_HostMatrix;
    typedef Matrices::Legacy::CSR< Real, Devices::Cuda, int > CSR_DeviceMatrix;

    CSR_HostMatrix CSRhostMatrix;
    CSR_DeviceMatrix CSRdeviceMatrix;
@@ -287,16 +287,16 @@ benchmarkSpmvSynthetic( Benchmark& benchmark,
                        const String& inputFileName,
                        bool verboseMR )
{
   benchmarkSpMV< Real, Matrices::CSR >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, Matrices::Legacy::CSR >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, SparseMatrix_CSR >( benchmark, inputFileName, verboseMR );
   
   benchmarkSpMV< Real, Matrices::Ellpack >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, Matrices::Legacy::Ellpack >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, SparseMatrix_Ellpack >( benchmark, inputFileName, verboseMR );
   
   benchmarkSpMV< Real, SlicedEllpackAlias >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, SparseMatrix_SlicedEllpack >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, Matrices::ChunkedEllpack >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, Matrices::BiEllpack >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, Matrices::Legacy::ChunkedEllpack >( benchmark, inputFileName, verboseMR );
   benchmarkSpMV< Real, Matrices::Legacy::BiEllpack >( benchmark, inputFileName, verboseMR );

   ////
   // Segments based sparse matrices
Loading