Loading src/Benchmarks/LinearSolvers/tnl-benchmark-linear-solvers.h +5 −21 Original line number Diff line number Diff line Loading @@ -122,14 +122,6 @@ parse_comma_list( const Config::ParameterContainer& parameters, return set; } // TODO: implement this in TNL::String bool ends_with( const std::string& value, const std::string& ending ) { if (ending.size() > value.size()) return false; return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); } // initialize all vector entries with a unioformly distributed random value from the interval [a, b] template< typename Vector > void set_random_vector( Vector& v, typename Vector::RealType a, typename Vector::RealType b ) Loading Loading @@ -161,9 +153,7 @@ void set_random_vector( Vector& v, typename Vector::RealType a, typename Vector: template< typename Matrix, typename Vector > void benchmarkIterativeSolvers( Benchmark& benchmark, // FIXME: ParameterContainer should be copyable, but that leads to double-free // Config::ParameterContainer parameters, Config::ParameterContainer& parameters, Config::ParameterContainer parameters, const SharedPointer< Matrix >& matrixPointer, const Vector& x0, const Vector& b ) Loading Loading @@ -356,9 +346,7 @@ struct LinearSolversBenchmark static bool run( Benchmark& benchmark, Benchmark::MetadataMap metadata, // FIXME: ParameterContainer should be copyable, but that leads to double-free // const Config::ParameterContainer& parameters ) Config::ParameterContainer& parameters ) const Config::ParameterContainer& parameters ) { const String file_matrix = parameters.getParameter< String >( "input-matrix" ); const String file_dof = parameters.getParameter< String >( "input-dof" ); Loading @@ -368,7 +356,7 @@ struct LinearSolversBenchmark VectorType x0, b; // load the matrix if( ends_with( file_matrix, ".mtx" ) ) { if( file_matrix.endsWith( ".mtx" ) ) { Matrices::MatrixReader< MatrixType > reader; reader.readMtxFile( file_matrix, *matrixPointer ); } Loading Loading @@ -443,9 +431,7 @@ struct LinearSolversBenchmark static void runDistributed( Benchmark& benchmark, Benchmark::MetadataMap metadata, // FIXME: ParameterContainer should be copyable, but that leads to double-free // const Config::ParameterContainer& parameters, Config::ParameterContainer& parameters, const Config::ParameterContainer& parameters, const SharedPointer< MatrixType >& matrixPointer, const VectorType& x0, const VectorType& b ) Loading Loading @@ -489,9 +475,7 @@ struct LinearSolversBenchmark static void runNonDistributed( Benchmark& benchmark, Benchmark::MetadataMap metadata, // FIXME: ParameterContainer should be copyable, but that leads to double-free // const Config::ParameterContainer& parameters, Config::ParameterContainer& parameters, const Config::ParameterContainer& parameters, const SharedPointer< MatrixType >& matrixPointer, const VectorType& x0, const VectorType& b ) Loading src/Benchmarks/SpMV/ReferenceFormats/Legacy/BiEllpack.h +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ public: void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths ); void setRowCapacities( ConstCompressedRowLengthsVectorView rowLengths ); void getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const; IndexType getRowLength( const IndexType row ) const; Loading src/Benchmarks/SpMV/ReferenceFormats/Legacy/BiEllpack_impl.h +10 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,16 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView constRowLengths ) return this->allocateMatrixElements( this->warpSize * this->groupPointers.getElement( strips * ( this->logWarpSize + 1 ) ) ); } template< typename Real, typename Device, typename Index > void BiEllpack< Real, Device, Index >:: setRowCapacities( ConstCompressedRowLengthsVectorView constRowLengths ) { setCompressedRowLengths( constRowLengths ); } template< typename Real, typename Device, typename Index > Loading src/Benchmarks/SpMV/ReferenceFormats/Legacy/ChunkedEllpack.h +2 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ public: void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths ); void setRowCapacities( ConstCompressedRowLengthsVectorView rowLengths ); IndexType getRowLength( const IndexType row ) const; __cuda_callable__ Loading src/Benchmarks/SpMV/ReferenceFormats/Legacy/ChunkedEllpack_impl.h +8 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,14 @@ void ChunkedEllpack< Real, Device, Index >::setCompressedRowLengths( ConstCompre Sparse< Real, Device, Index >::allocateMatrixElements( elementsToAllocation ); } template< typename Real, typename Device, typename Index > void ChunkedEllpack< Real, Device, Index >::setRowCapacities( ConstCompressedRowLengthsVectorView rowLengths ) { setCompressedRowLengths( rowLengths ); } template< typename Real, typename Device, typename Index > Loading Loading
src/Benchmarks/LinearSolvers/tnl-benchmark-linear-solvers.h +5 −21 Original line number Diff line number Diff line Loading @@ -122,14 +122,6 @@ parse_comma_list( const Config::ParameterContainer& parameters, return set; } // TODO: implement this in TNL::String bool ends_with( const std::string& value, const std::string& ending ) { if (ending.size() > value.size()) return false; return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); } // initialize all vector entries with a unioformly distributed random value from the interval [a, b] template< typename Vector > void set_random_vector( Vector& v, typename Vector::RealType a, typename Vector::RealType b ) Loading Loading @@ -161,9 +153,7 @@ void set_random_vector( Vector& v, typename Vector::RealType a, typename Vector: template< typename Matrix, typename Vector > void benchmarkIterativeSolvers( Benchmark& benchmark, // FIXME: ParameterContainer should be copyable, but that leads to double-free // Config::ParameterContainer parameters, Config::ParameterContainer& parameters, Config::ParameterContainer parameters, const SharedPointer< Matrix >& matrixPointer, const Vector& x0, const Vector& b ) Loading Loading @@ -356,9 +346,7 @@ struct LinearSolversBenchmark static bool run( Benchmark& benchmark, Benchmark::MetadataMap metadata, // FIXME: ParameterContainer should be copyable, but that leads to double-free // const Config::ParameterContainer& parameters ) Config::ParameterContainer& parameters ) const Config::ParameterContainer& parameters ) { const String file_matrix = parameters.getParameter< String >( "input-matrix" ); const String file_dof = parameters.getParameter< String >( "input-dof" ); Loading @@ -368,7 +356,7 @@ struct LinearSolversBenchmark VectorType x0, b; // load the matrix if( ends_with( file_matrix, ".mtx" ) ) { if( file_matrix.endsWith( ".mtx" ) ) { Matrices::MatrixReader< MatrixType > reader; reader.readMtxFile( file_matrix, *matrixPointer ); } Loading Loading @@ -443,9 +431,7 @@ struct LinearSolversBenchmark static void runDistributed( Benchmark& benchmark, Benchmark::MetadataMap metadata, // FIXME: ParameterContainer should be copyable, but that leads to double-free // const Config::ParameterContainer& parameters, Config::ParameterContainer& parameters, const Config::ParameterContainer& parameters, const SharedPointer< MatrixType >& matrixPointer, const VectorType& x0, const VectorType& b ) Loading Loading @@ -489,9 +475,7 @@ struct LinearSolversBenchmark static void runNonDistributed( Benchmark& benchmark, Benchmark::MetadataMap metadata, // FIXME: ParameterContainer should be copyable, but that leads to double-free // const Config::ParameterContainer& parameters, Config::ParameterContainer& parameters, const Config::ParameterContainer& parameters, const SharedPointer< MatrixType >& matrixPointer, const VectorType& x0, const VectorType& b ) Loading
src/Benchmarks/SpMV/ReferenceFormats/Legacy/BiEllpack.h +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ public: void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths ); void setRowCapacities( ConstCompressedRowLengthsVectorView rowLengths ); void getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const; IndexType getRowLength( const IndexType row ) const; Loading
src/Benchmarks/SpMV/ReferenceFormats/Legacy/BiEllpack_impl.h +10 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,16 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView constRowLengths ) return this->allocateMatrixElements( this->warpSize * this->groupPointers.getElement( strips * ( this->logWarpSize + 1 ) ) ); } template< typename Real, typename Device, typename Index > void BiEllpack< Real, Device, Index >:: setRowCapacities( ConstCompressedRowLengthsVectorView constRowLengths ) { setCompressedRowLengths( constRowLengths ); } template< typename Real, typename Device, typename Index > Loading
src/Benchmarks/SpMV/ReferenceFormats/Legacy/ChunkedEllpack.h +2 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ public: void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths ); void setRowCapacities( ConstCompressedRowLengthsVectorView rowLengths ); IndexType getRowLength( const IndexType row ) const; __cuda_callable__ Loading
src/Benchmarks/SpMV/ReferenceFormats/Legacy/ChunkedEllpack_impl.h +8 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,14 @@ void ChunkedEllpack< Real, Device, Index >::setCompressedRowLengths( ConstCompre Sparse< Real, Device, Index >::allocateMatrixElements( elementsToAllocation ); } template< typename Real, typename Device, typename Index > void ChunkedEllpack< Real, Device, Index >::setRowCapacities( ConstCompressedRowLengthsVectorView rowLengths ) { setCompressedRowLengths( rowLengths ); } template< typename Real, typename Device, typename Index > Loading