![]() |
PhoenixHardware
0.2.0
Tools to get hardware information
|
#include "phoenix_template_alloc.h"
Go to the source code of this file.
Functions | |
template<typename T> | |
bool | phoenix_checkIsAligned (const T *ptr) |
Check if the given pointer is aligned. | |
template<typename T> | |
size_t | phoenix_getPadding (size_t nbElement) |
Get the padding with respect to the number of elements of the tables. | |
template<typename T> | |
void | phoenix_newAlignedTab (T *&alignedPtr, size_t sizeOfVectorInT) |
Alloc an aligned vector. | |
template<typename T> | |
T * | phoenix_template_alloc (size_t &padding, bool &isAligned, Phoenix::AllocMode mode, const size_t *tabDim, size_t nbDim) |
Allocate a tensor. | |
template<typename T> | |
T * | phoenix_template_alloc_aligned1d (size_t nbValue) |
Do a template allcoation of a type. | |
bool phoenix_checkIsAligned | ( | const T * | ptr | ) |
Check if the given pointer is aligned.
ptr | : pointer |
Definition at line 101 of file phoenix_template_alloc_impl.h.
References phoenix_alignement_in_bytes().
size_t phoenix_getPadding | ( | size_t | nbElement | ) |
Get the padding with respect to the number of elements of the tables.
nbElement | : number of elements of the table |
Definition at line 17 of file phoenix_template_alloc_impl.h.
References phoenix_alignement_type().
Referenced by phoenix_template_alloc().
void phoenix_newAlignedTab | ( | T *& | alignedPtr, |
size_t | sizeOfVectorInT ) |
Alloc an aligned vector.
alignedPtr | : aligned pointor |
sizeOfVectorInT | : size of the vector we want to allocate |
alignementInBytes | : alignement of the vector we want to allocate, in bytes |
Usage : T* alignedVector = NULL; newAlignedTab(alignedVector, sizeOfVectorInT); ... Using of alignedVector pointor ... freeAlignedVector(alignedVector);
Definition at line 92 of file phoenix_template_alloc_impl.h.
References phoenix_alignement_in_bytes(), and phoenix_allocAlignedTab().
T * phoenix_template_alloc | ( | size_t & | padding, |
bool & | isAligned, | ||
Phoenix::AllocMode | mode, | ||
const size_t * | tabDim, | ||
size_t | nbDim ) |
Allocate a tensor.
[out] | padding | : padding of the allocated tensor if it needs one |
[out] | isAligned | : true if the allocated tensor is aligned, false otherwise |
mode | : allocation mode | |
tabDim | : table of the dimensions of the tensor | |
nbDim | : number of dimensions of the tensor |
Definition at line 33 of file phoenix_template_alloc_impl.h.
References Phoenix::ALIGNED, Phoenix::NONE, Phoenix::PADDING, phoenix_alignement_in_bytes(), phoenix_allocAlignedTab(), phoenix_getFullSize(), and phoenix_getPadding().
Referenced by phoenix_template_alloc_aligned1d().
T * phoenix_template_alloc_aligned1d | ( | size_t | nbValue | ) |
Do a template allcoation of a type.
nbValue | : number of value to be allcoated |
Definition at line 72 of file phoenix_template_alloc_impl.h.
References Phoenix::ALIGNED, and phoenix_template_alloc().
Referenced by PAlignedAllocator< T >::allocate().