FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Public Attributes | List of all members
Fiber::BinaryOperator< Operator, PrimaryValueType, SecondaryValueType, ResultValueType > Struct Template Reference

Implementing a binary operation on two fields with on-demand computation per fragment and discarding data when memory is tight. More...

#include <BinaryOperator.hpp>

Public Types

typedef PrimaryValueType primary_value_type
 
typedef SecondaryValueType secondary_value_type
 
typedef ResultValueType result_type
 

Public Member Functions

 BinaryOperator (const RefPtr< Field > &theSecondaryField)
 The constructor, wants to know about the secondary field.
 
template<Dims_t Dims>
bool computeFragment (MemArray< Dims, result_type > &Result, const MemArray< Dims, primary_value_type > &PrimaryArray, const RefPtr< FragmentID > &myFragmentID)
 

Public Attributes

RefPtr< FieldSecondaryField
 

Detailed Description

template<class Operator, class PrimaryValueType, class SecondaryValueType = PrimaryValueType, class ResultValueType = PrimaryValueType>
struct Fiber::BinaryOperator< Operator, PrimaryValueType, SecondaryValueType, ResultValueType >

Implementing a binary operation on two fields with on-demand computation per fragment and discarding data when memory is tight.

To be used in conjunction with the ComputationalField class. The Operator API is compatible with the Operators as defined in the Eagle library, and it is easiest to just use one of those.

Example usage:

RefPtr<Field> BinaryDoubleAdditionComputationalField(const RefPtr<Field>&L, const RefPtr<Field>&R)
{
BinaryOperator<Eagle::Operator<'+'>, double > BO(R);
}
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
ComputationalField< FieldOperator > * newComputationalField(const FieldOperator &FO, const RefPtr< Field > &InputField, const MemCore::RefPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache())
A convenience template function to construct a computational field (class ComputationalField) from an...
Definition ComputationalField.hpp:266
Implementing a binary operation on two fields with on-demand computation per fragment and discarding ...
Definition BinaryOperator.hpp:36

This class implements the computeFragment() function as expected by the ComputationalField class.

Constructor & Destructor Documentation

◆ BinaryOperator()

template<class Operator , class PrimaryValueType , class SecondaryValueType = PrimaryValueType, class ResultValueType = PrimaryValueType>
Fiber::BinaryOperator< Operator, PrimaryValueType, SecondaryValueType, ResultValueType >::BinaryOperator ( const RefPtr< Field > &  theSecondaryField)
inline

The constructor, wants to know about the secondary field.

The primary field will be specified via the ComputationalField constructor.