Generic multiplet object with overloaded arithmetic.
More...
#include <VectorField.h>
|
| ScalarFieldMultiplet (const Tptr *in=0) |
| Construct multiplet from an array of data sets (or default: initialize to null) More...
|
|
| ScalarFieldMultiplet (const GridInfo &gInfo, bool onGpu=false) |
| Construct a multiplet with allocated data. More...
|
|
Tptr & | operator[] (int i) |
| Retrieve a reference to the i'th component (no bound checks)
|
|
const Tptr & | operator[] (int i) const |
| Retrieve a const reference to the i'th component (no bound checks)
|
|
ScalarFieldMultiplet | clone () const |
| Clone data (note assignment will be reference for the actual data)
|
|
std::vector< typename T::DataType * > | data () |
| Get the component data pointers in an std::vector.
|
|
std::vector< const typename T::DataType * > | data () const |
| Get the component data pointers in an std::vector (const version)
|
|
std::vector< const typename T::DataType * > | const_data () const |
| Get the component data pointers in an std::vector (const version)
|
|
std::vector< typename T::DataType * > | dataGpu () |
| Get the component GPU data pointers in an std::vector.
|
|
std::vector< const typename T::DataType * > | dataGpu () const |
| Get the component GPU data pointers in an std::vector (const version)
|
|
std::vector< const typename T::DataType * > | const_dataGpu () const |
| Get the component GPU data pointers in an std::vector (const version)
|
|
std::vector< typename T::DataType * > | dataPref () |
|
std::vector< const typename T::DataType * > | dataPref () const |
|
std::vector< const typename T::DataType * > | const_dataPref () const |
|
| operator bool () const |
| Cast to bool: true if all components are non-null.
|
|
void | loadFromFile (const char *fileName) |
| Load all components from a single binary file.
|
|
void | saveToFile (const char *fileName) const |
| Save all components from a single binary file.
|
|
template<class T, int N>
struct ScalarFieldMultiplet< T, N >
Generic multiplet object with overloaded arithmetic.
- Template Parameters
-
◆ ScalarFieldMultiplet() [1/2]
template<class T , int N>
Construct multiplet from an array of data sets (or default: initialize to null)
- Parameters
-
in | Pointer to array, or null to initialize each component to null |
◆ ScalarFieldMultiplet() [2/2]
template<class T , int N>
Construct a multiplet with allocated data.
- Parameters
-
gInfo | Simulation grid info / memory manager to use to allocate the data |
onGpu | Boolean flag to indicate whether memory is on GPU |
The documentation for this struct was generated from the following file: