Ensure correct namespace in simd subsystem

This commit is contained in:
Jack Andersen 2019-02-17 19:47:20 -10:00
parent 31b437e784
commit 9b4434e6e0
2 changed files with 14 additions and 14 deletions

View File

@ -659,7 +659,7 @@ public:
#pragma GCC system_header
#endif
namespace athena::_simd {
namespace zeus::_simd {
enum class _StorageKind {
_Scalar,
@ -837,8 +837,8 @@ constexpr bool __vectorizable() {
!std::is_same<_Tp, bool>::value;
}
} // namespace athena::_simd
namespace athena::_simd::simd_abi {
} // namespace zeus::_simd
namespace zeus::_simd::simd_abi {
using scalar = __simd_abi<_StorageKind::_Scalar, 1>;
@ -851,8 +851,8 @@ inline constexpr size_t max_fixed_size = 32;
template <class _Tp>
using compatible = fixed_size<16 / sizeof(_Tp)>;
} // namespace athena::_simd::simd_abi
namespace athena::_simd {
} // namespace zeus::_simd::simd_abi
namespace zeus::_simd {
template <class _Tp, class _Abi = simd_abi::compatible<_Tp>>
class simd;
@ -1528,4 +1528,4 @@ public:
void __set(size_t __index, bool __val) noexcept { __storage_.set(__index, __val); }
};
} // namespace athena::_simd
} // namespace zeus::_simd

View File

@ -1,10 +1,10 @@
#pragma once
#define _ATHENA_SIMD_INCLUDED
#define _ZEUS_SIMD_INCLUDED
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif
namespace athena::_simd {
namespace zeus::_simd {
using namespace std;
}
#include "parallelism_v2_simd.hpp"
@ -18,13 +18,13 @@ using namespace std;
#else
namespace simd_abi {
template <typename T>
struct athena_native {};
struct zeus_native {};
template <>
struct athena_native<float> {
struct zeus_native<float> {
using type = fixed_size<4>;
};
template <>
struct athena_native<double> {
struct zeus_native<double> {
using type = fixed_size<4>;
};
} // namespace simd_abi
@ -32,11 +32,11 @@ struct athena_native<double> {
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
namespace athena {
namespace zeus {
template <typename T>
using simd = _simd::simd<T, typename _simd::simd_abi::athena_native<T>::type>;
using simd = _simd::simd<T, typename _simd::simd_abi::zeus_native<T>::type>;
template <typename T>
using simd_values = _simd::simd_data<simd<T>>;
using simd_floats = simd_values<float>;
using simd_doubles = simd_values<double>;
} // namespace athena
} // namespace zeus