From 2a37be3b4c0d2af5b8d82dd930285cbac8f29af2 Mon Sep 17 00:00:00 2001 From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz> Date: Thu, 5 Dec 2019 20:29:06 +0100 Subject: [PATCH] Implementing SlicedEllpack segments. --- src/TNL/Containers/Segments/Ellpack.h | 2 +- src/TNL/Containers/Segments/Ellpack.hpp | 18 ++ src/TNL/Containers/Segments/SlicedEllpack.h | 102 +++++++ src/TNL/Containers/Segments/SlicedEllpack.hpp | 270 ++++++++++++++++++ .../Matrices/SparseMatrixTest_CSR_segments.h | 2 +- .../SparseMatrixTest_Ellpack_segments.h | 2 +- ...parseMatrixTest_SlicedEllpack_segments.cpp | 1 + ...SparseMatrixTest_SlicedEllpack_segments.cu | 1 + .../SparseMatrixTest_SlicedEllpack_segments.h | 152 ++++++++++ 9 files changed, 547 insertions(+), 3 deletions(-) create mode 100644 src/TNL/Containers/Segments/SlicedEllpack.h create mode 100644 src/TNL/Containers/Segments/SlicedEllpack.hpp create mode 100644 src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cpp create mode 100644 src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cu create mode 100644 src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.h diff --git a/src/TNL/Containers/Segments/Ellpack.h b/src/TNL/Containers/Segments/Ellpack.h index dc1a717b3a..d99ffe3365 100644 --- a/src/TNL/Containers/Segments/Ellpack.h +++ b/src/TNL/Containers/Segments/Ellpack.h @@ -26,7 +26,6 @@ class Ellpack using DeviceType = Device; using IndexType = Index; - using OffsetsHolder = Containers::Vector< IndexType, DeviceType, IndexType >; static constexpr int getAlignment() { return Alignment; } static constexpr bool getRowMajorOrder() { return RowMajorOrder; } @@ -44,6 +43,7 @@ class Ellpack template< typename SizesHolder = OffsetsHolder > void setSizes( const SizesHolder& sizes ); + void setSizes( const IndexType segmentsCount, const IndexType segmentSize ); /** * \brief Number segments. */ diff --git a/src/TNL/Containers/Segments/Ellpack.hpp b/src/TNL/Containers/Segments/Ellpack.hpp index 8a23693ec8..833b162ebb 100644 --- a/src/TNL/Containers/Segments/Ellpack.hpp +++ b/src/TNL/Containers/Segments/Ellpack.hpp @@ -66,6 +66,24 @@ setSizes( const SizesHolder& sizes ) this->alignedSize = roundUpDivision( size, this->getAlignment() ) * this->getAlignment(); } +template< typename Device, + typename Index, + bool RowMajorOrder, + int Alignment > + template< typename SizesHolder > +void +Ellpack< Device, Index, RowMajorOrder, Alignment >:: +setSizes( const IndexType segmentsCount, const IndexType segmentSize ); +{ + this->segmentSize = segmentSize; + this->size = segmentsCount; + if( RowMajorOrder ) + this->alignedSize = this->size; + else + this->alignedSize = roundUpDivision( size, this->getAlignment() ) * this->getAlignment(); +} + + template< typename Device, typename Index, bool RowMajorOrder, diff --git a/src/TNL/Containers/Segments/SlicedEllpack.h b/src/TNL/Containers/Segments/SlicedEllpack.h new file mode 100644 index 0000000000..a5ef9d1211 --- /dev/null +++ b/src/TNL/Containers/Segments/SlicedEllpack.h @@ -0,0 +1,102 @@ +/*************************************************************************** + SlicedEllpack.h - description + ------------------- + begin : Dec 4, 2019 + copyright : (C) 2019 by Tomas Oberhuber + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#pragma once + +#include <TNL/Containers/Vector.h> + +namespace TNL { + namespace Containers { + namespace Segments { + +template< typename Device, + typename Index, + bool RowMajorOrder = std::is_same< Device, Devices::Host >::value, + int SliceSize = 32 > +class SlicedEllpack +{ + public: + + using DeviceType = Device; + using IndexType = Index; + using OffsetsHolder = Containers::Vector< IndexType, DeviceType, IndexType >; + static constexpr int getSliceSize() { return SliceSize; } + static constexpr bool getRowMajorOrder() { return RowMajorOrder; } + + SlicedEllpack(); + + SlicedEllpack( const Vector< IndexType, DeviceType, IndexType >& sizes ); + + SlicedEllpack( const SlicedEllpack& segments ); + + SlicedEllpack( const SlicedEllpack&& segments ); + + /** + * \brief Set sizes of particular segments. + */ + template< typename SizesHolder = OffsetsHolder > + void setSizes( const SizesHolder& sizes ); + + /** + * \brief Number segments. + */ + __cuda_callable__ + IndexType getSize() const; + + __cuda_callable__ + IndexType getSegmentSize( const IndexType segmentIdx ) const; + + __cuda_callable__ + IndexType getStorageSize() const; + + __cuda_callable__ + IndexType getGlobalIndex( const Index segmentIdx, const Index localIdx ) const; + + __cuda_callable__ + void getSegmentAndLocalIndex( const Index globalIdx, Index& segmentIdx, Index& localIdx ) const; + + /*** + * \brief Go over all segments and for each segment element call + * function 'f' with arguments 'args'. The return type of 'f' is bool. + * When its true, the for-loop continues. Once 'f' returns false, the for-loop + * is terminated. + */ + template< typename Function, typename... Args > + void forSegments( IndexType first, IndexType last, Function& f, Args... args ) const; + + template< typename Function, typename... Args > + void forAll( Function& f, Args... args ) const; + + + /*** + * \brief Go over all segments and perform a reduction in each of them. + */ + template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > + void segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; + + template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > + void allReduction( Fetch& fetch, Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; + + void save( File& file ) const; + + void load( File& file ); + + protected: + + IndexType size; + + OffsetHolder sliceOffsets; +}; + + } // namespace Segements + } // namespace Conatiners +} // namespace TNL + +#include <TNL/Containers/Segments/SlicedEllpack.hpp> diff --git a/src/TNL/Containers/Segments/SlicedEllpack.hpp b/src/TNL/Containers/Segments/SlicedEllpack.hpp new file mode 100644 index 0000000000..60d2059fef --- /dev/null +++ b/src/TNL/Containers/Segments/SlicedEllpack.hpp @@ -0,0 +1,270 @@ +/*************************************************************************** + SlicedEllpack.hpp - description + ------------------- + begin : Dec 4, 2019 + copyright : (C) 2019 by Tomas Oberhuber + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#pragma once + +#include <TNL/Containers/Vector.h> +#include <TNL/Algorithms/ParallelFor.h> +#include <TNL/Containers/Segments/SlicedEllpack.h> +#include <TNL/Containers/Segments/Ellpack.h> + +namespace TNL { + namespace Containers { + namespace Segments { + + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +SlicedEllpack() + : size( 0 ) +{ +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +SlicedEllpack( const SlicedEllpack& slicedEllpack ) + : size( slicedEllpack.size ), sliceOffsets( slicedEllpack.sliceOffsets ) +{ +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +SlicedEllpack( const SlicedEllpack&& slicedEllpack ) + : size( slicedEllpack.size ), sliceOffsets( slicedEllpack.sliceOffsets ) +{ +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > + template< typename SizesHolder > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +setSizes( const SizesHolder& sizes ) +{ + this->size = sizes.getSize(); + const IndexType segmentsCount = roundUpDivision( this->size, getSliceSize() ); + this->segmentOffsets.setSize( segmentsCount + 1 ); + Ellpack< DeviceType, IndexType, true > ellpack; + ellpack.setSizes( segmentsCount, SliceSize ); + ... + + + + + + if( RowMajorOrder ) + this->alignedSize = this->size; + else + this->alignedSize = roundUpDivision( size, this->getSliceSize() ) * this->getSliceSize(); +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +__cuda_callable__ +Index +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +getSize() const +{ + return this->size; +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +__cuda_callable__ +Index +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +getSegmentSize( const IndexType segmentIdx ) const +{ + return this->segmentSize; +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +__cuda_callable__ +Index +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +getStorageSize() const +{ + return this->alignedSize * this->segmentSize; +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +__cuda_callable__ +Index +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +getGlobalIndex( const Index segmentIdx, const Index localIdx ) const +{ + if( RowMajorOrder ) + return segmentIdx * this->segmentSize + localIdx; + else + return segmentIdx + this->alignedSize * localIdx; +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +__cuda_callable__ +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +getSegmentAndLocalIndex( const Index globalIdx, Index& segmentIdx, Index& localIdx ) const +{ +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > + template< typename Function, typename... Args > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +forSegments( IndexType first, IndexType last, Function& f, Args... args ) const +{ + const auto offsetsView = this->offsets.getView(); + if( RowMajorOrder ) + { + const IndexType segmentSize = this->segmentSize; + auto l = [=] __cuda_callable__ ( const IndexType i, Args... args ) { + const IndexType begin = i * segmentSize; + const IndexType end = begin + segmentSize; + for( IndexType j = begin; j < end; j++ ) + if( ! f( i, j, args... ) ) + break; + }; + Algorithms::ParallelFor< Device >::exec( first, last, l, args... ); + } + else + { + const IndexType storageSize = this->getStorageSize(); + const IndexType alignedSize = this->alignedSize; + auto l = [=] __cuda_callable__ ( const IndexType i, Args... args ) { + const IndexType begin = i; + const IndexType end = storageSize; + for( IndexType j = begin; j < end; j += alignedSize ) + if( ! f( i, j, args... ) ) + break; + }; + Algorithms::ParallelFor< Device >::exec( first, last, l, args... ); + } +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > + template< typename Function, typename... Args > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +forAll( Function& f, Args... args ) const +{ + this->forSegments( 0, this->getSize(), f, args... ); +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > + template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const +{ + if( RowMajorOrder ) + { + using RealType = decltype( fetch( IndexType(), IndexType() ) ); + const IndexType segmentSize = this->segmentSize; + auto l = [=] __cuda_callable__ ( const IndexType i, Args... args ) mutable { + const IndexType begin = i * segmentSize; + const IndexType end = begin + segmentSize; + RealType aux( zero ); + for( IndexType j = begin; j < end; j++ ) + reduction( aux, fetch( i, j, args... ) ); + keeper( i, aux ); + }; + Algorithms::ParallelFor< Device >::exec( first, last, l, args... ); + } + else + { + using RealType = decltype( fetch( IndexType(), IndexType() ) ); + const IndexType storageSize = this->getStorageSize(); + const IndexType alignedSize = this->alignedSize; + auto l = [=] __cuda_callable__ ( const IndexType i, Args... args ) mutable { + const IndexType begin = i; + const IndexType end = storageSize; + RealType aux( zero ); + for( IndexType j = begin; j < end; j += alignedSize ) + reduction( aux, fetch( i, j, args... ) ); + keeper( i, aux ); + }; + Algorithms::ParallelFor< Device >::exec( first, last, l, args... ); + } +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > + template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +allReduction( Fetch& fetch, Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const +{ + this->segmentsReduction( 0, this->getSize(), fetch, reduction, keeper, zero, args... ); +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +save( File& file ) const +{ + file.save( &segmentSize ); + file.save( &size ); + file.save( &alignedSize ); +} + +template< typename Device, + typename Index, + bool RowMajorOrder, + int SliceSize > +void +SlicedEllpack< Device, Index, RowMajorOrder, SliceSize >:: +load( File& file ) +{ + file.load( &segmentSize ); + file.load( &size ); + file.load( &alignedSize ); +} + + } // namespace Segments + } // namespace Conatiners +} // namespace TNL diff --git a/src/UnitTests/Matrices/SparseMatrixTest_CSR_segments.h b/src/UnitTests/Matrices/SparseMatrixTest_CSR_segments.h index b533584699..bf4e452fa1 100644 --- a/src/UnitTests/Matrices/SparseMatrixTest_CSR_segments.h +++ b/src/UnitTests/Matrices/SparseMatrixTest_CSR_segments.h @@ -1,5 +1,5 @@ /*************************************************************************** - SparseMatrixTest_CSR.h - description + SparseMatrixTest_CSR_segments.h - description ------------------- begin : Dec 2, 2019 copyright : (C) 2019 by Tomas Oberhuber et al. diff --git a/src/UnitTests/Matrices/SparseMatrixTest_Ellpack_segments.h b/src/UnitTests/Matrices/SparseMatrixTest_Ellpack_segments.h index c54aab9486..edfe0bc283 100644 --- a/src/UnitTests/Matrices/SparseMatrixTest_Ellpack_segments.h +++ b/src/UnitTests/Matrices/SparseMatrixTest_Ellpack_segments.h @@ -1,5 +1,5 @@ /*************************************************************************** - SparseMatrixTest_Ellpack.h - description + SparseMatrixTest_Ellpack_segments.h - description ------------------- begin : Dec 3, 2019 copyright : (C) 2019 by Tomas Oberhuber et al. diff --git a/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cpp b/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cpp new file mode 100644 index 0000000000..a88301100d --- /dev/null +++ b/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cpp @@ -0,0 +1 @@ +#include "SparseMatrixTest_SlicedEllpack_segments.h" diff --git a/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cu b/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cu new file mode 100644 index 0000000000..a88301100d --- /dev/null +++ b/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.cu @@ -0,0 +1 @@ +#include "SparseMatrixTest_SlicedEllpack_segments.h" diff --git a/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.h b/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.h new file mode 100644 index 0000000000..8d17b8be7a --- /dev/null +++ b/src/UnitTests/Matrices/SparseMatrixTest_SlicedEllpack_segments.h @@ -0,0 +1,152 @@ +/*************************************************************************** + SparseMatrixTest_SlicedEllpack.h - description + ------------------- + begin : Dec 3, 2019 + copyright : (C) 2019 by Tomas Oberhuber et al. + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#include <TNL/Containers/Segments/SlicedEllpack.h> +#include <TNL/Matrices/SparseMatrix.h> + + +#include "SparseMatrixTest.hpp" +#include <iostream> + +#ifdef HAVE_GTEST +#include <gtest/gtest.h> + +// test fixture for typed tests +template< typename Matrix > +class SlicedEllpackMatrixTest : public ::testing::Test +{ +protected: + using SlicedEllpackMatrixType = Matrix; +}; + +//// +// Row-major format is used for the host system +template< typename Device, typename Index > +using RowMajorSlicedEllpack = TNL::Containers::Segments::SlicedEllpack< Device, Index, true, 32 >; + + +//// +// Column-major format is used for GPUs +template< typename Device, typename Index > +using ColumnMajorSlicedEllpack = TNL::Containers::Segments::SlicedEllpack< Device, Index, false, 32 >; + +// types for which MatrixTest is instantiated +using SlicedEllpackMatrixTypes = ::testing::Types +< + TNL::Matrices::SparseMatrix< int, RowMajorSlicedEllpack, TNL::Devices::Host, short >, + TNL::Matrices::SparseMatrix< long, RowMajorSlicedEllpack, TNL::Devices::Host, short >, + TNL::Matrices::SparseMatrix< float, RowMajorSlicedEllpack, TNL::Devices::Host, short >, + TNL::Matrices::SparseMatrix< double, RowMajorSlicedEllpack, TNL::Devices::Host, short >, + TNL::Matrices::SparseMatrix< int, RowMajorSlicedEllpack, TNL::Devices::Host, int >, + TNL::Matrices::SparseMatrix< long, RowMajorSlicedEllpack, TNL::Devices::Host, int >, + TNL::Matrices::SparseMatrix< float, RowMajorSlicedEllpack, TNL::Devices::Host, int >, + TNL::Matrices::SparseMatrix< double, RowMajorSlicedEllpack, TNL::Devices::Host, int >, + TNL::Matrices::SparseMatrix< int, RowMajorSlicedEllpack, TNL::Devices::Host, long >, + TNL::Matrices::SparseMatrix< long, RowMajorSlicedEllpack, TNL::Devices::Host, long >, + TNL::Matrices::SparseMatrix< float, RowMajorSlicedEllpack, TNL::Devices::Host, long >, + TNL::Matrices::SparseMatrix< double, RowMajorSlicedEllpack, TNL::Devices::Host, long > +#ifdef HAVE_CUDA + ,TNL::Matrices::SparseMatrix< int, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, short >, + TNL::Matrices::SparseMatrix< long, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, short >, + TNL::Matrices::SparseMatrix< float, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, short >, + TNL::Matrices::SparseMatrix< double, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, short >, + TNL::Matrices::SparseMatrix< int, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, int >, + TNL::Matrices::SparseMatrix< long, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, int >, + TNL::Matrices::SparseMatrix< float, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, int >, + TNL::Matrices::SparseMatrix< double, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, int >, + TNL::Matrices::SparseMatrix< int, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, long >, + TNL::Matrices::SparseMatrix< long, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, long >, + TNL::Matrices::SparseMatrix< float, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, long >, + TNL::Matrices::SparseMatrix< double, ColumnMajorSlicedEllpack, TNL::Devices::Cuda, long > +#endif +>; + +TYPED_TEST_SUITE( SlicedEllpackMatrixTest, SlicedEllpackMatrixTypes); + +TYPED_TEST( SlicedEllpackMatrixTest, setDimensionsTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_SetDimensions< SlicedEllpackMatrixType >(); +} + +//TYPED_TEST( SlicedEllpackMatrixTest, setCompressedRowLengthsTest ) +//{ +//// using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; +// +//// test_SetCompressedRowLengths< SlicedEllpackMatrixType >(); +// +// bool testRan = false; +// EXPECT_TRUE( testRan ); +// std::cout << "\nTEST DID NOT RUN. NOT WORKING.\n\n"; +// std::cout << " This test is dependent on the input format. \n"; +// std::cout << " Almost every format allocates elements per row differently.\n\n"; +// std::cout << "\n TODO: Finish implementation of getNonZeroRowLength (Only non-zero elements, not the number of allocated elements.)\n\n"; +//} + +TYPED_TEST( SlicedEllpackMatrixTest, setLikeTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_SetLike< SlicedEllpackMatrixType, SlicedEllpackMatrixType >(); +} + +TYPED_TEST( SlicedEllpackMatrixTest, resetTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_Reset< SlicedEllpackMatrixType >(); +} + +TYPED_TEST( SlicedEllpackMatrixTest, setElementTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_SetElement< SlicedEllpackMatrixType >(); +} + +TYPED_TEST( SlicedEllpackMatrixTest, addElementTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_AddElement< SlicedEllpackMatrixType >(); +} + +TYPED_TEST( SlicedEllpackMatrixTest, setRowTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_SetRow< SlicedEllpackMatrixType >(); +} + +TYPED_TEST( SlicedEllpackMatrixTest, vectorProductTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_VectorProduct< SlicedEllpackMatrixType >(); +} + +TYPED_TEST( SlicedEllpackMatrixTest, saveAndLoadTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_SaveAndLoad< SlicedEllpackMatrixType >( "test_SparseMatrixTest_SlicedEllpack_segments" ); +} + +TYPED_TEST( SlicedEllpackMatrixTest, printTest ) +{ + using SlicedEllpackMatrixType = typename TestFixture::SlicedEllpackMatrixType; + + test_Print< SlicedEllpackMatrixType >(); +} + +#endif + +#include "../main.h" -- GitLab