CSol
Public Member Functions | Protected Attributes | List of all members
Grid< T > Class Template Reference

Grid class for one, two or three dimensional data. More...

#include <csol_grid.h>

Inheritance diagram for Grid< T >:
[legend]

Public Member Functions

 Grid ()
 
 Grid (const Grid &r)
 
 ~Grid ()
 
T & at (uintptr_t idx)
 Returns value at Grid memory index. More...
 
void clear ()
 Clear data. More...
 
Grid< T > & composite (Grid< T > &r)
 Composite operator. More...
 
bool contains_nullValue ()
 Null value check. More...
 
int countUniqueValues ()
 Count unique values operator. More...
 
cl::Buffer createOpenCLBuffer (cl::Context &context)
 OpenCL: Create OpenCL buffer from Grid. More...
 
double Get_ex ()
 Get end coordinate in x direction. More...
 
double Get_ey ()
 Get end coordinate in y direction. More...
 
double Get_ez ()
 Get end coordinate in z direction. More...
 
double Get_h ()
 Get average spacing over all dimesions. More...
 
double Get_hx ()
 Get spacing in x dimension. More...
 
double Get_hy ()
 Get spacing in y dimension. More...
 
double Get_hz ()
 Get spacing in z dimension. More...
 
uintptr_t get_index (int i, int j)
 Returns a two-dimensional index into Grid memory for location [i, j]. More...
 
long long Get_n ()
 Get total number of cells. More...
 
Get_nullValue ()
 Gets the null value for the grid. More...
 
int Get_nx ()
 Get number of cells in x dimension. More...
 
int Get_ny ()
 Get number of cells in y dimension. More...
 
int Get_nz ()
 Get number of cells in z dimension. More...
 
double Get_ox ()
 Get start coordinate in x direction. More...
 
double Get_oy ()
 Get start coordinate in y direction. More...
 
double Get_oz ()
 Get start coordinate in z direction. More...
 
bool has_nullValue ()
 Check if null value is set. More...
 
bool hasEqualDimensionsSpacing (const Grid &r)
 Check for same dimensions and spacing. More...
 
bool Init (int snx, int sny, int snz, double shx, double shy, double shz, double sox, double soy, double soz)
 Grid initialisation. More...
 
bool Init (Grid &r)
 Grid initialisation. More...
 
bool Init1D (int snx, double shx, double sox=0.0)
 One-dimensional grid initialisation. More...
 
bool Init2D (int snx, int sny, double shx, double shy, double sox=0.0, double soy=0.0)
 Two-dimensional grid initialisation. More...
 
bool Init3D (int snx, int sny, int snz, double shx, double shy, double shz, double sox=0.0, double soy=0.0, double soz=0.0)
 Three-dimensional grid initialisation. More...
 
double integral ()
 Integration operator. More...
 
double integralHeaviside ()
 Heaviside integration operator. More...
 
double integralPerimeter ()
 Perimeter integration operator. More...
 
bool is_1D () const
 Check if Grid is one-dimensional. More...
 
bool is_2D () const
 Check if Grid is two-dimensional. More...
 
bool is_3D () const
 Check if Grid is three-dimensional. More...
 
bool isInitialised ()
 Check for initialisation. More...
 
max ()
 Maximum operator. More...
 
Grid< T > & max (const Grid< T > &r)
 Maximum operator. More...
 
double mean ()
 Mean operator. More...
 
min ()
 Minimum operator. More...
 
Grid< T > & min (const Grid< T > &r)
 Minimum operator. More...
 
void negate ()
 Negation operator. More...
 
bool operator!= (const Grid< T > &r)
 Checks whether grids have same size, spacing and boundary conditions. More...
 
T & operator() (int i)
 Returns value from one-dimensional Grid. More...
 
T & operator() (int i, int j)
 Returns value from two-dimensional Grid. More...
 
T & operator() (int i, int j, int k)
 Returns value from three-dimensional Grid. More...
 
Grid< T > & operator*= (Grid< T > &r)
 Multiplication operator. More...
 
Grid< T > & operator*= (const REAL r)
 Addition operator with constant. More...
 
Grid< T > & operator+= (Grid< T > &r)
 Addition operator. More...
 
Grid< T > & operator+= (const REAL r)
 Addition operator with constant. More...
 
Grid< T > & operator-= (Grid< T > &r)
 Subtraction operator. More...
 
