build fix for clang (#159)

Signed-off-by: raver119@gmail.com <raver119@gmail.com>
master
raver119 2020-01-03 15:17:06 +03:00 committed by GitHub
parent fbf7c9d38b
commit ac0d249f07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,7 @@ ELSE()
endif()
ENDIF()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
# using Clang
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_TUNE}")

View File

@ -3107,7 +3107,6 @@ const char* lastErrorMessage() {
int binaryLevel() {
#ifdef CPU_FEATURES
#if defined(F_X64)
return 1;
#elif defined (F_AVX2)

View File

@ -60,6 +60,10 @@ public:
}
};
TEST_F(PlaygroundTests, test_avx) {
nd4j_printf("Optimal level: %i; Binary level: %i;\n", ::optimalLevel(), ::binaryLevel());
}
/*
TEST_F(PlaygroundTests, test_s_0) {
auto x = NDArrayFactory::create<float>('c', {32, 112, 112, 16});