diff --git a/doc/install.rst b/doc/install.rst index c7c7cd01db674c63de3619dc97391f45f59008ed..9bf9915e01b5502345c91556f1ba7663086056f2 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -287,16 +287,17 @@ Vectorization ------------- Explicit vectorization of computational kernels can be enabled in Arbor by setting the -``ARB_VECTORIZE`` CMake flag: +``ARB_VECTORIZE`` CMake flag. This option is typically used in conjunction with the +``ARB_ARCH`` option to specify the target architecture: without SIMD support in Arbor +for the architecture, enabling ``ARB_VECTORIZE`` will lead to a compilation error. .. code-block:: bash - cmake -DARB_VECTORIZE=ON + cmake -DARB_VECTORIZE=ON -DARB_ARCH=native With this flag set, the library will use architecture-specific vectorization intrinsics to implement these kernels. Arbor currently has vectorization support for x86 architectures -with AVX, AVX2 or AVX512 ISA extensions. Enabling the `ARB_VECTORIZE` option for a target -without support in Arbor will give a compilation error. +with AVX, AVX2 or AVX512 ISA extensions. .. _gpu: diff --git a/include/arbor/simd/simd.hpp b/include/arbor/simd/simd.hpp index fff3ff08746588039dca43ff2b2d81b1cba04456..4a319216543370ccb8487630c406e06cf1cb67ac 100644 --- a/include/arbor/simd/simd.hpp +++ b/include/arbor/simd/simd.hpp @@ -56,6 +56,8 @@ namespace simd_detail { template <typename Impl> struct simd_impl { + static_assert(!std::is_void<Impl>::value, "no such SIMD ABI supported"); + // Type aliases: // // scalar_type internal value type in one simd lane, diff --git a/include/arbor/util/compat.hpp b/include/arbor/util/compat.hpp index 46eacb0651f07dad141543c37e5ae79a6eabee32..531f7f73a31f181afc9ac2f0a5198e8ce30539af 100644 --- a/include/arbor/util/compat.hpp +++ b/include/arbor/util/compat.hpp @@ -42,7 +42,7 @@ inline void compiler_barrier_if_icc_leq(unsigned ver) { // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85597 template <typename T> -#if defined(__GNUC__) &&\ +#if !defined(__clang__) && defined(__GNUC__) &&\ ( __GNUC__<6 ||\ (__GNUC__==6 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 401) ||\ (__GNUC__==7 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 301) ||\