Grid< T > & operator-= (const REAL r)
 Addition operator with constant. More...
 
Grid< T > & operator/= (Grid< T > &r)
 Division operator. More...
 
Grid< T > & operator/= (const REAL r)
 Addition operator with constant. More...
 
Grid< T > & operator= (const T r)
 Set grid to constant value. More...
 
Grid< T > & operator= (const Grid< T > &r)
 Copy grid. More...
 
T * pointer ()
 Handle to Grid memory pointer. More...
 
bool Read (QDataStream &dataStream, int &frame, double &time, QString &errMsg, bool skipRead=false)
 Read Grid from binary filestream. More...
 
void readFrom2DBufferRegion (cl::CommandQueue &queue, cl::Buffer &buffer, unsigned int bRowLength, unsigned int bOrigin_x=0, unsigned int bOrigin_y=0)
 OpenCL: Reads an OpenCL buffer to a two-dimensional Grid. More...
 
void readFrom3DBufferRegion (cl::CommandQueue &queue, const cl::Buffer &buffer, unsigned int bLength_x, unsigned int bLength_y, unsigned int bOrigin_x=0, unsigned int bOrigin_y=0, unsigned int bOrigin_z=0)
 OpenCL: Reads an OpenCL buffer to a three-dimensional Grid. More...
 
void readFromBuffer (cl::CommandQueue &queue, const cl::Buffer &buffer)
 OpenCL: Reads an OpenCL buffer into Grid. More...
 
void replace_nullValue (T r)
 Null value replacement. More...
 
void Reset ()
 Reset Grid to zero value. More...
 
void Reset_nullValue ()
 Resets the null value for the grid. More...
 
double rms ()
 Root mean square operator. More...
 
bool sample_2D_Bicubic (Grid< T > &s, T fillValue)
 Bicubic sample operator. More...
 
template<typename S >
bool sample_2D_Bicubic (DataExecution::ObjectArray &arr, T fillValue)
 Bicubic sample operator for an array of Grids. More...
 
bool sample_2D_Bilinear (Grid< T > &s, T fillValue)
 Bilinear sample operator. More...
 
template<typename S >
bool sample_2D_Bilinear (DataExecution::ObjectArray &arr, T fillValue)
 Bilinear sample operator for an array of Grids. More...
 
bool sample_2D_Nearest (Grid< T > &s, T fillValue)
 Nearest-neighbour sample operator. More...
 
template<typename S >
bool sample_2D_Nearest (DataExecution::ObjectArray &arr, T fillValue)
 Nearest-neighbour sample operator for an array of Grids. More...
 
void Set_interpolationHint (int interpolationHint_)
 Interpolation hint. More...
 
void Set_nullValue (T null_)
 Sets the null value for the grid. More...
 
void Set_ox (double sox)
 Set origin in x direction. More...
 
void Set_oy (double soy)
 Set origin in y direction. More...
 
void Set_oz (double soz)
 Set origin in z direction. More...
 
double stdev ()
 Stdev operator. More...
 
sum ()
 Sum operator. More...
 
Grid< T > & transform2d (Grid2dTransform &t)
 Apply two-dimensional transform. More...
 
bool valueAtBicubic (double wx, double wy, T &v)
 Returns bicubic interpolated value from two-dimensional grid at position in world coordinates. More...
 
bool valueAtBilinear (double wx, T &v)
 Returns bilinear interpolated value from one-dimensional grid at position in world coordinates. More...
 
bool valueAtBilinear (double wx, double wy, T &v)
 Returns bilinear interpolated value from two-dimensional grid at position in world coordinates. More...
 
bool valueAtBilinear (double wx, double wy, double wz, T &v)
 Returns bilinear interpolated value from three-dimensional grid at position in world coordinates. More...
 
bool valueAtNearest (double wx, T &v)
 Returns nearest-neighbour value from one-dimensional grid at position in world coordinates. More...
 
bool valueAtNearest (double wx, double wy, T &v)
 Returns nearest-neighbour value from two-dimensional grid at position in world coordinates. More...
 
bool valueAtNearest (double wx, double wy, double wz, T &v)
 Returns nearest-neighbour value from three-dimensional grid at position in world coordinates. More...
 
double variance ()
 Variance operator. More...
 
bool Write (QDataStream &dataStream, int frame, double time)
 Write Grid to binary filestream. More...
 
