Skip to content

Commit

Permalink
Remove enclosing namespace in trait specialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Sep 20, 2022
1 parent 6443b14 commit e1e3ebe
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions tests/simd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,23 @@

namespace stdx = std::experimental;

namespace llama
template<typename T, typename Abi>
struct llama::SimdTraits<stdx::simd<T, Abi>>
{
template<typename T, typename Abi>
struct SimdTraits<stdx::simd<T, Abi>>
{
using value_type = T;
using value_type = T;

inline static constexpr std::size_t lanes = stdx::simd<T, Abi>::size();
inline static constexpr std::size_t lanes = stdx::simd<T, Abi>::size();

static LLAMA_FORCE_INLINE auto loadUnaligned(const value_type* mem) -> stdx::simd<T, Abi>
{
return {mem, stdx::element_aligned};
}
static LLAMA_FORCE_INLINE auto loadUnaligned(const value_type* mem) -> stdx::simd<T, Abi>
{
return {mem, stdx::element_aligned};
}

static LLAMA_FORCE_INLINE void storeUnaligned(stdx::simd<T, Abi> simd, value_type* mem)
{
simd.copy_to(mem, stdx::element_aligned);
}
};
} // namespace llama
static LLAMA_FORCE_INLINE void storeUnaligned(stdx::simd<T, Abi> simd, value_type* mem)
{
simd.copy_to(mem, stdx::element_aligned);
}
};

namespace
{
Expand Down

0 comments on commit e1e3ebe

Please sign in to comment.