FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
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_tgetFileType (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

Modify the information that will be written to the file.

Parameters
WriteDoubleTypeInSinglePrecisioninformation used for Range information

References std::unordered_set< typename _Value, typename _Hash, typename _Pred, typename _Alloc >::insert().

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

◆ 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)