T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
simd::Vec< T, SIMD_WIDTH > Class Template Reference

SIMD vector class, holds multiple elements of the same type. More...

Detailed Description

template<typename T, size_t SIMD_WIDTH>
class simd::Vec< T, SIMD_WIDTH >

SIMD vector class, holds multiple elements of the same type.

Template Parameters
Ttype of the vector elements
SIMD_WIDTHnumber of bytes in the SIMD vector

Public Types

using allocator
 Allocator to be used with std::vector.
 

Static Public Attributes

static constexpr size_t bytes
 Number of bytes in the vector.
 
static constexpr size_t elements
 Number of elements in the vector.
 
static constexpr size_t elems
 Number of elements in the vector. Alias for elements.
 

Member Typedef Documentation

◆ allocator

template<typename T , size_t SIMD_WIDTH>
using simd::Vec< T, SIMD_WIDTH >::allocator

Allocator to be used with std::vector.

This allocator is to be used when creating a std::vector of Vec in the following way:

std::vector<Vec<T, SIMD_WIDTH>, typename Vec<T, SIMD_WIDTH>::allocator> v;
Aligned allocator.
Definition alloc.H:132