#include <dec2000.h>
Public Member Functions | |
virtual const char * | getName ()=0 |
virtual void | getInfo (enum RawDataType::RawDataType &dataType, int &rank)=0 |
virtual void | getData (const int[]&lowerBoundsC, const int[]&upperBoundsC, const int[]&stride, const int[]&leadingDimensions, const void *&data)=0 |
virtual enum RawDataType::RawDataType | getType ()=0 |
virtual const int | getRank ()=0 |
virtual const int[] | getLeadingDimensions ()=0 |
virtual const void * | getData ()=0 |
virtual LocalArrayWindow * | createWindow (const int[]&lowerBoundsC, const int[]&upperBoundsC, const int[]&stride)=0 |
Example: LocalArray Window *awin; // assumed 2D enum RawDataType::RawDataType dataType; int rank; int *lbc, *ubc, *stride, *ld; void * array; awin->getInfo(dataType, rank); awin->getData(lbc, ubc, stride, ld, array); for (int j = lbc[1]; j <= ubc[1] ; j += stride[1]) { for (int i = lbc[0]; i <= ubc[0] ; i += stride[0]) { x += array[(j*ld[0])+ i]; } }
virtual const char* LocalArrayWindow::getName | ( | ) | [pure virtual] |
Get the name of this object.
virtual void LocalArrayWindow::getInfo | ( | enum RawDataType::RawDataType & | dataType, | |
int & | rank | |||
) | [pure virtual] |
Basic info lookup, in case we want a copy version of getData. LocalArray Window *awin; // assumed 2D enum RawDataType::RawDataType dataType; int rank; int *lbc, *ubc, *stride, *ld; void * array; awin->getInfo(dataType, rank); awin->getData(lbc, ubc, stride, ld, array); for (int j = lbc[1]; j <= ubc[1] ; j += stride[1]) { for (int i = lbc[0]; i <= ubc[0] ; i += stride[0]) { x += array[(j*ld[0])+ i]; } }
rank | 1d,2d,3d array. |
virtual void LocalArrayWindow::getData | ( | const int &[] | lowerBoundsC, | |
const int &[] | upperBoundsC, | |||
const int &[] | stride, | |||
const int &[] | leadingDimensions, | |||
const void *& | data | |||
) | [pure virtual] |
Get the info needed for iteration. We may want locking(read/write),release. We assume Babel will solve the index from 1 problem in the FORTRAN binding.
lowerBoundsC | 0-indexed array of lower bounds. | |
upperBoundsC | 0-indexed array of upper bounds. | |
stride | step in each dimension. | |
leadingDimensions | size of actual array in each dimension. | |
array | the same pointer regardless of window lowerbounds. |
virtual enum RawDataType::RawDataType LocalArrayWindow::getType | ( | ) | [pure virtual] |
piecewise... redundant function
virtual const int LocalArrayWindow::getRank | ( | ) | [pure virtual] |
piecewise... redundant function
virtual const int [] LocalArrayWindow::getLeadingDimensions | ( | ) | [pure virtual] |
piecewise... redundant function
virtual const void* LocalArrayWindow::getData | ( | ) | [pure virtual] |
piecewise... redundant function
virtual LocalArrayWindow* LocalArrayWindow::createWindow | ( | const int &[] | lowerBoundsC, | |
const int &[] | upperBoundsC, | |||
const int &[] | stride | |||
) | [pure virtual] |
Get another subset view on this same data.