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. | |
Static Public Member Functions | |
static bool | isVectorAligned (const T *restrict pointer) |
Test if a pointer to T is simd aligned. | |
static diffType | offsetToAlignment (const T *restrict pointer) |
Return number of elements from pointer to next simd width boundary. | |
static size_t | paddedLength (size_t length) |
Return a length which has been padded to next larger even SIMD width. | |
Static Public Attributes | |
static const size_t | byteWidth |
SIMD width of type in bytes (sizeof(T) if simd width does not fit a T) | |
static const size_t | vecWidth |
SIMD width of types in number of elements. | |
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.
References restrict.
Referenced by blitz::Array< T_numtype, N_rank >::isVectorAligned(), blitz::isVectorAligned(), and blitz::MemoryBlockReference< P_numtype >::isVectorAligned().
|
inlinestatic |
|
inlinestatic |
Return a length which has been padded to next larger even SIMD width.
References vecWidth.
|
static |
SIMD width of type in bytes (sizeof(T) if simd width does not fit a T)
Referenced by offsetToAlignment().
|
static |
SIMD width of types in number of elements.
Referenced by blitz::FastTM2IteratorBase< P_numtype, N_rows, N_columns, const TinyMatrix< P_numtype, N_rows, N_columns > & >::isVectorAligned(), blitz::FastTV2IteratorBase< P_numtype, N_length, const TinyVector< P_numtype, N_length > & >::isVectorAligned(), blitz::TinyMatrix< T_numtype, N_rows, N_columns >::isVectorAligned(), blitz::TinyVector< int, N_rank >::isVectorAligned(), blitz::MemoryBlock< P_type >::MemoryBlock(), and paddedLength().