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

Added aliases on CSR segments with different kernel types.

parent af358d68
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -127,6 +127,28 @@ class CSR

      OffsetsHolder offsets;
};

template< typename Device,
          typename Index,
          typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index > >
using CSRScalar = CSR< Device, Index, CSRScalarKernel, IndexAllocator >;

template< typename Device,
          typename Index,
          typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index > >
using CSRVector = CSR< Device, Index, CSRVectorKernel, IndexAllocator >;

template< typename Device,
          typename Index,
          typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index > >
using CSRLight = CSR< Device, Index, CSRLightKernel, IndexAllocator >;

template< typename Device,
          typename Index,
          typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index > >
using CSRDefault = CSRScalar< Device, Index, IndexAllocator >;


      } // namespace Segments
   }  // namespace Algorithms
} // namespace TNL
+17 −0
Original line number Diff line number Diff line
@@ -126,6 +126,23 @@ class CSRView

      OffsetsView offsets;
};

template< typename Device,
          typename Index >
using CSRViewScalar = CSRView< Device, Index, CSRScalarKernel >;

template< typename Device,
          typename Index >
using CSRViewVector = CSRView< Device, Index, CSRVectorKernel >;

template< typename Device,
          typename Index >
using CSRViewLight = CSRView< Device, Index, CSRLightKernel >;

template< typename Device,
          typename Index >
using CSRViewDefault = CSRViewScalar< Device, Index >;

      } // namespace Segments
   }  // namespace Algorithms
} // namespace TNL
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ template< typename Real = double,
          typename Device = Devices::Host,
          typename Index = int,
          typename MatrixType = GeneralMatrix,
          template< typename Device_, typename Index_, typename IndexAllocator_ > class Segments = Algorithms::Segments::CSR,
          template< typename Device_, typename Index_, typename IndexAllocator_ > class Segments = Algorithms::Segments::CSRDefault,
          typename ComputeReal = typename ChooseSparseMatrixComputeReal< Real, Index >::type,
          typename RealAllocator = typename Allocators::Default< Device >::template Allocator< Real >,
          typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index > >
+5 −5
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ template< typename Real,
          typename Device = Devices::Host,
          typename Index = int,
          typename MatrixType = GeneralMatrix,
          template< typename Device_, typename Index_ > class SegmentsView = Algorithms::Segments::CSRView,
          template< typename Device_, typename Index_ > class SegmentsView = Algorithms::Segments::CSRViewDefault,
          typename ComputeReal = typename ChooseSparseMatrixComputeReal< Real, Index >::type >
class SparseMatrixView : public MatrixView< Real, Device, Index >
{