Low-Level Abstraction of Memory Access
llama::SimdTraits< Simd, SFINAE > Struct Template Reference

#include <Simd.hpp>

Detailed Description

template<typename Simd, typename SFINAE = void>
struct llama::SimdTraits< Simd, SFINAE >

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:

  • an alias value_type to indicate the element type of the Simd.
  • a static constexpr size_t lanes variable holding the number of SIMD lanes of the Simd.
  • a static auto loadUnalinged(const value_type* mem) -> Simd function, loading a Simd from the given memory address.
  • a static void storeUnaligned(Simd simd, value_type* mem) function, storing the given Simd to a given memory address.
  • a 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).
  • a 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).

Definition at line 32 of file Simd.hpp.


The documentation for this struct was generated from the following file: