![]() |
Low-Level Abstraction of Memory Access
|
#include <Simd.hpp>
Traits of a specific Simd implementation. Please specialize this template for the SIMD types you are going to use in your program. Each specialization SimdTraits<Simd> must provide:
value_type
to indicate the element type of the Simd.static constexpr size_t lanes
variable holding the number of SIMD lanes of the Simd.static auto loadUnalinged(const value_type* mem) -> Simd
function, loading a Simd from the given memory address.static void storeUnaligned(Simd simd, value_type* mem)
function, storing the given Simd to a given memory address.static auto gather(const value_type* mem, std::array<int, lanes> indices) -> Simd
function, gathering values into a Simd from the memory addresses identified by mem + indices * sizeof(value_type).static void scatter(Simd simd, value_type* mem, std::array<int, lanes> indices)
function, scattering the values from a Simd to the memory addresses identified by mem + indices * sizeof(value_type).