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.
Referenced by blitz::isVectorAligned(), blitz::Array< P_numtype, N_rank >::isVectorAligned(), and blitz::MemoryBlockReference< P_type >::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.
References blitz::simdTypes< T >::byteWidth.
|
inlinestatic |
Return a length which has been padded to next larger even SIMD width.
References blitz::simdTypes< T >::vecWidth.
|
static |
SIMD width of type in bytes (sizeof(T) if simd width does not fit a T)
Referenced by blitz::simdTypes< T >::offsetToAlignment().
|
static |
SIMD width of types in number of elements.
Referenced by blitz::simdTypes< T >::paddedLength().