Loading CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ if( CXX_COMPILER_NAME MATCHES "icpc" ) if( WITH_MIC STREQUAL "yes" ) message( "Compile MIC support..." ) set( MIC_CXX_FLAGS "-DHAVE_MIC") # build all tests with MIC support set( CXX_TESTS_FLAGS "${CXX_TESTS_FLAGS} -DHAVE_MIC" ) set( WITH_CUDA "no") else() set( MIC_CXX_FLAGS "") Loading src/UnitTests/Containers/ArrayTest.h +32 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ #include <type_traits> #include <TNL/Containers/Array.h> #include <TNL/Devices/Host.h> #include "gtest/gtest.h" Loading Loading @@ -102,6 +101,30 @@ using ArrayTypes = ::testing::Types< Array< double, Devices::Cuda, long >, Array< MyData, Devices::Cuda, long > #endif #ifdef HAVE_MIC , Array< short, Devices::MIC, short >, Array< int, Devices::MIC, short >, Array< long, Devices::MIC, short >, Array< float, Devices::MIC, short >, Array< double, Devices::MIC, short >, // TODO: MyData does not work on MIC // Array< MyData, Devices::MIC, short >, Array< short, Devices::MIC, int >, Array< int, Devices::MIC, int >, Array< long, Devices::MIC, int >, Array< float, Devices::MIC, int >, Array< double, Devices::MIC, int >, // TODO: MyData does not work on MIC // Array< MyData, Devices::MIC, int >, Array< short, Devices::MIC, long >, Array< int, Devices::MIC, long >, Array< long, Devices::MIC, long >, Array< float, Devices::MIC, long >, Array< double, Devices::MIC, long > // TODO: MyData does not work on MIC // Array< MyData, Devices::MIC, long > #endif >; TYPED_TEST_CASE( ArrayTest, ArrayTypes ); Loading Loading @@ -287,6 +310,14 @@ void testArrayElementwiseAccess( Array< Element, Devices::Cuda, Index >&& u ) #endif } template< typename Element, typename Index > void testArrayElementwiseAccess( Array< Element, Devices::MIC, Index >&& u ) { #ifdef HAVE_MIC // TODO #endif } TYPED_TEST( ArrayTest, elementwiseAccess ) { using ArrayType = typename TestFixture::ArrayType; Loading src/UnitTests/Containers/VectorTest.h +15 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,21 @@ using VectorTypes = ::testing::Types< Vector< float, Devices::Cuda, long >, Vector< double, Devices::Cuda, long > #endif #ifdef HAVE_MIC , Vector< int, Devices::MIC, short >, Vector< long, Devices::MIC, short >, Vector< float, Devices::MIC, short >, Vector< double, Devices::MIC, short >, Vector< int, Devices::MIC, int >, Vector< long, Devices::MIC, int >, Vector< float, Devices::MIC, int >, Vector< double, Devices::MIC, int >, Vector< int, Devices::MIC, long >, Vector< long, Devices::MIC, long >, Vector< float, Devices::MIC, long >, Vector< double, Devices::MIC, long > #endif >; TYPED_TEST_CASE( VectorTest, VectorTypes ); Loading Loading
CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ if( CXX_COMPILER_NAME MATCHES "icpc" ) if( WITH_MIC STREQUAL "yes" ) message( "Compile MIC support..." ) set( MIC_CXX_FLAGS "-DHAVE_MIC") # build all tests with MIC support set( CXX_TESTS_FLAGS "${CXX_TESTS_FLAGS} -DHAVE_MIC" ) set( WITH_CUDA "no") else() set( MIC_CXX_FLAGS "") Loading
src/UnitTests/Containers/ArrayTest.h +32 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ #include <type_traits> #include <TNL/Containers/Array.h> #include <TNL/Devices/Host.h> #include "gtest/gtest.h" Loading Loading @@ -102,6 +101,30 @@ using ArrayTypes = ::testing::Types< Array< double, Devices::Cuda, long >, Array< MyData, Devices::Cuda, long > #endif #ifdef HAVE_MIC , Array< short, Devices::MIC, short >, Array< int, Devices::MIC, short >, Array< long, Devices::MIC, short >, Array< float, Devices::MIC, short >, Array< double, Devices::MIC, short >, // TODO: MyData does not work on MIC // Array< MyData, Devices::MIC, short >, Array< short, Devices::MIC, int >, Array< int, Devices::MIC, int >, Array< long, Devices::MIC, int >, Array< float, Devices::MIC, int >, Array< double, Devices::MIC, int >, // TODO: MyData does not work on MIC // Array< MyData, Devices::MIC, int >, Array< short, Devices::MIC, long >, Array< int, Devices::MIC, long >, Array< long, Devices::MIC, long >, Array< float, Devices::MIC, long >, Array< double, Devices::MIC, long > // TODO: MyData does not work on MIC // Array< MyData, Devices::MIC, long > #endif >; TYPED_TEST_CASE( ArrayTest, ArrayTypes ); Loading Loading @@ -287,6 +310,14 @@ void testArrayElementwiseAccess( Array< Element, Devices::Cuda, Index >&& u ) #endif } template< typename Element, typename Index > void testArrayElementwiseAccess( Array< Element, Devices::MIC, Index >&& u ) { #ifdef HAVE_MIC // TODO #endif } TYPED_TEST( ArrayTest, elementwiseAccess ) { using ArrayType = typename TestFixture::ArrayType; Loading
src/UnitTests/Containers/VectorTest.h +15 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,21 @@ using VectorTypes = ::testing::Types< Vector< float, Devices::Cuda, long >, Vector< double, Devices::Cuda, long > #endif #ifdef HAVE_MIC , Vector< int, Devices::MIC, short >, Vector< long, Devices::MIC, short >, Vector< float, Devices::MIC, short >, Vector< double, Devices::MIC, short >, Vector< int, Devices::MIC, int >, Vector< long, Devices::MIC, int >, Vector< float, Devices::MIC, int >, Vector< double, Devices::MIC, int >, Vector< int, Devices::MIC, long >, Vector< long, Devices::MIC, long >, Vector< float, Devices::MIC, long >, Vector< double, Devices::MIC, long > #endif >; TYPED_TEST_CASE( VectorTest, VectorTypes ); Loading