Class portable_vec¶
class portable_vec<T, N> simd¶
template <typename T, size_t N>
struct alignas(next_poweroftwo(sizeof(T)) * next_poweroftwo(N)) portable_vec { … } A portable vector type with fixed size and layout compatible with vec<T, N> .
This structure is designed to be *architecture-agnostic*, meaning it can be safely passed between translation units (TUs) compiled for different architectures.The structure enforces alignment to the next power of two of both the element type size and the number of elements, ensuring compatibility and performance.
| T | The scalar element type. |
| N | The number of elements in the vector (must be between 1 and 1024). |
function shape() ¶
static constexpr vec_shape<T, N> shape() noexcept { … } Fully qualified name: kfr::portable_vec<T, N>::shape()
Declared at simd/vec.hpp:113
constructor portable_vec<T, N>() ¶
constexpr portable_vec() = default Fully qualified name: kfr::portable_vec<T, N>::portable_vec<T, N>()
Declared at simd/vec.hpp:115
constructor portable_vec<T, N>(T) ¶
constexpr portable_vec(T value) : portable_vec(csizeseq<N>, value) { … } Fully qualified name: kfr::portable_vec<T, N>::portable_vec<T, N>(T)
Declared at simd/vec.hpp:117
function portable_vec<T, N>(T, T, Ts...) ¶
template <typename... Ts, size_t NN = N>
requires(NN >= 2)
constexpr portable_vec(T v1, T v2, Ts... args) : elem { … } Fully qualified name: kfr::portable_vec<T, N>::portable_vec<T, N>(T, T, Ts...)
Declared at simd/vec.hpp:121
typedef value_type ¶
using value_type = T Fully qualified name: kfr::portable_vec<T, N>::value_type
Declared at simd/vec.hpp:130
function size() ¶
constexpr static size_t size() noexcept { … } Fully qualified name: kfr::portable_vec<T, N>::size()
Declared at simd/vec.hpp:132
variable elem ¶
T elem[N] Fully qualified name: kfr::portable_vec<T, N>::elem
Declared at simd/vec.hpp:134
function operator[](size_t) ¶
constexpr T operator[](size_t index) const { … } Fully qualified name: kfr::portable_vec<T, N>::operator[](size_t)
Declared at simd/vec.hpp:136
function operator[](size_t) ¶
constexpr T& operator[](size_t index) { … } Fully qualified name: kfr::portable_vec<T, N>::operator[](size_t)
Declared at simd/vec.hpp:137
function front() ¶
constexpr T front() const { … } Fully qualified name: kfr::portable_vec<T, N>::front()
Declared at simd/vec.hpp:138
function front() ¶
constexpr T& front() { … } Fully qualified name: kfr::portable_vec<T, N>::front()
Declared at simd/vec.hpp:139
function back() ¶
constexpr T back() const { … } Fully qualified name: kfr::portable_vec<T, N>::back()
Declared at simd/vec.hpp:140
function back() ¶
constexpr T& back() { … } Fully qualified name: kfr::portable_vec<T, N>::back()
Declared at simd/vec.hpp:141
function operator==(const portable_vec<T, N> &) ¶
constexpr bool operator==(const portable_vec& other) const noexcept = default Fully qualified name: kfr::portable_vec<T, N>::operator==(const portable_vec<T, N> &)
Declared at simd/vec.hpp:143
Fully qualified name: kfr::portable_vec<T, N>
Declared at simd/vec.hpp:111