GCC simd fix

This commit is contained in:
Jack Andersen 2019-02-15 15:30:59 -10:00
parent af7d73f9bd
commit c1a1c6e754
2 changed files with 10 additions and 2 deletions

View File

@ -1280,9 +1280,10 @@ public:
// generator constructor
template <class _Generator,
int = typename std::enable_if<__can_generate<_Generator>(std::make_index_sequence<size()>()), int>::type()>
int = typename std::enable_if<__can_generate<_Generator>(
std::make_index_sequence<simd_size<_Tp, _Abi>::value>()), int>::type()>
explicit simd(_Generator&& __g) {
__generator_init(std::forward<_Generator>(__g), std::make_index_sequence<size()>());
__generator_init(std::forward<_Generator>(__g), std::make_index_sequence<simd_size<_Tp, _Abi>::value>());
}
// load constructor

View File

@ -1,5 +1,9 @@
#pragma once
#define _ATHENA_SIMD_INCLUDED
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif
namespace athena::_simd {
using namespace std;
}
@ -25,6 +29,9 @@ struct athena_native<double> {
};
} // namespace simd_abi
#endif
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
namespace athena {
template <typename T>
using simd = _simd::simd<T, typename _simd::simd_abi::athena_native<T>::type>;