Struct ArrayDataOperationUtilities<DIM, TYPE, OP> provides generic looping operations for all array-based patch data types. The operations are templated on spatial dimension, data type, and the operation that will be performed on individual array elements in the innermost loop.
More...
#include <ArrayDataOperationUtilities.h>
|
| static void | doArrayDataOperationOnBox (ArrayData< DIM, TYPE > &dst, const ArrayData< DIM, TYPE > &src, const hier::Box< DIM > &opbox, const hier::IntVector< DIM > &src_shift, int dst_start_depth, int src_start_depth, int num_depth, const OP &op) |
| |
| static void | doArrayDataBufferOperationOnBox (const ArrayData< DIM, TYPE > &arraydata, const TYPE *buffer, const hier::Box< DIM > &opbox, bool src_is_buffer, const OP &op) |
| |
template<int DIM, class TYPE, class OP>
class SAMRAI::pdat::ArrayDataOperationUtilities< DIM, TYPE, OP >
- See also
- ArrayData
◆ ArrayDataOperationUtilities() [1/2]
template<int DIM, class TYPE , class OP >
◆ ~ArrayDataOperationUtilities()
template<int DIM, class TYPE , class OP >
◆ ArrayDataOperationUtilities() [2/2]
template<int DIM, class TYPE , class OP >
◆ doArrayDataOperationOnBox()
template<int DIM, class TYPE , class OP >
| static void SAMRAI::pdat::ArrayDataOperationUtilities< DIM, TYPE, OP >::doArrayDataOperationOnBox |
( |
ArrayData< DIM, TYPE > & |
dst, |
|
|
const ArrayData< DIM, TYPE > & |
src, |
|
|
const hier::Box< DIM > & |
opbox, |
|
|
const hier::IntVector< DIM > & |
src_shift, |
|
|
int |
dst_start_depth, |
|
|
int |
src_start_depth, |
|
|
int |
num_depth, |
|
|
const OP & |
op |
|
) |
| |
|
static |
Perform operation on a subset of data components of source and destination array data objects and put results in destination array data object.
- Parameters
-
| dst | Reference to destination array data object. |
| src | Const reference to source array data object. |
| opbox | Const reference to Box indicating index space region of operation. |
| src_shift | Const reference to IntVector indicating shift required to put source index space region into destination index space region. |
| dst_start_depth | Integer specifying starting depth component of operation in destination array. |
| src_start_depth | Integer specifying starting depth component of operation in source array. |
| num_depth | Integer number of depth components on which to perform operation. |
| op | Const reference to object that performs operations on individual data array elements. |
When assertion checking is active, assertion will result when any of the depth-related arguments are out-of-bounds for the given array data objects.
◆ doArrayDataBufferOperationOnBox()
template<int DIM, class TYPE , class OP >
Perform operation on all data components of array data object and corresponding buffer data, putting results in either the array data object or buffer.
- Parameters
-
| arraydata | Const reference to array data object. |
| buffer | Const pointer to first element in buffer. |
| opbox | Const reference to Box indicating operation region in index space of array data object. |
| src_is_buffer | Boolean value indicating whether buffer is source data for operation; if true results will be placed in array data object, otherwise results will go in buffer. |
| op | Const reference to object that performs operations on individual data array elements. |
When assertion checking is active, assertion will result when buffer pointer is null or operation box is not the same as the array data box.
◆ operator=()
template<int DIM, class TYPE , class OP >
The documentation for this class was generated from the following file: