7#ifndef __PHOENIX_TEMPLATE_ALLOC_IMPL_H__
8#define __PHOENIX_TEMPLATE_ALLOC_IMPL_H__
19 size_t padding = regVecSizeType - (nbElement % regVecSizeType);
20 if(padding == regVecSizeType){padding = 0lu;}
42 if(alignementInByte == 0lu){
52 if(alignementInByte == 0lu){
57 size_t nbCol(tabDim[nbDim - 1lu]);
58 size_t nbRow(fullSize/nbCol);
74 bool isAligned(
false);
AllocMode
Allocation mode of the PTensor.
size_t phoenix_alignement_type()
Get the alignement by respect to the type.
size_t phoenix_alignement_in_bytes()
Get the alignement in bytes by respect to the type.
void * phoenix_allocAlignedTab(size_t sizeOfVectorInBytes, size_t alignementInBytes)
Alloc an aligned vector.
size_t phoenix_getFullSize(const size_t *tabDim, size_t nbDim)
Get the fulle size of the tensor.
size_t phoenix_getPadding(size_t nbElement)
Get the padding with respect to the number of elements of the tables.
void phoenix_newAlignedTab(T *&alignedPtr, size_t sizeOfVectorInT)
Alloc an aligned vector.
T * phoenix_template_alloc_aligned1d(size_t nbValue)
Do a template allcoation of a type.
T * phoenix_template_alloc(size_t &padding, bool &isAligned, Phoenix::AllocMode mode, const size_t *tabDim, size_t nbDim)
Allocate a tensor.
bool phoenix_checkIsAligned(const T *ptr)
Check if the given pointer is aligned.