blitz
Version 1.0.2
|
Helper class that defines the width of the simd instructions for a given type. More...
#include <simdtypes.h>
Public Types | |
typedef TinyVector< T, vecWidth > | vecType |
TinyVector type of T that fills the simd width. More... | |
Static Public Member Functions | |
static bool | isVectorAligned (const T *restrict pointer) |
Test if a pointer to T is simd aligned. More... | |
static diffType | offsetToAlignment (const T *restrict pointer) |
Return number of elements from pointer to next simd width boundary. More... | |
static size_t | paddedLength (size_t length) |
Return a length which has been padded to next larger even SIMD width. More... | |
Static Public Attributes | |
static const size_t | byteWidth |
SIMD width of type in bytes (sizeof(T) if simd width does not fit a T) More... | |
static const size_t | vecWidth |
SIMD width of types in number of elements. More... | |
Helper class that defines the width of the simd instructions for a given type.
It also defines a type that is a TinyVector of the appropriate length to fill the simd width. This is used as the "evaluation type" to facilitate automatic vectorization. Because TinyVectors are aligned on BZ_SIMD_WIDTH, an array of vecType will be dense in memory, which is required to reinterpret an array of T to an array of vecType.
typedef TinyVector<T, vecWidth> blitz::simdTypes< T >::vecType |
TinyVector type of T that fills the simd width.
|
inlinestatic |
Test if a pointer to T is simd aligned.
Referenced by blitz::isVectorAligned(), blitz::MemoryBlockReference< P_numtype >::isVectorAligned(), and blitz::Array< P_numtype, 1 >::isVectorAligned().
|
inlinestatic |
Return number of elements from pointer to next simd width boundary.
This is used to figure out how many scalar operations need to be done before beginning vectorized operations.
|
inlinestatic |
Return a length which has been padded to next larger even SIMD width.
|
static |
SIMD width of type in bytes (sizeof(T) if simd width does not fit a T)
|
static |
SIMD width of types in number of elements.