void writeTo2DBufferRegion (cl::CommandQueue &queue, cl::Buffer &buffer, unsigned int bRowLength, unsigned int bOrigin_x=0, unsigned int bOrigin_y=0)
 OpenCL: Writes a two-dimensional Grid to a region of an OpenCL buffer. More...
 
void writeTo3DBufferRegion (cl::CommandQueue &queue, cl::Buffer &buffer, unsigned int bLength_x, unsigned int bLength_y, unsigned int bOrigin_x=0, unsigned int bOrigin_y=0, unsigned int bOrigin_z=0)
 OpenCL: Writes a three-dimensional Grid to a region of an OpenCL buffer. More...
 
void writeToBuffer (cl::CommandQueue &queue, cl::Buffer &buffer)
 OpenCL: Writes Grid to an OpenCL buffer. More...
 

Protected Attributes

double ex
 End coordinate in x dimension. More...
 
double ey
 End coordinate in y dimension. More...
 
double ez
 End coordinate in z dimension. More...
 
double h
 Average spacing in each dimension. More...
 
double hx
 Spacing in x dimension. More...
 
double hy
 Spacing in y dimension. More...
 
double hz
 Spacing in z dimension. More...
 
int interpolationHint
 Hint whether to use fastest or best algorithm when interpolating values. More...
 
long long n
 Total number of grid cells. More...
 
nullValue
 Null value used to mark non-data points. More...
 
int nx
 Number of cells in x dimension. More...
 
int ny
 Number of cells in y dimension. More...
 
int nz
 Number of cells in z dimension. More...
 
double ox
 Start coordinate in x dimension. More...
 
double oy
 Start coordinate in y dimension. More...
 
double oz
 Start coordinate in z dimension. More...
 
T * v
 Pointer to data values. More...
 
zeroValue
 Zero value used to reset grid. More...
 

Detailed Description

template<typename T>
class CSIRO::CSol::Grid< T >

This is the base data class for CSol Cartesian grid-based operations The grid holds a handle to a memory array as well as dimensions, cell sizes and an offset value from the origin (0, 0, 0) grid cell. A separate boundary condition is stored for each grid boundary. Grids also store a zero value and an optional null value. The existance of a null value is determined by null being different to the zero value for the grid. This null value is usually set to the negative maximum representable range, e.g for REAL grids it is -FLT_MAX. Null values, if they exist, are propagated in arithmetic grid operations.

Constructor & Destructor Documentation

Grid ( )
inline
~Grid ( )
inline
Grid ( const Grid< T > &  r)
inline

Member Function Documentation

T& at ( uintptr_t  idx)
inline
Parameters
idxmemory index.
void clear ( )
inline
Grid<T>& composite ( Grid< T > &  r)
inline

Composites Grid with a second Grid, resizing to maximum limits of both grids

Parameters
rcomposition Grid.
bool contains_nullValue ( )
inline

This scans the grid for any null values.

int countUniqueValues ( )
inline
Returns
Count of the unique values in the grid.
cl::Buffer createOpenCLBuffer ( cl::Context &  context)
inline
Parameters
contextthe OpenCL context to use.
Returns
An OpenCL buffer containing the grid data.
double Get_ex ( )
inline
double Get_ey ( )
inline
double Get_ez ( )
inline
double Get_h ( )
inline
double Get_hx ( )
inline
double Get_hy ( )
inline
double Get_hz ( )
inline
uintptr_t get_index ( int  i,
int  j 
)
inline
Parameters
ix cell index.
jy cell index.
long long Get_n ( )
inline
T Get_nullValue ( )
inline
int Get_nx ( )
inline
int Get_ny ( )
inline
int Get_nz ( )
inline
double Get_ox ( )
inline
double Get_oy ( )
inline
double Get_oz ( )
inline
bool has_nullValue ( )
inline

The existance of a null value is determined by null being different to the zero value for the grid.

bool hasEqualDimensionsSpacing ( const Grid< T > &  r)
inline
bool Init ( int  snx,
int  sny,
int  snz,
double  shx,
double  shy,
double  shz,
double  sox,
double  soy,
double  soz 
)
inline

Initialises Grid, creating memory buffer and internal grid variables.

Parameters
snxthe number of cells in the x dimension.
snythe number of cells in the y dimension.
snzthe number of cells in the z dimension.
shxthe spacing in the x direction.
shythe spacing in the y direction.
shzthe spacing in the z direction.
soxthe origin in the x direction.
soythe origin in the y direction.
sozthe origin in the z direction.
Returns
true if successfully initialised, false otherwise.
bool Init ( Grid< T > &  r)
inline

