Commit b1476ee0 authored by Libor's avatar Libor
Browse files

opravena CUSPARSE

parent e1c47021
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -110,18 +110,20 @@ class tnlCusparseCSRMatrix< double > : public tnlCusparseCSRMatrixBase< double >
      {
         tnlAssert( matrix, );
#ifdef HAVE_CUDA  
	 double d = 1.0;       
         double* alpha = &d;
         cusparseDcsrmv( *( this->cusparseHandle ),
                         CUSPARSE_OPERATION_NON_TRANSPOSE,
                         this->matrix->getRows(),
                         this->matrix->getColumns(),
                         this->matrix->values.getSize(),
                         1.0,
                         alpha,
                         this->matrixDescriptor,
                         this->matrix->values.getData(),
                         this->matrix->rowPointers.getData(),
                         this->matrix->columnIndexes.getData(),
                         inVector.getData(),
                         1.0,
                         alpha,
                         outVector.getData() );
#endif         
      }
@@ -139,18 +141,20 @@ class tnlCusparseCSRMatrix< float > : public tnlCusparseCSRMatrixBase< float >
      {
         tnlAssert( matrix, );
#ifdef HAVE_CUDA         
         float d = 1.0;       
         float* alpha = &d;
         cusparseScsrmv( *( this->cusparseHandle ),
                         CUSPARSE_OPERATION_NON_TRANSPOSE,
                         this->matrix->getRows(),
                         this->matrix->getColumns(),
                         this->matrix->values.getSize(),
                         1.0,
                         alpha,
                         this->matrixDescriptor,
                         this->matrix->values.getData(),
                         this->matrix->rowPointers.getData(),
                         this->matrix->columnIndexes.getData(),
                         inVector.getData(),
                         0,
                         alpha,
                         outVector.getData() );
#endif         
      }