Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Fiber::FiberIO::HDF5::PrecisionTransformation Struct Reference

Helper class. More...

#include <PrecisionTransformation.hpp>

Inheritance diagram for Fiber::FiberIO::HDF5::PrecisionTransformation:
Fiber::FiberIO::HDF5::FragmentLoader Fiber::FiberIO::HDF5::ContiguousFragmentLoader Fiber::FiberIO::HDF5::UniformFragmentLoader

Public Member Functions

void setFragmentFiberType (const RefPtr< FiberTypeBase > &TheFiberType)
bool doTransformPrecision () const
 PrecisionTransformation (const RefPtr< FiberTypeBase > &)
RefPtr< CreativeArrayBasenewCreator (const RefPtr< LoaderProgress > &TheLoaderProgressor, const F5Fragment &theFragment, const DynamicSize &SI, const RefPtr< FiberIO::HDF5::FileNameInterface > &FragmentFileInfo, const WeakPtr< StorageTransformations::IOPerformance > &theLoadPerformance, const string &fragmentname, const string &FieldSource) const
void shiftAttributes (Attributes &A)
 Modify attributes such as the range if the precision is changed during I/O.

Static Public Member Functions

static bool readPossiblyConvertedData (RefPtr< MemBase > &NewData, CreativeArrayBase &theCreator)
 Function is similar to CreativeArrayBase::create() but more efficient than raw HDF5 in case data need to be converted from float to double precision upon reading.
static bool possiblyShiftData (RefPtr< MemBase > &NewData, CreativeArrayBase &theCreator)
static std::pair< bool, hid_t > getFileType (const StorageTransformations::FilterSettings &FS, hid_t Mem_type_hid, const Fiber::Field &theField, F5Path *myPath)
 Determine whether that specific field thing shall be written in single precision.
static void adjustFileWriteInformation (const StorageTransformations::FilterSettings &FS, CreativeArrayBase &FieldFragmentAttributes, Attributes &OverrideStorageAttributes, AttributeSet_t &DontSaveAttributeSet, RefPtr< ChunkBase > &Mb, bool WriteDoubleTypeInSinglePrecision, bool Write_Shifted_Single_Precision_Range)
 Modify the information that will be written to the file.
static void adjustAttributeWriteInformation (const CreativeArrayBase &FragmentAttributes, Attributes &OverrideStorageAttributes, bool Write_Shifted_Single_Precision_Range)
static RefPtr< Chunk< Eagle::point3f > > reduce_to_single_precision (const FixedArray< double, 3 > &Shift, const Chunk< Eagle::point3 > &Input)
static RefPtr< Chunk< Eagle::point3 > > expand_to_double_precision (const FixedArray< double, 3 > &Shift, const Chunk< Eagle::point3f > &Input)

Public Attributes

RefPtr< FiberTypeBaseFieldFiberType
 The type how it shall appear in the fiber bundle field.
RefPtr< FiberTypeBaseFragmentFiberType
RefPtr< FiberTypeBaseNativeFiberType
 The type how it is in the file, if its different.

Static Public Attributes

static constexpr const char NumericalShiftAttributeName [] = FIBER_FRAGMENT_NUMERICALSHIFT_ATTRIBUTE

Detailed Description

Helper class.

Possibly move this functionality into the FiberType class.

Member Function Documentation

◆ adjustFileWriteInformation()

void Fiber::FiberIO::HDF5::PrecisionTransformation::adjustFileWriteInformation ( const StorageTransformations::FilterSettings & FS,
CreativeArrayBase & FieldFragmentAttributes,
Attributes & OverrideStorageAttributes,
AttributeSet_t & DontSaveAttributeSet,
RefPtr< ChunkBase > & Mb,
bool WriteDoubleTypeInSinglePrecision,
bool Write_Shifted_Single_Precision_Range )
static

◆ getFileType()

std::pair< bool, hid_t > Fiber::FiberIO::HDF5::PrecisionTransformation::getFileType ( const StorageTransformations::FilterSettings & FS,
hid_t Mem_type_hid,
const Fiber::Field & theField,
F5Path * myPath )
static

Determine whether that specific field thing shall be written in single precision.

Todo
: consistency check for other types

References Fiber::Field::getElementFiberType().

Referenced by Fiber::F5Skeleton::F5write().

◆ setFragmentFiberType()

void Fiber::FiberIO::HDF5::PrecisionTransformation::setFragmentFiberType ( const RefPtr< FiberTypeBase > & TheFiberType)