kokkos / simd-math

Library for length agnostic SIMD intrinsic support and the corresponding math operations
Other
20 stars 10 forks source link

Fix compile error on clang #35

Open keichi opened 2 years ago

keichi commented 2 years ago

Hi, this fixes the following compile error on clang:

/Users/keichi/Projects/kEDM/src/thirdparty/simd/vector_size.hpp:149:12: error: an attribute list cannot appear here
  explicit SIMD_ALWAYS_INLINE inline simd(const native_type& value):m_value(value) {}
           ^~~~~~~~~~~~~~~~~~
/Users/keichi/Projects/kEDM/src/thirdparty/simd/simd_common.hpp:52:28: note: expanded from macro 'SIMD_ALWAYS_INLINE'
#define SIMD_ALWAYS_INLINE [[gnu::always_inline]]

According to the C++ specs, attributes need to be placed before the function specifiers (c.f. https://omegaup.com/docs/cpp/en/cpp/language/function.html#Function_definition)