#include <ArrayPolicies.hpp>
Static Public Member Functions |
static void | Initialize (ObjectType *data, unsigned int itemsToCreate) |
static void | Initialize (ObjectType *data, unsigned int itemsToCreate, const ObjectType &initValue) |
static void | Initialize (ObjectType *data, unsigned int itemsToCreate, const ObjectType *initValue) |
Detailed Description
template<typename ObjectType>
class Nektar::ArrayInitializationPolicy< ObjectType, typename boost::enable_if< boost::is_fundamental< ObjectType > >::type >
Definition at line 54 of file ArrayPolicies.hpp.
Member Function Documentation
template<typename ObjectType >
static void Nektar::ArrayInitializationPolicy< ObjectType, typename boost::enable_if< boost::is_fundamental< ObjectType > >::type >::Initialize |
( |
ObjectType * |
data, |
|
|
unsigned int |
itemsToCreate |
|
) |
| |
|
inlinestatic |
template<typename ObjectType >
static void Nektar::ArrayInitializationPolicy< ObjectType, typename boost::enable_if< boost::is_fundamental< ObjectType > >::type >::Initialize |
( |
ObjectType * |
data, |
|
|
unsigned int |
itemsToCreate, |
|
|
const ObjectType & |
initValue |
|
) |
| |
|
inlinestatic |
Definition at line 62 of file ArrayPolicies.hpp.
{
std::fill_n(data, itemsToCreate, initValue);
}
template<typename ObjectType >
static void Nektar::ArrayInitializationPolicy< ObjectType, typename boost::enable_if< boost::is_fundamental< ObjectType > >::type >::Initialize |
( |
ObjectType * |
data, |
|
|
unsigned int |
itemsToCreate, |
|
|
const ObjectType * |
initValue |
|
) |
| |
|
inlinestatic |
Definition at line 67 of file ArrayPolicies.hpp.
{
std::copy(initValue, initValue + itemsToCreate, data);
}