Loading src/Benchmarks/SpMV/cusparseCSRMatrix.h +18 −6 Original line number Diff line number Diff line Loading @@ -62,6 +62,9 @@ class CusparseCSRBase { TNL_ASSERT_TRUE( matrix, "matrix was not initialized" ); #ifdef HAVE_CUDA #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseDcsrmv was removed in CUDA 11."); #else cusparseDcsrmv( *( this->cusparseHandle ), CUSPARSE_OPERATION_NON_TRANSPOSE, this->matrix->getRows(), Loading @@ -75,6 +78,7 @@ class CusparseCSRBase inVector.getData(), 1.0, outVector.getData() ); #endif #endif } Loading Loading @@ -105,6 +109,9 @@ class CusparseCSR< double > : public CusparseCSRBase< double > { TNL_ASSERT_TRUE( matrix, "matrix was not initialized" ); #ifdef HAVE_CUDA #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseDcsrmv was removed in CUDA 11."); #else double d = 1.0; double* alpha = &d; cusparseDcsrmv( *( this->cusparseHandle ), Loading @@ -120,6 +127,7 @@ class CusparseCSR< double > : public CusparseCSRBase< double > inVector.getData(), alpha, outVector.getData() ); #endif #endif } }; Loading @@ -136,6 +144,9 @@ class CusparseCSR< float > : public CusparseCSRBase< float > { TNL_ASSERT_TRUE( matrix, "matrix was not initialized" ); #ifdef HAVE_CUDA #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseScsrmv was removed in CUDA 11."); #else float d = 1.0; float* alpha = &d; cusparseScsrmv( *( this->cusparseHandle ), Loading @@ -151,6 +162,7 @@ class CusparseCSR< float > : public CusparseCSRBase< float > inVector.getData(), alpha, outVector.getData() ); #endif #endif } }; Loading src/TNL/Matrices/Legacy/CSR_impl.h +8 −0 Original line number Diff line number Diff line Loading @@ -1171,6 +1171,9 @@ class tnlCusparseCSRWrapper< float, int > const Real* x, Real* y ) { #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseScsrmv was removed in CUDA 11."); #else cusparseHandle_t cusparseHandle; cusparseMatDescr_t cusparseMatDescr; cusparseCreate( &cusparseHandle ); Loading @@ -1191,6 +1194,7 @@ class tnlCusparseCSRWrapper< float, int > x, &beta, y ); #endif }; }; Loading @@ -1211,6 +1215,9 @@ class tnlCusparseCSRWrapper< double, int > const Real* x, Real* y ) { #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseDcsrmv was removed in CUDA 11."); #else cusparseHandle_t cusparseHandle; cusparseMatDescr_t cusparseMatDescr; cusparseCreate( &cusparseHandle ); Loading @@ -1231,6 +1238,7 @@ class tnlCusparseCSRWrapper< double, int > x, &beta, y ); #endif }; }; Loading Loading
src/Benchmarks/SpMV/cusparseCSRMatrix.h +18 −6 Original line number Diff line number Diff line Loading @@ -62,6 +62,9 @@ class CusparseCSRBase { TNL_ASSERT_TRUE( matrix, "matrix was not initialized" ); #ifdef HAVE_CUDA #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseDcsrmv was removed in CUDA 11."); #else cusparseDcsrmv( *( this->cusparseHandle ), CUSPARSE_OPERATION_NON_TRANSPOSE, this->matrix->getRows(), Loading @@ -75,6 +78,7 @@ class CusparseCSRBase inVector.getData(), 1.0, outVector.getData() ); #endif #endif } Loading Loading @@ -105,6 +109,9 @@ class CusparseCSR< double > : public CusparseCSRBase< double > { TNL_ASSERT_TRUE( matrix, "matrix was not initialized" ); #ifdef HAVE_CUDA #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseDcsrmv was removed in CUDA 11."); #else double d = 1.0; double* alpha = &d; cusparseDcsrmv( *( this->cusparseHandle ), Loading @@ -120,6 +127,7 @@ class CusparseCSR< double > : public CusparseCSRBase< double > inVector.getData(), alpha, outVector.getData() ); #endif #endif } }; Loading @@ -136,6 +144,9 @@ class CusparseCSR< float > : public CusparseCSRBase< float > { TNL_ASSERT_TRUE( matrix, "matrix was not initialized" ); #ifdef HAVE_CUDA #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseScsrmv was removed in CUDA 11."); #else float d = 1.0; float* alpha = &d; cusparseScsrmv( *( this->cusparseHandle ), Loading @@ -151,6 +162,7 @@ class CusparseCSR< float > : public CusparseCSRBase< float > inVector.getData(), alpha, outVector.getData() ); #endif #endif } }; Loading
src/TNL/Matrices/Legacy/CSR_impl.h +8 −0 Original line number Diff line number Diff line Loading @@ -1171,6 +1171,9 @@ class tnlCusparseCSRWrapper< float, int > const Real* x, Real* y ) { #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseScsrmv was removed in CUDA 11."); #else cusparseHandle_t cusparseHandle; cusparseMatDescr_t cusparseMatDescr; cusparseCreate( &cusparseHandle ); Loading @@ -1191,6 +1194,7 @@ class tnlCusparseCSRWrapper< float, int > x, &beta, y ); #endif }; }; Loading @@ -1211,6 +1215,9 @@ class tnlCusparseCSRWrapper< double, int > const Real* x, Real* y ) { #if CUDART_VERSION >= 11000 throw std::runtime_error("cusparseDcsrmv was removed in CUDA 11."); #else cusparseHandle_t cusparseHandle; cusparseMatDescr_t cusparseMatDescr; cusparseCreate( &cusparseHandle ); Loading @@ -1231,6 +1238,7 @@ class tnlCusparseCSRWrapper< double, int > x, &beta, y ); #endif }; }; Loading