![]() |
|
PhoenixHardware
0.2.0
Tools to get hardware information
|
#include <iostream>#include "phoenix_alignement_type.h"#include "phoenix_allocAlignedVector.h"#include "phoenix_template_alloc_impl.h"
Include dependency graph for phoenix_template_alloc.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | Phoenix |
Macros | |
| #define | PHOENIX_AUTO_ALIGNED Phoenix::ALIGNED |
| #define | PHOENIX_AUTO_PADDING Phoenix::PADDING |
Enumerations | |
| enum | Phoenix::AllocMode { Phoenix::NONE = 0 , Phoenix::ALIGNED = 1 , Phoenix::PADDING = 2 } |
| Allocation mode of the PTensor. More... | |
Functions | |
| void | phoenix_copyShape (size_t *&destTabDim, const size_t *tabDim, size_t nbDim) |
| Copy a shape of a tensor into an other. | |
| void | phoenix_copyShape (size_t *&destTabDim, size_t &destNbDim, const size_t *tabDim, size_t nbDim) |
| Copy a shape of a tensor into an other. | |
| size_t | phoenix_getFullSize (const size_t *tabDim, size_t nbDim) |
| Get the fulle size of the tensor. | |
| template<typename T> | |
| size_t | phoenix_getPadding (size_t nbElement) |
| Get the padding with respect to the number of elements of the tables. | |
| bool | phoenix_isSameShape (const size_t *tabDim1, size_t nbDim1, const size_t *tabDim2, size_t nbDim2) |
| Say if two shapes are the same or not. | |
| 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. | |
| #define PHOENIX_AUTO_ALIGNED Phoenix::ALIGNED |
Definition at line 27 of file phoenix_template_alloc.h.
| #define PHOENIX_AUTO_PADDING Phoenix::PADDING |
Definition at line 28 of file phoenix_template_alloc.h.
| void phoenix_copyShape | ( | size_t *& | destTabDim, |
| const size_t * | tabDim, | ||
| size_t | nbDim ) |
Copy a shape of a tensor into an other.
| [out] | destTabDim | : copy of the table of the size of each dimension |
| tabDim | : table of the size of each dimension | |
| nbDim | : number of dimensions |
Definition at line 28 of file phoenix_template_alloc.cpp.
Referenced by phoenix_copyShape().
Here is the caller graph for this function:| void phoenix_copyShape | ( | size_t *& | destTabDim, |
| size_t & | destNbDim, | ||
| const size_t * | tabDim, | ||
| size_t | nbDim ) |
Copy a shape of a tensor into an other.
| [out] | destTabDim | : copy of the table of the size of each dimension |
| [out] | destNbDim | : copy of the number of dimensions |
| tabDim | : table of the size of each dimension | |
| nbDim | : number of dimensions |
Definition at line 47 of file phoenix_template_alloc.cpp.
References phoenix_copyShape().
Here is the call graph for this function:| size_t phoenix_getFullSize | ( | const size_t * | tabDim, |
| size_t | nbDim ) |
Get the fulle size of the tensor.
| tabDim | : table of the dimensions of the tensor |
| nbDim | : number of dimensions of the tensor |
Definition at line 15 of file phoenix_template_alloc.cpp.
Referenced by phoenix_template_alloc().
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function:| bool phoenix_isSameShape | ( | const size_t * | tabDim1, |
| size_t | nbDim1, | ||
| const size_t * | tabDim2, | ||
| size_t | nbDim2 ) |
Say if two shapes are the same or not.
| tabDim1 | : table of the size of each dimension |
| nbDim1 | : number of dimensions |
| tabDim2 | : table of the size of each dimension |
| nbDim2 | : number of dimensions |
Definition at line 59 of file phoenix_template_alloc.cpp.
| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function: