UninitializedVector.h File Reference

UninitializedVector stores an array of objects of type 'T' of length 'Dim' in a way that avoids running the default constructors on the objects unless the 'initialize' method is called. More...

#include "Utilities/PAssert.h"
#include <new>

Include dependency graph for UninitializedVector.h:


Classes

class  UninitializedVector< T, Dim, Elem >
 UninitializedVector<T,Dim> stores internally an array of object of type 'Elem', of length sizeof(T) * Dim / sizeof(Elem), where T and Elem are some arbitrary types. More...
struct  InitializeUninitializedVector< T, I >
 InitializeUninitializedVector is a simple functor with an N-D and 1-D version used for template meta-programs to initialize the first 'Dim' elems of the data in the given UninitializedVector. More...
struct  InitializeUninitializedVector< T, 0 >
 zeroth-index specialization of InitializeUninitializedVector More...

Detailed Description

UninitializedVector stores an array of objects of type 'T' of length 'Dim' in a way that avoids running the default constructors on the objects unless the 'initialize' method is called.

DO NOT USE FOR NEW CODE AS THIS POSSIBLY BREAKS ALIASING RULES OR AT LEAST HINDERS OPTIMIZATION.

It can help avoid unwanted for-loops over array elements which are normally generated in order to run their default constructors, even when the length of the array is known at compile time. It can be used to unroll the loop over the array elements to run their constructors, in order to initialize a whole array of objects with a non-default constructor in one call.


Generated on Wed Mar 16 06:19:28 2011 for FreePOOMA by  doxygen 1.5.9