Initialises Grid, creating memory buffer and internal grid variables.

Parameters
rGrid to copy dimensions, spacing, offset, boundary conditions and null value from.
Returns
true if successfully initialised, false otherwise.
bool Init1D ( int  snx,
double  shx,
double  sox = 0.0 
)
inline

Initialises Grid, creating memory buffer and internal grid variables.

Parameters
snxthe number of cells in the x dimension.
shxthe spacing in the x direction.
soxthe origin in the x direction.
Returns
true if successfully initialised, false otherwise.
bool Init2D ( int  snx,
int  sny,
double  shx,
double  shy,
double  sox = 0.0,
double  soy = 0.0 
)
inline

Initialises Grid, creating memory buffer and internal grid variables.

Parameters
snxthe number of cells in the x dimension.
snythe number of cells in the y dimension.
shxthe spacing in the x direction.
shythe spacing in the y direction.
soxthe origin in the x direction.
soythe origin in the y direction.
Returns
true if successfully initialised, false otherwise.
bool Init3D ( int  snx,
int  sny,
int  snz,
double  shx,
double  shy,
double  shz,
double  sox = 0.0,
double  soy = 0.0,
double  soz = 0.0 
)
inline

Initialises Grid, creating memory buffer and internal grid variables.

Parameters
snxthe number of cells in the x dimension.
snythe number of cells in the y dimension.
snzthe number of cells in the z dimension.
shxthe spacing in the x direction.
shythe spacing in the y direction.
shzthe spacing in the z direction.
soxthe origin in the x direction.
soythe origin in the y direction.
sozthe origin in the z direction.
Returns
true if successfully initialised, false otherwise.
double integral ( )
inline
Returns
integral: sum of values multipled by element volume over entire grid.
double integralHeaviside ( )
inline
Returns
integral: sum of Heaviside(value) multipled by element volume over entire grid.
double integralPerimeter ( )
inline
Returns
integral: sum of Dirac delta(value)|grad(value)| multipled by element volume over entire grid.
bool is_1D ( ) const
inline
bool is_2D ( ) const
inline
bool is_3D ( ) const
inline
bool isInitialised ( )
inline
T max ( )
inline
Returns
maximum value in grid.
Grid<T>& max ( const Grid< T > &  r)
inline

Compares Grid to r and replaces any cells where r is greater than the cell value with the cell value in r

Parameters
rcomparison Grid.
double mean ( )
inline
Returns
mean value over entire grid.
T min ( )
inline
Returns
minimum value in grid.
Grid<T>& min ( const Grid< T > &  r)
inline

Compares Grid to r and replaces any cells where r is less than the cell value with the cell value in r

Parameters
rcomparison Grid.
void negate ( )
inline

Replaces each Grid cell value with -Grid cell value.

bool operator!= ( const Grid< T > &  r)
inline
T& operator() ( int  i)
inline
Parameters
ix cell index.
T& operator() ( int  i,
int  j 
)
inline
Parameters
ix cell index.
jy cell index.
T& operator() ( int  i,
int  j,
int  k 
)
inline
Parameters
ix cell index.
jy cell index.
kz cell index.
Grid<T>& operator*= ( Grid< T > &  r)
inline

Performs cell by cell *= operation over Grid. Grids can be different dimensions, but this will result in a much slower operation.

Parameters
rGrid.
Grid<T>& operator*= ( const REAL  r)
inline

Multiples each Grid cell by r.

Parameters
rvalue.
Grid<T>& operator+= ( Grid< T > &  r)
inline

Performs cell by cell += operation over Grid. Grids can be different dimensions, but this will result in a much slower operation.

Parameters
rGrid.
Grid<T>& operator+= ( const REAL  r)
inline

Adds the value r to each Grid cell.

Parameters
rvalue.
Grid<T>& operator-= ( Grid< T > &  r)
inline

Performs cell by cell -= operation over Grid. Grids can be different dimensions, but this will result in a much slower operation.

Parameters
rGrid.
Grid<T>& operator-= ( const REAL  r)
inline

Subtracts the value r from each Grid cell.

Parameters
rvalue.
Grid<T>& operator/= ( Grid< T > &  r)
inline

