T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
Reordering

Description

Functions on Vec's for reordering elements and other related functions.

Subgroups

 Swizzling
 Swizzle/deinterleave functions on Vec's.
 
 Elementwise Shifting
 Functions for shifting a Vec elementwise.
 
 Extraction
 Functions for extracting elements or lanes from Vec's.
 
 Zip and Unpack
 Zip, unzip and unpack functions.
 

Functions

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::reverse (const Vec< T, SIMD_WIDTH > &a)
 Reverses the order of the elements of a Vec.
 
template<typename T , size_t SIMD_WIDTH>
static void simd::transpose (const Vec< T, SIMD_WIDTH > inRows[Vec< T, SIMD_WIDTH >::elems], Vec< T, SIMD_WIDTH > outRows[Vec< T, SIMD_WIDTH >::elems])
 Transposes a matrix held in an array of Vec's.
 
template<typename T , size_t SIMD_WIDTH>
static void simd::transpose (Vec< T, SIMD_WIDTH > rows[Vec< T, SIMD_WIDTH >::elems])
 Transposes a matrix held in an array of Vec's.
 

Function Documentation

◆ reverse()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::reverse ( const Vec< T, SIMD_WIDTH > & a)
static

Reverses the order of the elements of a Vec.

Parameters
aVec to reverse
Returns
Vec containing the elements of the input Vec in reverse order

◆ transpose() [1/2]

template<typename T , size_t SIMD_WIDTH>
static void simd::transpose ( const Vec< T, SIMD_WIDTH > inRows[Vec< T, SIMD_WIDTH >::elems],
Vec< T, SIMD_WIDTH > outRows[Vec< T, SIMD_WIDTH >::elems] )
inlinestatic

Transposes a matrix held in an array of Vec's.

The matrix must be given as an array of Vec's which are the rows of the matrix. The number of rows must be equal to the number of elements in a Vec (SIMD_WIDTH/sizeof(T)), i.e. the matrix must be square. Overlap between input and output rows is not permitted.

Parameters
[in]inRowsarray of Vec's holding the matrix to be transposed
[out]outRowsarray of Vec's where the transposed matrix is stored

◆ transpose() [2/2]

template<typename T , size_t SIMD_WIDTH>
static void simd::transpose ( Vec< T, SIMD_WIDTH > rows[Vec< T, SIMD_WIDTH >::elems])
inlinestatic

Transposes a matrix held in an array of Vec's.

The matrix must be given as an array of Vec's which are the rows of the matrix. The number of rows must be equal to the number of elements in a Vec (SIMD_WIDTH/sizeof(T)), i.e. the matrix must be square.

Parameters
[in,out]rowsarray of Vec's holding the matrix to be transposed