Commit 0678f5f1 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Avoiding use of enum SPMVCudaKernel in legacy CSR format.

parent 04f80008
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -31,7 +31,9 @@ class CusparseCSR;
template< typename Device >
class CSRDeviceDependentCode;

template< typename Real, typename Device = Devices::Host, typename Index = int >
enum CSRKernel { CSRScalar, CVSVector, CSRAdaptive, CSRStream };

template< typename Real, typename Device = Devices::Host, typename Index = int >//, CSRKernel KernelType = CSRAdaptive >
class CSR : public Sparse< Real, Device, Index >
{
private:
@@ -60,7 +62,7 @@ public:
             typename _Index = Index >
   using Self = CSR< _Real, _Device, _Index >;

   enum SPMVCudaKernel { scalar, vector, hybrid };
   //enum SPMVCudaKernel { scalar, vector, hybrid };

   CSR();

@@ -198,10 +200,10 @@ public:

   void print( std::ostream& str ) const;

   void setCudaKernelType( const SPMVCudaKernel kernel );
   //void setCudaKernelType( const SPMVCudaKernel kernel );

   __cuda_callable__
   SPMVCudaKernel getCudaKernelType() const;
   //__cuda_callable__
   //SPMVCudaKernel getCudaKernelType() const;

   void setCudaWarpSize( const int warpSize );

@@ -281,7 +283,7 @@ protected:

   Containers::Vector< Index, Device, Index > rowPointers;

   SPMVCudaKernel spmvCudaKernel;
   //SPMVCudaKernel spmvCudaKernel;

   int cudaWarpSize, hybridModeSplit;

+3 −3
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ template< typename Real,
          typename Device,
          typename Index >
CSR< Real, Device, Index >::CSR()
: spmvCudaKernel( hybrid ),
: //spmvCudaKernel( hybrid ),
  cudaWarpSize( 32 ), //Cuda::getWarpSize() )
  hybridModeSplit( 4 )
{
@@ -621,7 +621,7 @@ void CSR< Real, Device, Index >::print( std::ostream& str ) const
   }
}

template< typename Real,
/*template< typename Real,
          typename Device,
          typename Index >
void CSR< Real, Device, Index >::setCudaKernelType( const SPMVCudaKernel kernel )
@@ -636,7 +636,7 @@ __cuda_callable__
typename CSR< Real, Device, Index >::SPMVCudaKernel CSR< Real, Device, Index >::getCudaKernelType() const
{
   return this->spmvCudaKernel;
}
}*/

template< typename Real,
          typename Device,