Performs cell by cell /= operation over Grid. Grids can be different dimensions, but this will result in a much slower operation.

Parameters
rGrid.
Grid<T>& operator/= ( const REAL  r)
inline

Divides each Grid cell by r.

Parameters
rvalue.
Grid<T>& operator= ( const T  r)
inline
Parameters
rvalue.
Grid<T>& operator= ( const Grid< T > &  r)
inline

The Grid must have the same dimensions as the Grid to be copied.

Parameters
rGrid.
T* pointer ( )
inline
bool Read ( QDataStream &  dataStream,
int &  frame,
double &  time,
QString &  errMsg,
bool  skipRead = false 
)
inline
Parameters
dataStreamstream to read binary data from.
frameoptional frame number.
timeoptional frame time value.
errMsgerror message on unsuccessfully read.
Returns
true if file successfully read, false otherwise.
void readFrom2DBufferRegion ( cl::CommandQueue &  queue,
cl::Buffer &  buffer,
unsigned int  bRowLength,
unsigned int  bOrigin_x = 0,
unsigned int  bOrigin_y = 0 
)
inline

Reads an OpenCL buffer to the Grid to with an optional offset into the OpenCL buffer. The row length (x-dimension) of the OpenCL buffer must be passed as an argument.

Parameters
queuethe OpenCL queue to use.
bufferthe OpenCL buffer to read from.
bRowLengththe OpenCL buffer row length.
bOrigin_xthe x starting position to copy from within the OpenCL buffer (default 0).
bOrigin_ythe y starting position to copy from within the OpenCL buffer (default 0).
void readFrom3DBufferRegion ( cl::CommandQueue &  queue,
const cl::Buffer &  buffer,
unsigned int  bLength_x,
unsigned int  bLength_y,
unsigned int  bOrigin_x = 0,
unsigned int  bOrigin_y = 0,
unsigned int  bOrigin_z = 0 
)
inline

Reads an OpenCL buffer to the Grid to with an optional offset into the OpenCL buffer. The row length (x-dimension) of the OpenCL buffer must be passed as an argument.

Parameters
queuethe OpenCL queue to use.
bufferthe OpenCL buffer to read from.
bLength_xthe OpenCL buffer x length.
bLength_ythe OpenCL buffer y length.
bOrigin_xthe x starting position to copy from within the OpenCL buffer (default 0).
bOrigin_ythe y starting position to copy from within the OpenCL buffer (default 0).
bOrigin_zthe z starting position to copy from within the OpenCL buffer (default 0).
void readFromBuffer ( cl::CommandQueue &  queue,
const cl::Buffer &  buffer 
)
inline
Parameters
queuethe OpenCL queue to use.
bufferthe OpenCL buffer to read from.
void replace_nullValue ( r)
inline

This scans the grid for any null values, replacing them with a given value.

void Reset ( )
inline
void Reset_nullValue ( )
inline
double rms ( )
inline
Returns
rms value over entire grid.
bool sample_2D_Bicubic ( Grid< T > &  s,
fillValue 
)
inline

Fills Grid with bicubic sampled values from Grid s. If the position at s is out of bounds or a noData value, the fillValue is used.

Parameters
ssample Grid.
fillValuevalue for out of bounds or no data.
bool sample_2D_Bicubic ( DataExecution::ObjectArray &  arr,
fillValue 
)
inline

Fills Grid with nearest-neighbour sampled values from Grid array arr. If the position at s is out of bounds or a noData value, the fillValue is used.

Parameters
arrGrid array, with Grids of type S.
fillValuevalue for out of bounds or no data.
bool sample_2D_Bilinear ( Grid< T > &  s,
fillValue 
)
inline

Fills Grid with bilinear sampled values from Grid s. If the position at s is out of bounds or a noData value, the fillValue is used.

Parameters
ssample Grid.
fillValuevalue for out of bounds or no data.
bool sample_2D_Bilinear ( DataExecution::ObjectArray &  arr,
fillValue 
)
inline

Fills Grid with nearest-neighbour sampled values from Grid array arr. If the position at s is out of bounds or a noData value, the fillValue is used.

Parameters
arrGrid array, with Grids of type S.
fillValuevalue for out of bounds or no data.
bool sample_2D_Nearest ( Grid< T > &  s,
fillValue 
)
inline

Fills Grid with nearest-neighbour sampled values from Grid s. If the position at s is out of bounds or a noData value, the fillValue is used.

