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

Description

Bitwise shift functions on Vec's.

See also
Masked Bitwise Shifts

Functions

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::sll (const Vec< T, SIMD_WIDTH > &a, const uint8_t count)
 Shifts the elements of a Vec left by a variable number of bits while shifting in zeros.
 
template<size_t COUNT, typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::slli (const Vec< T, SIMD_WIDTH > &a)
 Shifts the elements of a Vec left by a constant number of bits while shifting in zeros.
 
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::sra (const Vec< T, SIMD_WIDTH > &a, const uint8_t count)
 Shifts the elements of a Vec right by a variable number of bits while shifting in the sign bit.
 
template<size_t COUNT, typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::srai (const Vec< T, SIMD_WIDTH > &a)
 Shifts the elements of a Vec right by a constant number of bits while shifting in the sign bit.
 
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::srl (const Vec< T, SIMD_WIDTH > &a, const uint8_t count)
 Shifts the elements of a Vec right by a variable number of bits while shifting in zeros.
 
template<size_t COUNT, typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::srli (const Vec< T, SIMD_WIDTH > &a)
 Shifts the elements of a Vec right by a constant number of bits while shifting in zeros.
 

Function Documentation

◆ sll()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::sll ( const Vec< T, SIMD_WIDTH > & a,
const uint8_t count )
inlinestatic

Shifts the elements of a Vec left by a variable number of bits while shifting in zeros.

See also
slli()
Parameters
aVec to shift
countnumber of bits to shift by
Returns
Vec containing the shifted elements of the input Vec

◆ slli()

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

Shifts the elements of a Vec left by a constant number of bits while shifting in zeros.

See also
sll()
Template Parameters
COUNTnumber of bits to shift by
Parameters
aVec to shift
Returns
Vec containing the shifted elements of the input Vec

◆ sra()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::sra ( const Vec< T, SIMD_WIDTH > & a,
const uint8_t count )
inlinestatic

Shifts the elements of a Vec right by a variable number of bits while shifting in the sign bit.

See also
srai()
Parameters
aVec to shift
countnumber of bits to shift by
Returns
Vec containing the shifted elements of the input Vec

◆ srai()

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

Shifts the elements of a Vec right by a constant number of bits while shifting in the sign bit.

See also
sra()
Template Parameters
COUNTnumber of bits to shift by
Parameters
aVec to shift
Returns
Vec containing the shifted elements of the input Vec

◆ srl()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::srl ( const Vec< T, SIMD_WIDTH > & a,
const uint8_t count )
inlinestatic

Shifts the elements of a Vec right by a variable number of bits while shifting in zeros.

See also
srli()
Parameters
aVec to shift
countnumber of bits to shift by
Returns
Vec containing the shifted elements of the input Vec

◆ srli()

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

Shifts the elements of a Vec right by a constant number of bits while shifting in zeros.

See also
srl()
Template Parameters
COUNTnumber of bits to shift by
Parameters
aVec to shift
Returns
Vec containing the shifted elements of the input Vec