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

Fixing the code for new CSR segments types.

parent 9a79a96b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ struct LinearSolversBenchmark
                                                  DeviceType,
                                                  IndexType,
                                                  TNL::Matrices::GeneralMatrix,
                                                  Algorithms::Segments::CSR
                                                  Algorithms::Segments::CSRDefault
                                                >;
         SharedPointer< CSR > matrixCopy;
         Matrices::copySparseMatrix( *matrixCopy, *matrixPointer );
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ using SlicedEllpackAlias = Matrices::Legacy::SlicedEllpack< Real, Device, Index

// Segments based sparse matrix aliases
template< typename Real, typename Device, typename Index >
using SparseMatrix_CSR = Matrices::SparseMatrix< Real, Device, Index, Matrices::GeneralMatrix, Algorithms::Segments::CSR >;
using SparseMatrix_CSR = Matrices::SparseMatrix< Real, Device, Index, Matrices::GeneralMatrix, Algorithms::Segments::CSRDefault >;

template< typename Device, typename Index, typename IndexAllocator >
using EllpackSegments = Algorithms::Segments::Ellpack< Device, Index, IndexAllocator >;
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ namespace TNL {

template< typename Device,
          typename Index,
          CSRKernelTypes KernelType_ = CSRScalar,
          CSRKernelTypes KernelType_ = CSRScalarKernel,
          typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index > >
class CSR
{
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ enum CSRKernelTypes { CSRScalarKernel, CSRVectorKernel, CSRLightKernel };

template< typename Device,
          typename Index,
          CSRKernelTypes KernelType_ = CSRScalar >
          CSRKernelTypes KernelType_ = CSRScalarKernel >
class CSRView
{
   public:
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reductio
{
   using RealType = typename details::FetchLambdaAdapter< Index, Fetch >::ReturnType;
   const auto offsetsView = this->offsets.getConstView();
   if( KernelType == CSRScalar )
   if( KernelType == CSRScalarKernel )
   {
      auto l = [=] __cuda_callable__ ( const IndexType segmentIdx, Args... args ) mutable {
         const IndexType begin = offsetsView[ segmentIdx ];
Loading