TMCSMPArray< T > Class Template Reference
[MCCore]
List of all members.
Detailed Description
template<class T>
class TMCSMPArray< T >
TMCSMPArray is a way to get TMCArray in a SMP context wihtout allocating memory each time.
It behaves like a stack. So a function that uses an SMPArray can be recursively called.
Usage:
TMCSMPArrayRequest< _TYPE_ > request;
TMCArray< _TYPE_ >& myArray = fArrayVolumeRec.GetArray( request );
Prelated class: TMCArray
Constructor & Destructor Documentation
Construt a dynamic array (TMCArray) SMP-friendly. That is to say, the array will not be allocated on the stack. But all the Threads will have their own.
Destructor. Remove the TLS. Note: the memory used by the arrays is freed when the thread dies.
Member Function Documentation
template<class T >
void TMCSMPArray< T >::FreeArray |
( |
void ** |
privData |
) |
[inline, static, protected] |
This is to remove the all allocated memory when the thread die
This is the way to get a reference to an TMCArray
- Parameters:
-
| request | is a class instanciated on the stack to help for asking and destructing the array. Just create it like that : TMCSMPArrayRequest request; or TMCSMPArrayRequest request(size_of_the_wanted_array); |
template<class T >
void TMCSMPArray< T >::PopArray |
( |
|
) |
[inline, protected] |
Pop the last gotten array
template<class T >
void TMCSMPArray< T >::SetAverageElemSpace |
( |
int32 |
elemSpace |
) |
[inline] |
[Optional] Can be used to optimize memory allocation by setting directly the the size of the array.
- Note:
- Call it before asking the first Array.
template<class T >
void TMCSMPArray< T >::SetStackDepth |
( |
int32 |
depth |
) |
[inline] |
[Optional] Can be used to optimize memory allocation by setting directly the number of wanted recursion.
- Note:
- Call it before asking the first Array.
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following file: