9template<
class T,
int N>
class TinyVector;
36 BZ_SIMD_WIDTH>
sizeof(T) ? BZ_SIMD_WIDTH : sizeof(T);
40 BZ_SIMD_WIDTH>
sizeof(T) ? BZ_SIMD_WIDTH/
sizeof(T) : 1;
47 {
return (uintptr_t)((
void*)pointer) % BZ_SIMD_WIDTH == 0; }
53 const uintptr_t m = (uintptr_t)((
void*)pointer) & (
byteWidth-1);
The TinyVector class is a one-dimensional, fixed length vector that implements the blitz expression t...
Definition tinyvec2.h:73
Helper class that defines the width of the simd instructions for a given type.
Definition simdtypes.h:31
static size_t paddedLength(size_t length)
Return a length which has been padded to next larger even SIMD width.
Definition simdtypes.h:59
static const size_t byteWidth
SIMD width of type in bytes (sizeof(T) if simd width does not fit a T)
Definition simdtypes.h:35
TinyVector< T, vecWidth > vecType
TinyVector type of T that fills the simd width.
Definition simdtypes.h:43
static diffType offsetToAlignment(const T *restrict pointer)
Return number of elements from pointer to next simd width boundary.
Definition simdtypes.h:52
static const size_t vecWidth
SIMD width of types in number of elements.
Definition simdtypes.h:39
static bool isVectorAligned(const T *restrict pointer)
Test if a pointer to T is simd aligned.
Definition simdtypes.h:46
#define restrict
Definition compiler.h:95
Definition array-impl.h:66
ptrdiff_t diffType
Definition blitz.h:111
bool isVectorAligned(const T *restrict pointer)
General function just forwards to the simdTypes class.
Definition simdtypes.h:67