28 #ifndef ADIOS2STMANCOLUMN_H
29 #define ADIOS2STMANCOLUMN_H
31 #include <unordered_map>
50 virtual void create(std::shared_ptr<adios2::Engine> aAdiosEngine,
146 std::shared_ptr<adios2::IO> aAdiosIO)
151 void create(std::shared_ptr<adios2::Engine> aAdiosEngine,
char aOpenMode)
167 else if(aOpenMode ==
'r')
169 size_t cacheSize = std::accumulate(
173 std::multiplies<size_t>());
180 std::multiplies<size_t>());
202 T *
data = arrayPtr->getStorage(deleteIt);
206 arrayPtr->putStorage(data, deleteIt);
217 toAdios(reinterpret_cast<const T *>(dataPtr));
234 const T *
data = arrayPtr->getStorage(deleteIt);
246 arrayPtr->freeStorage(data, deleteIt);
257 T *
data = arrayPtr->getStorage(deleteIt);
269 arrayPtr->putStorage(data, deleteIt);
315 return reinterpret_cast<Array<T>*
>(dataPtr);
320 return reinterpret_cast<const Array<T>*
>(dataPtr);
339 const T *
data = arrayPtr->getStorage(deleteIt);
341 arrayPtr->freeStorage (data, deleteIt);
348 T *
data = arrayPtr->getStorage(deleteIt);
350 arrayPtr->putStorage(data, deleteIt);
357 #endif // ADIOS2STMANCOLUMN_H
A Vector of integers, for indexing into Array<T> objects.
virtual void putSlicedoubleV(uInt rownr, const Slicer &ns, const Array< double > *dataPtr)
virtual void putBoolV(uInt aRowNr, const Bool *aDataPtr)
Put the scalar value into the given row.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
adios2::Dims itsAdiosStart
void setShape(uInt aRowNr, const IPosition &aShape)
Set the shape of an (variable-shaped) array in the given row.
size_t itsReadCacheStartRow
virtual void getSliceShortV(uInt rownr, const Slicer &ns, Array< Short > *dataPtr)
virtual void getSliceDComplexV(uInt rownr, const Slicer &ns, Array< DComplex > *dataPtr)
virtual void getSlicefloatV(uInt rownr, const Slicer &ns, Array< float > *dataPtr)
std::complex< Float > Complex
const String itsStringArrayBarrier
virtual void putScalarV(uInt rownr, const void *dataPtr)
virtual void putSliceuIntV(uInt rownr, const Slicer &ns, const Array< uInt > *dataPtr)
Array< T > * asArrayPtr(void *dataPtr) const
Adios2StManColumn(Adios2StMan::impl *aParent, int aDataType, String aColName, std::shared_ptr< adios2::IO > aAdiosIO)
virtual void getSliceuShortV(uInt rownr, const Slicer &ns, Array< uShort > *dataPtr)
virtual void getArrayV(uInt rownr, void *dataPtr)
Get the array value in the given row.
virtual void getSliceV(uInt aRowNr, const Slicer &ns, void *dataPtr)
Get a section of the array in the given row.
virtual void getArrayColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some array values in the column.
virtual void putStringV(uInt aRowNr, const String *aDataPtr)
virtual void putSliceShortV(uInt rownr, const Slicer &ns, const Array< Short > *dataPtr)
Bool canChangeShape() const
Can the data manager handle chaging the shape of an existing array? Default is no.
virtual void create(std::shared_ptr< adios2::Engine > aAdiosEngine, char aOpenMode)=0
virtual void putfloatV(uInt aRowNr, const Float *aDataPtr)
virtual void getSliceComplexV(uInt rownr, const Slicer &ns, Array< Complex > *dataPtr)
virtual void putScalarV(uInt aRowNr, const void *aDataPtr)=0
virtual void putInt64V(uInt aRowNr, const Int64 *aDataPtr)
virtual void getColumnSliceV(const Slicer &ns, void *dataPtr)
Get a section of all arrays in the column.
void sliceVToSelection(uInt rownr, const Slicer &ns)
void toAdios(const T *data)
virtual void getScalarV(uInt aRowNr, void *data)
virtual void getIntV(uInt aRowNr, Int *aDataPtr)
Adios2StManColumnT(Adios2StMan::impl *aParent, int aDataType, String aColName, std::shared_ptr< adios2::IO > aAdiosIO)
virtual void setShapeColumn(const IPosition &aShape)
Set the shape of all (fixed-shaped) arrays in the column.
adios2::Dims itsAdiosCount
virtual void putArrayV(uInt rownr, const void *dataPtr)
Put the array value into the given row.
adios2::Variable< T > itsAdiosVariable
virtual void getInt64V(uInt aRowNr, Int64 *aDataPtr)
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
virtual void putSliceIntV(uInt rownr, const Slicer &ns, const Array< Int > *dataPtr)
virtual void putSliceuShortV(uInt rownr, const Slicer &ns, const Array< uShort > *dataPtr)
virtual void getuIntV(uInt aRowNr, uInt *aDataPtr)
virtual void putSliceDComplexV(uInt rownr, const Slicer &ns, const Array< DComplex > *dataPtr)
virtual void getdoubleV(uInt aRowNr, Double *aDataPtr)
virtual void getDComplexV(uInt aRowNr, DComplex *aDataPtr)
std::unordered_map< uInt, IPosition > itsCasaShapes
std::shared_ptr< adios2::IO > itsAdiosIO
void arrayVToSelection(uInt rownr)
const Vector< uInt > & rowVector() const
Get the row vector as is (thus sliced if the object contains slices).
std::complex< Double > DComplex
virtual void putSliceV(uInt aRowNr, const Slicer &ns, const void *dataPtr)
Put into a section of the array in the given row.
virtual IPosition shape(uInt aRowNr)
Get the shape of the item in the given row.
virtual void getShortV(uInt aRowNr, Short *aDataPtr)
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
const Array< T > * asArrayPtr(const void *dataPtr) const
Class holding the row numbers in a RefTable.
virtual void putArrayColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some array values in the column.
void create(std::shared_ptr< adios2::Engine > aAdiosEngine, char aOpenMode)
virtual void getSliceuCharV(uInt rownr, const Slicer &ns, Array< uChar > *dataPtr)
virtual void getComplexV(uInt aRowNr, Complex *aDataPtr)
virtual void getScalarV(uInt aRowNr, void *aDataPtr)=0
bool Bool
Define the standard types used by Casacore.
const IPosition & length() const
Report the length of the resulting axes.
virtual void getfloatV(uInt aRowNr, Float *aDataPtr)
const IPosition & start() const
Report the defined starting position.
virtual void getSlicedoubleV(uInt rownr, const Slicer &ns, Array< double > *dataPtr)
std::string itsAdiosDataType
virtual void getArrayColumnV(void *dataPtr)
Get all array values in the column.
virtual void putIntV(uInt aRowNr, const Int *aDataPtr)
virtual void putDComplexV(uInt aRowNr, const DComplex *aDataPtr)
Specify which elements to extract from an n-dimensional array.
void fromAdios(void *dataPtr)
size_t itsReadCacheMaxRows
virtual void getSliceIntV(uInt rownr, const Slicer &ns, Array< Int > *dataPtr)
virtual void putuIntV(uInt aRowNr, const uInt *aDataPtr)
virtual void getSliceuIntV(uInt rownr, const Slicer &ns, Array< uInt > *dataPtr)
virtual void putShortV(uInt aRowNr, const Short *aDataPtr)
virtual void getSliceStringV(uInt rownr, const Slicer &ns, Array< String > *dataPtr)
virtual void getuCharV(uInt aRowNr, uChar *aDataPtr)
virtual void putSliceStringV(uInt rownr, const Slicer &ns, const Array< String > *dataPtr)
virtual void putSliceuCharV(uInt rownr, const Slicer &ns, const Array< uChar > *dataPtr)
void scalarVToSelection(uInt rownr)
virtual void getuShortV(uInt aRowNr, uShort *aDataPtr)
String: the storage and methods of handling collections of characters.
virtual void putdoubleV(uInt aRowNr, const Double *aDataPtr)
virtual void putSliceBoolV(uInt rownr, const Slicer &ns, const Array< Bool > *dataPtr)
Put the array value into the given row.
virtual void getStringV(uInt aRowNr, String *aDataPtr)
Bool isSliced() const
Represents the vector a slice?
std::vector< T > itsReadCache
virtual void putSlicefloatV(uInt rownr, const Slicer &ns, const Array< float > *dataPtr)
virtual void getSliceBoolV(uInt rownr, const Slicer &ns, Array< Bool > *dataPtr)
Get the array value in the given row.
virtual void putSliceComplexV(uInt rownr, const Slicer &ns, const Array< Complex > *dataPtr)
virtual Bool canAccessSlice(Bool &reask) const
Can the column data manager handle access to a cell slice? If not, the caller should do slicing itsel...
virtual void putuShortV(uInt aRowNr, const uShort *aDataPtr)
Base table column storage manager class.
virtual void putuCharV(uInt aRowNr, const uChar *aDataPtr)
uInt nelements() const
The number of elements in this IPosition.
virtual void putComplexV(uInt aRowNr, const Complex *aDataPtr)
Adios2StMan::impl * itsStManPtr
adios2::Dims itsAdiosShape
virtual void getBoolV(uInt aRowNr, Bool *aDataPtr)
Get the scalar value in the given row.
Vector< uInt > convert(const Vector< uInt > &rootRownrs) const
Convert this object to a Vector<uInt> by applying the given row numbers.
std::shared_ptr< adios2::Engine > itsAdiosEngine
void toAdios(const void *dataPtr)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.