Loading src/implementation/matrices/tnlEllpackMatrix_impl.h +10 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,16 @@ bool tnlEllpackMatrix< Real, Device, Index >::operator != ( const tnlEllpackMatr return ! ( ( *this ) == matrix ); } /*template< typename Real, typename Device, typename Index > template< typename Matrix > bool tnlEllpackMatrix< Real, Device, Index >::copyFrom( const Matrix& matrix, const RowLengthsVector& rowLengths ) { return tnlMatrix< RealType, DeviceType, IndexType >::copyFrom( matrix, rowLengths ); }*/ template< typename Real, typename Device, typename Index > Loading src/matrices/tnlEllpackMatrix.h +4 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,10 @@ class tnlEllpackMatrix : public tnlSparseMatrix< Real, Device, Index > template< typename Real2, typename Device2, typename Index2 > bool operator != ( const tnlEllpackMatrix< Real2, Device2, Index2 >& matrix ) const; /*template< typename Matrix > bool copyFrom( const Matrix& matrix, const RowLengthsVector& rowLengths );*/ #ifdef HAVE_CUDA __device__ __host__ #endif Loading tests/benchmarks/share/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ INSTALL( FILES matrix-market run-tnl-benchmark-spmv cuda-profiler.conf process-cuda-profile.pl tnl-log-to-html.py DESTINATION share/tnl-${tnlVersion}/benchmark-scripts ) INSTALL( FILES tnl-run-spmv-benchmark Loading tests/benchmarks/tnl-benchmark-spmv.h +13 −3 Original line number Diff line number Diff line Loading @@ -206,9 +206,12 @@ bool setupBenchmark( const tnlParameterContainer& parameters ) #ifdef HAVE_CUDA typedef tnlVector< Real, tnlCuda, int > CudaVector; CudaVector cudaX, cudaB; tnlVector< int, tnlCuda, int > rowLengthsCuda; cudaX.setSize( csrMatrix.getColumns() ); cudaX.setValue( 1.0 ); cudaB.setSize( csrMatrix.getRows() ); rowLengthsCuda.setSize( csrMatrix.getRows() ); rowLengthsCuda = rowLengthsHost; #endif benchmarkHostMatrix( csrMatrix, hostX, Loading @@ -232,8 +235,15 @@ bool setupBenchmark( const tnlParameterContainer& parameters ) verbose, logFile ); #ifdef HAVE_CUDA /*typedef tnlEllpackMatrix< Real, tnlCuda, int > EllpackMatrixCudaType; EllpackMatrixCudaType cudaEllpackMatrix( ellpackMatrix); typedef tnlEllpackMatrix< Real, tnlCuda, int > EllpackMatrixCudaType; EllpackMatrixCudaType cudaEllpackMatrix; cout << "Copying matrix to GPU... "; if( ! cudaEllpackMatrix.copyFrom( ellpackMatrix, rowLengthsCuda ) ) { cerr << "I am not able to transfer the matrix on GPU." << endl; return false; } cout << " done." << endl; benchmarkHostMatrix( cudaEllpackMatrix, cudaX, cudaB, Loading @@ -242,7 +252,7 @@ bool setupBenchmark( const tnlParameterContainer& parameters ) stopTime, verbose, logFile ); cudaEllpackMatrix.reset();*/ cudaEllpackMatrix.reset(); #endif ellpackMatrix.reset(); Loading Loading
src/implementation/matrices/tnlEllpackMatrix_impl.h +10 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,16 @@ bool tnlEllpackMatrix< Real, Device, Index >::operator != ( const tnlEllpackMatr return ! ( ( *this ) == matrix ); } /*template< typename Real, typename Device, typename Index > template< typename Matrix > bool tnlEllpackMatrix< Real, Device, Index >::copyFrom( const Matrix& matrix, const RowLengthsVector& rowLengths ) { return tnlMatrix< RealType, DeviceType, IndexType >::copyFrom( matrix, rowLengths ); }*/ template< typename Real, typename Device, typename Index > Loading
src/matrices/tnlEllpackMatrix.h +4 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,10 @@ class tnlEllpackMatrix : public tnlSparseMatrix< Real, Device, Index > template< typename Real2, typename Device2, typename Index2 > bool operator != ( const tnlEllpackMatrix< Real2, Device2, Index2 >& matrix ) const; /*template< typename Matrix > bool copyFrom( const Matrix& matrix, const RowLengthsVector& rowLengths );*/ #ifdef HAVE_CUDA __device__ __host__ #endif Loading
tests/benchmarks/share/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ INSTALL( FILES matrix-market run-tnl-benchmark-spmv cuda-profiler.conf process-cuda-profile.pl tnl-log-to-html.py DESTINATION share/tnl-${tnlVersion}/benchmark-scripts ) INSTALL( FILES tnl-run-spmv-benchmark Loading
tests/benchmarks/tnl-benchmark-spmv.h +13 −3 Original line number Diff line number Diff line Loading @@ -206,9 +206,12 @@ bool setupBenchmark( const tnlParameterContainer& parameters ) #ifdef HAVE_CUDA typedef tnlVector< Real, tnlCuda, int > CudaVector; CudaVector cudaX, cudaB; tnlVector< int, tnlCuda, int > rowLengthsCuda; cudaX.setSize( csrMatrix.getColumns() ); cudaX.setValue( 1.0 ); cudaB.setSize( csrMatrix.getRows() ); rowLengthsCuda.setSize( csrMatrix.getRows() ); rowLengthsCuda = rowLengthsHost; #endif benchmarkHostMatrix( csrMatrix, hostX, Loading @@ -232,8 +235,15 @@ bool setupBenchmark( const tnlParameterContainer& parameters ) verbose, logFile ); #ifdef HAVE_CUDA /*typedef tnlEllpackMatrix< Real, tnlCuda, int > EllpackMatrixCudaType; EllpackMatrixCudaType cudaEllpackMatrix( ellpackMatrix); typedef tnlEllpackMatrix< Real, tnlCuda, int > EllpackMatrixCudaType; EllpackMatrixCudaType cudaEllpackMatrix; cout << "Copying matrix to GPU... "; if( ! cudaEllpackMatrix.copyFrom( ellpackMatrix, rowLengthsCuda ) ) { cerr << "I am not able to transfer the matrix on GPU." << endl; return false; } cout << " done." << endl; benchmarkHostMatrix( cudaEllpackMatrix, cudaX, cudaB, Loading @@ -242,7 +252,7 @@ bool setupBenchmark( const tnlParameterContainer& parameters ) stopTime, verbose, logFile ); cudaEllpackMatrix.reset();*/ cudaEllpackMatrix.reset(); #endif ellpackMatrix.reset(); Loading