Parameters
ssample Grid.
fillValuevalue for out of bounds or no data.
bool sample_2D_Nearest ( DataExecution::ObjectArray &  arr,
fillValue 
)
inline

Fills Grid with nearest-neighbour sampled values from Grid array arr. If the position at s is out of bounds or a noData value, the fillValue is used.

Parameters
arrGrid array, with Grids of type S.
fillValuevalue for out of bounds or no data.
void Set_interpolationHint ( int  interpolationHint_)
inline

This can be set to InterpolationHint::Fastest (use bilinear) or InterpolationHint::Best (use bicubic, if available).

void Set_nullValue ( null_)
inline
void Set_ox ( double  sox)
inline
void Set_oy ( double  soy)
inline
void Set_oz ( double  soz)
inline
double stdev ( )
inline
Returns
standard deviation over entire grid
T sum ( )
inline
Returns
Sum of entire grid.
Grid<T>& transform2d ( Grid2dTransform t)
inline
Parameters
ttwo-dimensional trasform.
bool valueAtBicubic ( double  wx,
double  wy,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[in]wyy-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
bool valueAtBilinear ( double  wx,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
bool valueAtBilinear ( double  wx,
double  wy,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[in]wyy-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
bool valueAtBilinear ( double  wx,
double  wy,
double  wz,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[in]wyy-position in world coordinates.
[in]wzz-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
bool valueAtNearest ( double  wx,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
bool valueAtNearest ( double  wx,
double  wy,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[in]wyy-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
bool valueAtNearest ( double  wx,
double  wy,
double  wz,
T &  v 
)
inline
Parameters
[in]wxx-position in world coordinates.
[in]wyy-position in world coordinates.
[in]wzz-position in world coordinates.
[out]vvalue at position, if position is valid (v is unchanged otherwise).
Returns
true if requested position is inside Grid, false otherwise.
double variance ( )
inline
Returns
variance over entire grid
bool Write ( QDataStream &  dataStream,
int  frame,
double  time 
)
inline
Parameters
dataStreamstream to write binary data to.
frameoptional frame number.
timeoptional frame time value.
Returns
true if file successfully written, false otherwise.
void writeTo2DBufferRegion ( cl::CommandQueue &  queue,
cl::Buffer &  buffer,
unsigned int  bRowLength,
unsigned int  bOrigin_x = 0,
unsigned int  bOrigin_y = 0 
)
inline

Writes the Grid to an OpenCL buffer with an optional offset into the OpenCL buffer. The row length (x-dimension) of the OpenCL buffer must be passed as an argument.

Parameters
queuethe OpenCL queue to use.
bufferthe OpenCL buffer to write to.
bRowLengththe OpenCL buffer row length.
bOrigin_xthe x starting position to copy to within the OpenCL buffer (default 0).
bOrigin_ythe y starting position to copy to within the OpenCL buffer (default 0).
void writeTo3DBufferRegion ( cl::CommandQueue &  queue,
cl::Buffer &  buffer,
unsigned int  bLength_x,
unsigned int  bLength_y,
unsigned int  bOrigin_x = 0,
unsigned int  bOrigin_y = 0,
unsigned int  bOrigin_z = 0 
)
inline

Writes the Grid to an OpenCL buffer with an optional offset into the OpenCL buffer. The row length (x-dimension) of the OpenCL buffer must be passed as an argument.

Parameters
queuethe OpenCL queue to use.
bufferthe OpenCL buffer to write to.
bLength_xthe OpenCL buffer x length.
bLength_ythe OpenCL buffer y length.
bOrigin_xthe x starting position to copy to within the OpenCL buffer (default 0).
bOrigin_ythe y starting position to copy to within the OpenCL buffer (default 0).
bOrigin_zthe z starting position to copy from within the OpenCL buffer (default 0).
void writeToBuffer ( cl::CommandQueue &  queue,
cl::Buffer &  buffer 
)
inline
Parameters
queuethe OpenCL queue to use.
bufferthe OpenCL buffer to write to.

Member Data Documentation

double ex
protected
double ey
protected
double ez
protected
double h
protected
double hx
protected
double hy
protected
double hz
protected
int interpolationHint
protected
long long n
protected
T nullValue
protected
int nx
protected
int ny
protected
int nz
protected
double ox
protected
double oy
protected
double oz
protected
T* v
protected
T zeroValue
protected