From 38da40d13b9ab4340367f612bf3d857d5d39a1ae Mon Sep 17 00:00:00 2001 From: Andrew Gozillon Date: Tue, 2 Jul 2019 20:50:15 -0700 Subject: [PATCH] [SYCL][Runtime] Inversing the ARM Defines to fix Intel CPU Made a mistake and also pull requested before all the tests were complete... the #if defines were the incorrect way around for throwing errors. So it would throw runtime errors on intel rather than for arm! --- sycl/source/detail/platform_util.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sycl/source/detail/platform_util.cpp b/sycl/source/detail/platform_util.cpp index 14bf610e0f19..dd9cb6f1bc3d 100644 --- a/sycl/source/detail/platform_util.cpp +++ b/sycl/source/detail/platform_util.cpp @@ -39,7 +39,7 @@ uint32_t PlatformUtil::getMaxClockFrequency() { throw runtime_error( "max_clock_frequency parameter is not supported for host device"); -#if !defined(__arm__) || !defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__) throw runtime_error( "max_clock_frequency is not supported for ARM architectures"); #endif @@ -76,7 +76,7 @@ uint32_t PlatformUtil::getMaxClockFrequency() { } uint32_t PlatformUtil::getMemCacheLineSize() { -#if !defined(__arm__) || !defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__) throw runtime_error( "global_mem_cache_line_size is not supported for ARM architectures"); #endif @@ -87,7 +87,7 @@ uint32_t PlatformUtil::getMemCacheLineSize() { } uint64_t PlatformUtil::getMemCacheSize() { -#if !defined(__arm__) || !defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__) throw runtime_error( "global_mem_cache_size is not supported for ARM architectures"); #endif @@ -98,7 +98,7 @@ uint64_t PlatformUtil::getMemCacheSize() { } uint32_t PlatformUtil::getNativeVectorWidth(PlatformUtil::TypeIndex TIndex) { -#if !defined(__arm__) || !defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__) throw runtime_error( "native_vector_width_* is not supported for ARM architectures"); #endif