|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
A field which contains computational operations that are executed on demand per fragment. More...
#include <ComputationalField.hpp>
Classes | |
| struct | FragmentComputationParameters |
| Internal helper class to pass parameters from the computational field class to the on-demand creators per fragment. More... | |
| struct | FragmentComputer |
| Internal helper class which calls the computeFragment() member function of the associated FieldOperator . More... | |
Public Types | |
| using | primary_value_type = typename FieldOperator::primary_value_type |
| using | result_type = typename FieldOperator::result_type |
Public Types inherited from Fiber::Field | |
| enum class | CreationFailAlternative { Fail , Persistent , Discardable } |
| using | fragments_t = FlatMap< FragmentIndex_t, RefPtr< CreativeArrayBase > > |
| using | fragment_mutex_t = MemCore::shared_mutex |
| using | CAB_t = RefPtr< CreativeArrayBase > |
| typedef WeakPtr< Field, Field::reference_domain_t > | WeakFieldPtr_t |
| using | NamedFragment = std::pair< RefPtr< CreativeArrayBase >, RefPtr< FragmentID > > |
| using | Iterator = FragmentIterator |
| using | FragmentIterator_t = std::function< bool(const RefPtr< FragmentID > &, const RefPtr< CreativeArrayBase > &)> |
| Callback type for functions iterating over Field fragments. | |
Public Types inherited from Fiber::OwnerBase | |
| template<class ItemType > | |
| using | Item = MemCore::InterfaceData< ItemType > |
| An optional convenience class that allows to easily add arbitrary types to Intercubes . | |
Public Member Functions | |
| ComputationalField (const FieldOperator &FO, const RefPtr< Field > &InputField, const MemCore::RefPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache()) | |
| The Constructor wants an instance of the associated field operator and the primary input field. | |
| ComputationalField (const FieldOperator &FO, const Field &InputField, const MemCore::RefPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache()) | |
| The Constructor wants an instance of the associated field operator and the primary input field. | |
| bool | apply (const RefPtr< FragmentID > &fid, const RefPtr< CreativeArrayBase > &CAB) |
| The fragment iteration callback function. | |
| int | createFieldFragments (const Field &SourceData) |
| Create the fragments of this field, usually not to be called explicitly. | |
Public Member Functions inherited from Fiber::Field | |
| void | reserve_fragments (size_t N) |
| void | extremeUnction () override |
| void | clear () |
| Remove all fragments of this Field. | |
| FragmentIndex_t | getNumericalID (const RefPtr< FragmentID > &fid) |
| FragmentIndex_t | findNumericalID (const RefPtr< FragmentID > &fid) const |
| FragmentIndex_t | findNumericalIDByName (const string &FragmentName) const |
| RefPtr< FragmentID > & | makeFragmentID (const string &fragmentname) |
| Create a new fragment ID if not existent yet. | |
| RefPtr< FragmentID > & | operator[] (const string &fragmentname) |
| RefPtr< FragmentIDCollection > | getFragmentIDCollection () const override |
| DynamicSize | getFragmentLayout () const |
| const FragmentIDCollection::FragmentIDs_t & | getFragmentIDs () const |
| Return iteratable container of fragment ID's for this field. | |
| Field () | |
| Default constructor, no data or fragments. | |
| Field (const RefPtr< FragmentIDCollection > &theFragmentIDCollection) | |
| Create a new field from an existing FragmentID collection, such as an existing field. | |
| Field (const WeakPtr< Field > &SimilarField) | |
| Field (const FragmentIDCollectionProvider &FICP) | |
| Field (const RefPtr< CreativeArrayBase > &FFC, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Create unfragmented field with data creation via Creator. | |
| Field (const RefPtr< MemBase > &Mb, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Create unfragmented field with data stored always in memory ( calls setPersistentData() ) | |
| Field (const RefPtr< CreativeArrayBase > &FFC, const WeakPtr< Field > &SimilarField) | |
| Field (const RefPtr< MemBase > &MAb, const WeakPtr< Field > &SimilarField) | |
| Field (const RefPtr< CreativeArrayBase > &FFC, const FragmentIDCollectionProvider &FICP) | |
| Field (const RefPtr< MemBase > &MAb, const FragmentIDCollectionProvider &FICP) | |
| Field (const RefPtr< MemBase > &Mb, const RefPtr< MemCore::Cache > &Cache, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Create unfragmented field with data stored in memory as long as the cache allows. ( calls setPersistentData() ) | |
| template<Dims_t DIMS> | |
| Field (const MultiIndex< DIMS > &NumberOfFragments, const string &FragmentNamePrefix) | |
| Create a field with a multi-dimensional regular layout for the fragments. | |
| template<Dims_t DIMS> | |
| bool | setFragmentLayout (const MultiIndex< DIMS > &NumberOfFragments, const string &FragmentNamePrefix) |
| Add a multi-dimensional regular layout for the fragments if it had no layout yet. | |
| RefPtr< MemBase > | newFragmentationArray () const |
| For fields with a fragment layout provide such in a MultiArray. | |
| template<class T , Dims_t N> | |
| Field (const MemCore::Ref< MemArray< N, T > > &MemRefPtr, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Convenience function initializing from a Ref<> to some MemArray. | |
| template<class T , Dims_t N> | |
| Field (const MemCore::RefPtr< MemArray< N, T > > &MemRefPtr, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Convenience function initializing from a RefPtr<> to some MemArray. | |
| template<class T , Dims_t N> | |
| Field (const MemCore::WeakPtr< MemArray< N, T > > &MemRefPtr, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Convenience function initializing from a RefPtr<> to some MemArray. | |
| template<class T , Dims_t N> | |
| Field (const MemCore::MemVector< T > &Data, const MultiIndex< N > &Size, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Construct an unfragmented field from a MemVector and a MultiIndex. | |
| template<class T , Dims_t N> | |
| Field (const MemCore::RefPtr< MemCore::TypedChunk< T > > &Data, const MultiIndex< N > &Size, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr) | |
| Construct an unfragmented field from a Chunk of data and multidimensional index. | |
| void | own (CreativeArrayBase &CAB) |
| void | own (const RefPtr< CreativeArrayBase > &CAB) |
| bool | hasData (const RefPtr< FragmentID > &FID=nullptr) const |
| Check if there are data on this field fragment. | |
| const CAB_t & | setPersistentData (const RefPtr< MemBase > &Mb, const RefPtr< FragmentID > &=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache(), const string &ProvenanceInfo={}) |
| Set data for a certain field fragment that is always kept in memory, the cache reference is just use to trace memory utilization. | |
| const CAB_t & | setPersistentData (const RefPtr< MemBase > &Mb, const RefPtr< FragmentID > &fID, const string &ProvenanceInfo) |
| const CAB_t & | setPersistentDataByName (const RefPtr< MemBase > &Mb, const string &FragmentName, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache()) |
| template<class T , Dims_t N> | |
| const CAB_t & | setPersistentData (const MemCore::RefPtr< Chunk< T > > &Mb, const MultiIndex< N > &Dimensions, const RefPtr< FragmentID > &FragID=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache()) |
| A convenience function to set a field's data from a Chunk of data. | |
| template<class T , Dims_t N> | |
| const CAB_t & | setPersistentData (Chunk< T > *Mb, const MultiIndex< N > &Dimensions, const RefPtr< FragmentID > &FragID=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache()) |
| A convenience function to set a field's data from a Chunk of data. | |
| template<class T > | |
| const CAB_t & | setPersistentData1D (const MemCore::RefPtr< Chunk< T > > &data, const RefPtr< FragmentID > &FragID=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache()) |
| A convenience function to set a field's data from a Chunk of data, interpreting them as one-dimensional. | |
| RefPtr< MemArrayProperties > | getProperties () const |
| Return properties associated with this field. | |
| const type_info & | getFieldStorageType () const |
| Get the type of the field. | |
| const type_info & | getElementType () const |
| Retrieve the element type of this field, which is stored with the properties of this field. | |
| MemCore::WeakPtr< FiberTypeBase > | getElementFiberType () const |
| Retrieve the fiber type that is associated with this field. | |
| MemCore::WeakPtr< FiberTypeBase > | getFiberType () const |
| int | getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const |
| Get the memory occupied by this field (and all of its fragments). | |
| bool | isType (const TypeList_t &TL) const |
| Check if the type of this field is contained in the given type list. | |
| FiberTypeIndex | getFiberTypeIndex () const |
| bool | addFiberType (TypeList_t &TypeList) const |
| Add the type used by this field to the given TypeList. | |
| const RefPtr< CreativeArrayBase > & | setCreator (const RefPtr< CreativeArrayBase > &FFC, const RefPtr< FragmentID > &=nullptr) |
| Sets the creator for an unfragmented field. | |
| const RefPtr< CreativeArrayBase > & | setCreatorByName (const RefPtr< CreativeArrayBase > &FFC, const string &FragmentName) |
| const RefPtr< CreativeArrayBase > & | setCompatibleCreator (const RefPtr< CreativeArrayBase > &CAB, const RefPtr< FragmentID > &fid=nullptr) |
| Set the creator for a fragment ID on a different Skeleton such that the fragment IDs are different, only their names matching. | |
| FunctionalCreator & | setLambda (const FunctionalCreator::Functor &F, const RefPtr< FragmentID > &fid=nullptr) |
| FunctionalCreator & | setLambda (const RefPtr< FragmentID > &fid, const FunctionalCreator::Functor &F) |
| FunctionalCreator & | setCompatibleLambda (const FunctionalCreator::Functor &F, const RefPtr< FragmentID > &fid=nullptr) |
| const RefPtr< CreativeArrayBase > & | setFunctionalCreator (const FunctionalCreator::Functor &F, const RefPtr< FragmentID > &fid=nullptr) |
| template<class Functor > | |
| FunctionalCreator & | setFunctor (const Functor &F, const RefPtr< FragmentID > &fid=nullptr) |
| Alias for setLambda(). | |
| template<class Functor > | |
| FunctionalCreator & | setFunctor (const RefPtr< FragmentID > &fid, const Functor &F) |
| Alias for setLambda(). | |
| size_t | nFragments () const |
| The number of fragments in this field. | |
| size_t | NumberOfFragments () const |
| The number of fragments in this field. | |
| bool | isUnfragmented () const |
| bool | isFragmented () const |
| RefPtr< FragmentID > | getFragmentID (const string &FragmentName) const |
| RefPtr< FragmentID > | operator() (const string &FragmentName) const |
| RefPtr< CreativeArrayBase > | getCreator (const RefPtr< FragmentID > &=nullptr) const |
| Get the creator of an unfragmented field. | |
| RefPtr< CreativeArrayBase > | operator() (const RefPtr< FragmentID > &FID=nullptr) const |
| RefPtr< CreativeArrayBase > | getCreatorByName (const string &FragmentName) const |
| Get the creator of an unfragmented field via the textual description of a fragment ID. | |
| NamedFragment | getCreatorByNameF (const string &FragmentName) const |
| RefPtr< CreativeArrayBase > | getCreatorByNumericalID (FragmentIndex_t NumericalID) const |
| RefPtr< CreativeArrayBase > & | getCreatorReferenceViaFragmentIndex (FragmentIndex_t NumericalID) |
| RefPtr< CreativeArrayBase > | getCreator (FragmentIndex_t NumericalID) const |
| RefPtr< CreativeArrayBase > | getCompatibleCreator (const RefPtr< FragmentID > &F=nullptr) const |
| Get a creator from a fragment ID that is NAMED similar to one fragment here. | |
| NamedFragment | getCompatibleCreatorF (const RefPtr< FragmentID > &F=nullptr) const |
| Get a creator from a fragment ID that is NAMED similar to one fragment here. | |
| RefPtr< MemBase > | getData (const RefPtr< FragmentID > &FID=nullptr) const |
| Get the data of a contigous field. | |
| RefPtr< MemBase > | getDataByNumericalID (FragmentIndex_t NumericalID) const |
| Get some fragment's data via its numerical fragment ID. | |
| DEPRECATED ("Use function getDataByNumericalID() instead", RefPtr< MemBase > getData(FragmentIndex_t NumericalID) const) | |
| RefPtr< MemBase > | getFirstData () const |
| In case this is field is fragmented, but there is only one fragment, return the ID of this singular fragment. | |
| RefPtr< CreativeArrayBase > | getFirstCreator () const |
| In case this is field is fragmented, but there is only one fragment, return the ID of this singular fragment. | |
| RefPtr< FragmentID > | getFirstFragmentID () const |
| Get the first fragment ID. | |
| RefPtr< MemCore::ChunkBase > | getChunk (const RefPtr< FragmentID > &FID=nullptr) const |
| Return the stored memory chunk associated with this array. | |
| RefPtr< MemBase > | getCompatibleData (const RefPtr< FragmentID > &F=nullptr) const |
| Get data from a fragment ID that is NAMED similar to one fragment here. | |
| unsigned | iterate (FragmentIterator &, const MemCore::WeakPtr< FragmentSelector > &FS=nullptr) const |
| template<class T > | |
| unsigned | Iterate (const T &t, const MemCore::WeakPtr< FragmentSelector > &FS=nullptr) const |
| template<class T > | |
| unsigned | iterate_fragments (const T &t, const MemCore::WeakPtr< FragmentSelector > &FS=nullptr) const |
| Ageable | getMostRecentCreatorAge () const |
| Ageable | getMostRecentAttributeAge () const |
| bool | hasFragmentsNewerThan (const Ageable &A) const |
| unsigned | iterate (const FragmentIterator_t &FI, bool parallel=false, bool copy_map_internally=false) const |
| unsigned | iterate (bool parallel, const FragmentIterator_t &FI, bool copy_map_internally=false) const |
| Same as iterate(const FragmentIterator_t&, bool), just other order of arguments for convenience. | |
| unsigned | iterate_parallel (const FragmentIterator_t &FI, bool copy_map_internally=false) const |
| Iterate over all fragments in parallel. | |
| unsigned | iterate (FragmentIndexIterator &FFI, const WeakPtr< FragmentSelector > &FS=nullptr, bool copy_map_internally=false) const |
| Iterate over the fragments of a field using the integer ID of each fragment. | |
| Dims_t | Dims () const |
| The dimensionality of the field, taken from the getProperties(). | |
| RefPtr< SizeInterface > | getSize () const |
| The size of the field, which is the sum of all fragments. | |
| bool | isCompatible (const Field &F) |
| void | Speak (int indent=0, int maxindent=-1) const |
| Informative debug message. | |
| string | xml () const |
| RefPtr< CreativeArrayBase > | createCreator (const RefPtr< MemBase > &Data, const RefPtr< FragmentID > &=nullptr, CreationFailAlternative=CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache()) |
| Insert some data into a Field with various memory management methods. | |
| RefPtr< CreativeArrayBase > | createCreator (const RefPtr< MemBase > &Data, const string &FragmentName, CreationFailAlternative=CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache()) |
| template<Dims_t N, class T > | |
| std::pair< RefPtr< MemArray< N, T > >, RefPtr< CreativeArrayBase > > | createData (const MultiIndex< N > &Size, const RefPtr< FragmentID > &fid=nullptr, Field::CreationFailAlternative FailMode=Field::CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache()) |
| Create a mem array and insert it as a fragment to the Field. | |
| template<Dims_t N, class T > | |
| std::pair< RefPtr< MemArray< N, T > >, RefPtr< CreativeArrayBase > > | createData (const MultiIndex< N > &Size, const string &fragmentname, Field::CreationFailAlternative FailMode=Field::CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache()) |
| Create a mem array and insert it as a fragment to the Field under the given fragmentname: | |
| template<Dims_t Dims> | |
| MultiIndex< Dims > & | setFragmentOffset (const string &FragmentName, const MultiIndex< Dims > &Offset) |
| Set a fragment's index offset. | |
Public Member Functions inherited from Fiber::Ownable< Field > | |
| void | x_updateOwnershipAge (const MemCore::Ageable &theNewAge) override |
| Forward some age to all Owners. | |
| void | insertOwner (const Container &theOwner) |
| Add some owner. | |
| bool | insertOwner (const MemCore::WeakPtr< Container > &theOwner) |
| Add some owner. | |
| void | addOwner (const Container &theOwner, const MemCore::Ageable &theNewAge) |
| Add some owner and broadcast a new age to all Ownerrs. | |
| void | addOwner (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge) |
| Add some owner and broadcast a new age to all Ownerrs. | |
| Ownable () | |
| Default constructor, empty Ownership list. | |
| Ownable (const Ownable &) | |
| Copy constructor, does NOT copy any ownership information, the new Ownable will be unowned. | |
| Ownable (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge) | |
| Construct an Ownable with an initial owner. | |
| Ownable (const Container &theOwner, const MemCore::Ageable &theNewAge) | |
| Construct an Ownable with an initial owner. | |
| Ownable & | operator= (const Ownable &) |
| Assignment, does NOT copy any ownership information, the assigned Ownable will retain all its ownership information. | |
| MemCore::WeakPtr< Container > | getPrimaryOwner () const |
| Get the first valid owner. | |
| size_t | getNumberOfValidOwners () const |
| Get the first valid owner. | |
| bool | processOwnership (MemCore::Intercube &Output, const MemCore::Intercube &Input) const override |
| Process some ownership action. | |
Public Member Functions inherited from Fiber::OwnerBase | |
| bool | processOwnership (MemCore::Intercube &OutputAndInput) const |
| Process ownership where the input information is shared with the output information in the same Intercube. | |
Public Member Functions inherited from MemCore::Intercube | |
| void | addInterface (const RefPtr< InterfaceBase > &I) const |
| void | addInterfaceData (const Data &D) |
| void | addInterfaceData (const Data &D) |
| void | clearInterfaces () |
| bool | const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const |
| virtual RefPtr< InterfaceBase > | createInterface (const type_info &) const |
| RefPtr< InterfaceBase > | findInterface (const type_info &t) const |
| RefPtr< InterfaceBase > | getInterface (const type_info &t) |
| std::string | getInterfaceNames (const char delim=';') const |
| bool | gotNewInterfaceData (const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector &S) |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector *S) |
| bool | hasChangedInterfaceData (const Data &D) const |
| bool | hasChangedInterfaceData (const Data &D) const |
| bool | hasChangedInterfaceData (const Data &D, const Selector &) const |
| bool | hasChangedInterfaceData (const Data &D, const Selector *) const |
| bool | hasInterface (const type_info &t) const |
| bool | iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) |
| void | printInterfaces () const |
| void | registerInterface (const type_info &t) |
| void | removeInterface () |
| void | removeInterfaceBase (const type_info &InterfaceBaseID) |
Public Member Functions inherited from MemCore::Ageable | |
| constexpr | Ageable (age_t t) noexcept |
| constexpr | Ageable (const Ageable &A) noexcept |
| Ageable (const volatile Ageable &A) noexcept | |
| constexpr const Ageable & | getAge () const |
| bool | isNewerThan (const Ageable &a) const noexcept |
| bool | isOlderThan (const Ageable &a) const noexcept |
| bool | isYoungerThan (const Ageable &a) const noexcept |
| bool | operator!= (const Ageable &a) const noexcept |
| bool | operator< (const Ageable &a) const noexcept |
| bool | operator<= (const Ageable &a) const noexcept |
| bool | operator<= (const volatile Ageable &a) const volatile noexcept |
| bool | operator== (const Ageable &a) const noexcept |
| bool | operator> (const Ageable &a) const noexcept |
| bool | operator> (const volatile Ageable &a) const volatile |
| bool | operator>= (const Ageable &a) const noexcept |
| bool | operator>= (const volatile Ageable &a) const volatile noexcept |
| constexpr void | resetAge () noexcept |
| void | setInfinitelyNew () noexcept |
| age_t | time_value () const noexcept |
| age_t | time_value () const volatile noexcept |
| Ageable & | touch () noexcept |
| age_t | update (age_t age) noexcept |
| age_t | update (const Ageable &Other) noexcept |
| age_t | update (const volatile Ageable &Other) volatile noexcept |
Public Member Functions inherited from Fiber::SaveableAttributes | |
| void | attributesHaveBeenSaved () const |
| bool | attributesNeedSaving () const |
Public Member Functions inherited from MemCore::Attributes | |
| MemCore::RefPtr< MemCore::ChunkBase > | getAttribute (const std::string &name) const |
| const Ageable & | getAttributeAge () const |
| std::pair< bool, T > | getAttributeValue (const string &AttributeName, size_t ElementNumber=0) const |
| attributes_t & | getAttributeValues () |
| const attributes_t & | getAttributeValues () const |
| size_t | getNumberOfAttributes () const |
| bool | hasAttribute (const std::string &name) const |
| int | Iterate (const Functor &L) const |
| int | iterate (Iterator &it) const |
| int | iterate_attributes (const Functor &L) const |
| size_t | NumberOfAttributes () const |
| void | setAttribute (const std::string &name, const MemCore::RefPtr< MemCore::ChunkBase > &AttribData) |
| ResizableChunk< T > & | setAttributeValue (const std::string &name, const T &AttribData) |
| ResizableChunk< T > & | setAttributeValues (const std::string &name, const std::initializer_list< T > &AttribData) |
| const T & | setValue (const T &AttribData, const std::string &name) |
| const T & | setValue (const T &AttribData, const std::string &name, const std::string &Comment, const std::string &CommentPrefix="Comment") |
| string | toString () const |
| const Ageable & | touchAttributes () const |
| const Ageable & | updateAttributeAge (const Ageable &A) const |
Public Attributes | |
| MemCore::RefPtr< MemCore::Cache > | myCache |
| Reference to the cache object managing the memory occupied by the resulting data. | |
Public Attributes inherited from Fiber::Field | |
| ListRelativeToBinder< WeakPtr< CreativeArrayBase > > | UnsavedCreators |
Public Attributes inherited from Fiber::Ownable< Field > | |
| std::unordered_set< MemCore::WeakPtr< Container > > | Owners |
| The (internal) list of owners. | |
Public Attributes inherited from Fiber::SaveableAttributes | |
| MemCore::Ageable | LastSavedAttributes |
Additional Inherited Members | |
Static Public Member Functions inherited from Fiber::Field | |
| static const CAB_t & | CreativeArrayNullPtr () |
| static const RefPtr< Field > & | NullPtrField () |
Static Public Member Functions inherited from MemCore::Ageable | |
| static const Ageable & | InfinitelyNew () noexcept |
| static constexpr const Ageable & | InfinitelyOld () noexcept |
| static age_t | now () noexcept |
Static Public Attributes inherited from Fiber::Field | |
| static constexpr bool | use_std__flat_map_for_fragments = false |
Protected Member Functions inherited from Fiber::Field | |
| const RefPtr< CreativeArrayBase > & | setCreatorViaFragmentIndex (FragmentIndex_t FI, const RefPtr< CreativeArrayBase > &CAB) |
| ~Field () | |
| Destructor. | |
Protected Attributes inherited from Fiber::Field | |
| MemCore::shared_mutex | fragment_mutex |
| fragments_t | fragments |
Related Symbols inherited from Fiber::Field | |
| bool | validate (FragmentIndex_t FragmentNumber) const |
| Check if a given fragment number is valid within this field. | |
| RefPtr< CreativeArrayBase > | setDiscardableData (const RefPtr< MemBase > &Mb, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache(), const RefPtr< FragmentID > &=nullptr) |
| A simplied function for data that can be discarded at any time. | |
| RefPtr< CreativeArrayBase > | operator<< (const FieldFragment &FF, const RefPtr< MemBase > &Mb) |
| Set a data set to a Field fragment: | |
| RefPtr< CreativeArrayBase > | operator>> (const FieldFragment &FF, Field::CAB_t &Result) |
| Set a data creator to a Field fragment: | |
| RefPtr< CreativeArrayBase > | operator<< (const FieldFragmentRef &FF, const RefPtr< MemBase > &Mb) |
| Set a data set to a Field fragment: | |
| RefPtr< CreativeArrayBase > | operator<< (const FieldFragmentRef &&FF, const Field::CAB_t &theCreator) |
| Set a creator: | |
| RefPtr< CreativeArrayBase > | operator>> (const FieldFragmentRef &FF, Field::CAB_t &Result) |
| Get a creator: | |
A field which contains computational operations that are executed on demand per fragment.
Data are created via the OnDemandCreator class.
A computational field will have at least one dependency, the InputField, from which it retrieves the fragmentation and dimensionality of the fragments. The provided FieldOperator may well define operations to involved additional fields.
The provided FieldOperator class export type definitions for the primary and result value, plus a computeFragment() member function that implements the actual iteration over multi-dimensional arrays. Such a FieldOperator may look like this:
And it would be called like this:
A Field Operator may well include some data members, these will be available in the FieldOperator's computeFragment() function. For instance, such data members may include reference pointers to additional fields, from which the computeFragment() function retrieves data arrays using the given fragment ID. A typical example is a binary operator on fields.
|
inline |
The Constructor wants an instance of the associated field operator and the primary input field.
Optionally an alternative cache object can be specified.
References Fiber::ComputationalField< FieldOperator >::createFieldFragments().
|
inline |
The Constructor wants an instance of the associated field operator and the primary input field.
Optionally an alternative cache object can be specified.
References Fiber::ComputationalField< FieldOperator >::createFieldFragments().
|
inline |
The fragment iteration callback function.
Used internally via createFieldFragments();
This function checks the dimensionality of the given Creator and establishes an appropriate OnDemandCreator of the same dimensionality using the FragmentComputer.
References Fiber::ComputationalField< FieldOperator >::myCache, and Fiber::Field::setCreator().
Referenced by Fiber::ComputationalField< FieldOperator >::createFieldFragments().
|
inline |
Create the fragments of this field, usually not to be called explicitly.
This function iterates over the fragments of the given source field and sets up Creator objects for the fragments of the current field. No actual operations are performed here.
This is usually done in the constructor of the ComputationalField, so there is no real need to call this function explicitly. However, if there was no field given during construction, then this function can be called at a later time to establish the computational field.
References Fiber::ComputationalField< FieldOperator >::apply().
Referenced by Fiber::ComputationalField< FieldOperator >::ComputationalField(), and Fiber::ComputationalField< FieldOperator >::ComputationalField().