Loading src/UnitTests/Containers/CMakeLists.txt +5 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,10 @@ ADD_EXECUTABLE( StaticVectorOperationsTest StaticVectorOperationsTest.cpp ) TARGET_COMPILE_OPTIONS( StaticVectorOperationsTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( StaticVectorOperationsTest ${GTEST_BOTH_LIBRARIES} ) ADD_EXECUTABLE( VectorOfStaticVectorsTest VectorOfStaticVectorsTest.cpp ) TARGET_COMPILE_OPTIONS( VectorOfStaticVectorsTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( VectorOfStaticVectorsTest ${GTEST_BOTH_LIBRARIES} ) ADD_TEST( ArrayTest ${EXECUTABLE_OUTPUT_PATH}/ArrayTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( ArrayViewTest ${EXECUTABLE_OUTPUT_PATH}/ArrayViewTest${CMAKE_EXECUTABLE_SUFFIX} ) Loading @@ -90,6 +94,7 @@ ENDIF() ADD_TEST( StaticArrayTest ${EXECUTABLE_OUTPUT_PATH}/StaticArrayTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( StaticVectorTest ${EXECUTABLE_OUTPUT_PATH}/StaticVectorTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( StaticVectorOperationsTest ${EXECUTABLE_OUTPUT_PATH}/StaticVectorOperationsTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( VectorOfStaticVectorsTest ${EXECUTABLE_OUTPUT_PATH}/VectorOfStaticVectorsTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_SUBDIRECTORY( Multimaps ) Loading src/UnitTests/Containers/VectorBinaryOperationsTest.h +48 −29 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ #elif defined(STATIC_VECTOR) #include <TNL/Containers/StaticVector.h> #else #ifdef VECTOR_OF_STATIC_VECTORS #include <TNL/Containers/StaticVector.h> #endif #include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h> #endif Loading Loading @@ -188,6 +191,21 @@ protected: Pair< StaticVector< 5, int >, StaticVector< 5, int > >, Pair< StaticVector< 5, double >, StaticVector< 5, double > > >; #else #ifdef VECTOR_OF_STATIC_VECTORS using VectorPairs = ::testing::Types< #ifndef HAVE_CUDA Pair< Vector< StaticVector< 3, double >, Devices::Host >, Vector< StaticVector< 3, double >, Devices::Host > >, Pair< VectorView< StaticVector< 3, double >, Devices::Host >, Vector< StaticVector< 3, double >, Devices::Host > >, Pair< Vector< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > >, Pair< VectorView< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > > #else Pair< Vector< StaticVector< 3, double >, Devices::Cuda >, Vector< StaticVector< 3, double >, Devices::Cuda > >, Pair< VectorView< StaticVector< 3, double >, Devices::Cuda >, Vector< StaticVector< 3, double >, Devices::Cuda > >, Pair< Vector< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > >, Pair< VectorView< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > > #endif >; #else using VectorPairs = ::testing::Types< #ifndef HAVE_CUDA Loading Loading @@ -221,6 +239,7 @@ protected: #endif >; #endif #endif TYPED_TEST_SUITE( VectorBinaryOperationsTest, VectorPairs ); Loading src/UnitTests/Containers/VectorOfStaticVectorsTest.cpp 0 → 100644 +5 −0 Original line number Diff line number Diff line #define VECTOR_OF_STATIC_VECTORS //#include "VectorBinaryOperationsTest.h" //#include "VectorUnaryOperationsTest.h" //#include "VectorVerticalOperationsTest.h" #include "../main.h" src/UnitTests/Containers/VectorUnaryOperationsTest.h +30 −15 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ #elif defined(STATIC_VECTOR) #include <TNL/Containers/StaticVector.h> #else #ifdef VECTOR_OF_STATIC_VECTORS #include <TNL/Containers/StaticVector.h> #endif #include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h> #endif Loading Loading @@ -93,6 +96,17 @@ protected: StaticVector< 5, int >, StaticVector< 5, double > >; #else #ifdef VECTOR_OF_STATIC_VECTORS using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Vector< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > #else Vector< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > #endif >; #else using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Loading @@ -111,6 +125,7 @@ protected: #endif >; #endif #endif TYPED_TEST_SUITE( VectorUnaryOperationsTest, VectorTypes ); Loading src/UnitTests/Containers/VectorVerticalOperationsTest.h +30 −15 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ #elif defined(STATIC_VECTOR) #include <TNL/Containers/StaticVector.h> #else #ifdef VECTOR_OF_STATIC_VECTORS #include <TNL/Containers/StaticVector.h> #endif #include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h> #endif Loading Loading @@ -132,6 +135,17 @@ protected: StaticVector< 5, int >, StaticVector< 5, double > >; #else #ifdef VECTOR_OF_STATIC_VECTORS using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Vector< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > #else Vector< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > #endif >; #else using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Loading @@ -150,6 +164,7 @@ protected: #endif >; #endif #endif TYPED_TEST_SUITE( VectorVerticalOperationsTest, VectorTypes ); Loading Loading
src/UnitTests/Containers/CMakeLists.txt +5 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,10 @@ ADD_EXECUTABLE( StaticVectorOperationsTest StaticVectorOperationsTest.cpp ) TARGET_COMPILE_OPTIONS( StaticVectorOperationsTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( StaticVectorOperationsTest ${GTEST_BOTH_LIBRARIES} ) ADD_EXECUTABLE( VectorOfStaticVectorsTest VectorOfStaticVectorsTest.cpp ) TARGET_COMPILE_OPTIONS( VectorOfStaticVectorsTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( VectorOfStaticVectorsTest ${GTEST_BOTH_LIBRARIES} ) ADD_TEST( ArrayTest ${EXECUTABLE_OUTPUT_PATH}/ArrayTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( ArrayViewTest ${EXECUTABLE_OUTPUT_PATH}/ArrayViewTest${CMAKE_EXECUTABLE_SUFFIX} ) Loading @@ -90,6 +94,7 @@ ENDIF() ADD_TEST( StaticArrayTest ${EXECUTABLE_OUTPUT_PATH}/StaticArrayTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( StaticVectorTest ${EXECUTABLE_OUTPUT_PATH}/StaticVectorTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( StaticVectorOperationsTest ${EXECUTABLE_OUTPUT_PATH}/StaticVectorOperationsTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( VectorOfStaticVectorsTest ${EXECUTABLE_OUTPUT_PATH}/VectorOfStaticVectorsTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_SUBDIRECTORY( Multimaps ) Loading
src/UnitTests/Containers/VectorBinaryOperationsTest.h +48 −29 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ #elif defined(STATIC_VECTOR) #include <TNL/Containers/StaticVector.h> #else #ifdef VECTOR_OF_STATIC_VECTORS #include <TNL/Containers/StaticVector.h> #endif #include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h> #endif Loading Loading @@ -188,6 +191,21 @@ protected: Pair< StaticVector< 5, int >, StaticVector< 5, int > >, Pair< StaticVector< 5, double >, StaticVector< 5, double > > >; #else #ifdef VECTOR_OF_STATIC_VECTORS using VectorPairs = ::testing::Types< #ifndef HAVE_CUDA Pair< Vector< StaticVector< 3, double >, Devices::Host >, Vector< StaticVector< 3, double >, Devices::Host > >, Pair< VectorView< StaticVector< 3, double >, Devices::Host >, Vector< StaticVector< 3, double >, Devices::Host > >, Pair< Vector< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > >, Pair< VectorView< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > > #else Pair< Vector< StaticVector< 3, double >, Devices::Cuda >, Vector< StaticVector< 3, double >, Devices::Cuda > >, Pair< VectorView< StaticVector< 3, double >, Devices::Cuda >, Vector< StaticVector< 3, double >, Devices::Cuda > >, Pair< Vector< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > >, Pair< VectorView< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > > #endif >; #else using VectorPairs = ::testing::Types< #ifndef HAVE_CUDA Loading Loading @@ -221,6 +239,7 @@ protected: #endif >; #endif #endif TYPED_TEST_SUITE( VectorBinaryOperationsTest, VectorPairs ); Loading
src/UnitTests/Containers/VectorOfStaticVectorsTest.cpp 0 → 100644 +5 −0 Original line number Diff line number Diff line #define VECTOR_OF_STATIC_VECTORS //#include "VectorBinaryOperationsTest.h" //#include "VectorUnaryOperationsTest.h" //#include "VectorVerticalOperationsTest.h" #include "../main.h"
src/UnitTests/Containers/VectorUnaryOperationsTest.h +30 −15 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ #elif defined(STATIC_VECTOR) #include <TNL/Containers/StaticVector.h> #else #ifdef VECTOR_OF_STATIC_VECTORS #include <TNL/Containers/StaticVector.h> #endif #include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h> #endif Loading Loading @@ -93,6 +96,17 @@ protected: StaticVector< 5, int >, StaticVector< 5, double > >; #else #ifdef VECTOR_OF_STATIC_VECTORS using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Vector< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > #else Vector< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > #endif >; #else using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Loading @@ -111,6 +125,7 @@ protected: #endif >; #endif #endif TYPED_TEST_SUITE( VectorUnaryOperationsTest, VectorTypes ); Loading
src/UnitTests/Containers/VectorVerticalOperationsTest.h +30 −15 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ #elif defined(STATIC_VECTOR) #include <TNL/Containers/StaticVector.h> #else #ifdef VECTOR_OF_STATIC_VECTORS #include <TNL/Containers/StaticVector.h> #endif #include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h> #endif Loading Loading @@ -132,6 +135,17 @@ protected: StaticVector< 5, int >, StaticVector< 5, double > >; #else #ifdef VECTOR_OF_STATIC_VECTORS using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Vector< StaticVector< 3, double >, Devices::Host >, VectorView< StaticVector< 3, double >, Devices::Host > #else Vector< StaticVector< 3, double >, Devices::Cuda >, VectorView< StaticVector< 3, double >, Devices::Cuda > #endif >; #else using VectorTypes = ::testing::Types< #ifndef HAVE_CUDA Loading @@ -150,6 +164,7 @@ protected: #endif >; #endif #endif TYPED_TEST_SUITE( VectorVerticalOperationsTest, VectorTypes ); Loading