Loading src/TNL/Matrices/Dense.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ getSerializationType() { return String( "Matrices::Dense< " ) + TNL::getSerializationType< RealType >() + ", [any_device], " + TNL::getSerializationType< IndexType >() + TNL::getSerializationType< IndexType >() + ", " + ( RowMajorOrder ? "true" : "false" ) + ", [any_allocator] >"; } Loading src/UnitTests/Matrices/DenseMatrixTest.h +14 −17 Original line number Diff line number Diff line Loading @@ -31,24 +31,16 @@ static const char* TEST_FILE_NAME = "test_DenseMatrixTest.tnl"; #include <gtest/gtest.h> template< typename MatrixHostFloat, typename MatrixHostInt > void host_test_GetType() void test_GetSerializationType() { MatrixHostFloat mtrxHostFloat; MatrixHostInt mtrxHostInt; EXPECT_EQ( mtrxHostFloat.getType(), TNL::String( "Matrices::Dense< float, Devices::Host, int >" ) ); EXPECT_EQ( mtrxHostInt.getType(), TNL::String( "Matrices::Dense< int, Devices::Host, int >" ) ); } template< typename MatrixCudaFloat, typename MatrixCudaInt > void cuda_test_GetType() { MatrixCudaFloat mtrxCudaFloat; MatrixCudaInt mtrxCudaInt; EXPECT_EQ( mtrxCudaFloat.getType(), TNL::String( "Matrices::Dense< float, Devices::Cuda, int >" ) ); EXPECT_EQ( mtrxCudaInt.getType(), TNL::String( "Matrices::Dense< int, Devices::Cuda, int >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Host, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Host, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Cuda, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Cuda, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Host, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, false, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Host, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, false, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Cuda, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, false, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Cuda, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, false, [any_allocator] >" ) ); } template< typename Matrix > Loading Loading @@ -1377,6 +1369,11 @@ using MatrixTypes = ::testing::Types TYPED_TEST_SUITE( MatrixTest, MatrixTypes ); TYPED_TEST( MatrixTest, getSerializationType ) { test_GetSerializationType(); } TYPED_TEST( MatrixTest, setDimensionsTest ) { using MatrixType = typename TestFixture::MatrixType; Loading src/UnitTests/Matrices/TridiagonalMatrixTest.cpp 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** DenseMatrixTest.cpp - description ------------------- begin : Nov 10, 2018 copyright : (C) 2018 by Tomas Oberhuber et al. email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "DenseMatrixTest.h" No newline at end of file src/UnitTests/Matrices/TridiagonalMatrixTest.cu 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** DenseMatrixTest.cu - description ------------------- begin : Nov 10, 2018 copyright : (C) 2018 by Tomas Oberhuber et al. email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "DenseMatrixTest.h" No newline at end of file src/UnitTests/Matrices/TridiagonalMatrixTest.h 0 → 100644 +1614 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
src/TNL/Matrices/Dense.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ getSerializationType() { return String( "Matrices::Dense< " ) + TNL::getSerializationType< RealType >() + ", [any_device], " + TNL::getSerializationType< IndexType >() + TNL::getSerializationType< IndexType >() + ", " + ( RowMajorOrder ? "true" : "false" ) + ", [any_allocator] >"; } Loading
src/UnitTests/Matrices/DenseMatrixTest.h +14 −17 Original line number Diff line number Diff line Loading @@ -31,24 +31,16 @@ static const char* TEST_FILE_NAME = "test_DenseMatrixTest.tnl"; #include <gtest/gtest.h> template< typename MatrixHostFloat, typename MatrixHostInt > void host_test_GetType() void test_GetSerializationType() { MatrixHostFloat mtrxHostFloat; MatrixHostInt mtrxHostInt; EXPECT_EQ( mtrxHostFloat.getType(), TNL::String( "Matrices::Dense< float, Devices::Host, int >" ) ); EXPECT_EQ( mtrxHostInt.getType(), TNL::String( "Matrices::Dense< int, Devices::Host, int >" ) ); } template< typename MatrixCudaFloat, typename MatrixCudaInt > void cuda_test_GetType() { MatrixCudaFloat mtrxCudaFloat; MatrixCudaInt mtrxCudaInt; EXPECT_EQ( mtrxCudaFloat.getType(), TNL::String( "Matrices::Dense< float, Devices::Cuda, int >" ) ); EXPECT_EQ( mtrxCudaInt.getType(), TNL::String( "Matrices::Dense< int, Devices::Cuda, int >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Host, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Host, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Cuda, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Cuda, int, true >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, true, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Host, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, false, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Host, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, false, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< float, TNL::Devices::Cuda, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< float, [any_device], int, false, [any_allocator] >" ) ); EXPECT_EQ( ( TNL::Matrices::Dense< int, TNL::Devices::Cuda, int, false >::getSerializationType() ), TNL::String( "Matrices::Dense< int, [any_device], int, false, [any_allocator] >" ) ); } template< typename Matrix > Loading Loading @@ -1377,6 +1369,11 @@ using MatrixTypes = ::testing::Types TYPED_TEST_SUITE( MatrixTest, MatrixTypes ); TYPED_TEST( MatrixTest, getSerializationType ) { test_GetSerializationType(); } TYPED_TEST( MatrixTest, setDimensionsTest ) { using MatrixType = typename TestFixture::MatrixType; Loading
src/UnitTests/Matrices/TridiagonalMatrixTest.cpp 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** DenseMatrixTest.cpp - description ------------------- begin : Nov 10, 2018 copyright : (C) 2018 by Tomas Oberhuber et al. email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "DenseMatrixTest.h" No newline at end of file
src/UnitTests/Matrices/TridiagonalMatrixTest.cu 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** DenseMatrixTest.cu - description ------------------- begin : Nov 10, 2018 copyright : (C) 2018 by Tomas Oberhuber et al. email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "DenseMatrixTest.h" No newline at end of file
src/UnitTests/Matrices/TridiagonalMatrixTest.h 0 → 100644 +1614 −0 File added.Preview size limit exceeded, changes collapsed. Show changes