ImFusion SDK 4.3
ReductionWrapper< Op > Class Template Reference

#include <ImFusion/ImageMath/Poly/ReductionWrapper.h>

Polymorphic wrapper to wrap an expression and represent a reduction. More...

+ Inheritance diagram for ReductionWrapper< Op >:

Detailed Description

template<typename Op>
class ImFusion::ImageMath::internal::ReductionWrapper< Op >

Polymorphic wrapper to wrap an expression and represent a reduction.

Template Parameters
OpA struct representing a reduction expression examples can be found in BinaryOps.h
Note
Reductions are channel-wise, i.e. the output is a Eigen vector with as many coefficients as there are channels.

Public Member Functions

 ReductionWrapper (std::shared_ptr< ExprBase > operand, const Op &func, Selection sel=Selection())
 Constructor storing the operand for later lazy evaluation.
 
 ReductionWrapper (std::shared_ptr< ExprBase > operand, Selection sel=Selection())
 Constructor for standard functor Op.
 
reduction_type eval (std::vector< vec4i > *outArg=nullptr) const override
 
GlExprInterfaceoperand () override
 
const GlExprInterfaceoperand () const override
 
const ImgOps::BinaryImgOpGlop () const override
 
- Public Member Functions inherited from ReductionWrapperBase
 ReductionWrapperBase (Selection sel)
 
const Selectionsel () const
 

Additional Inherited Members

- Protected Member Functions inherited from ReductionWrapperGl
bool reduceGl (reduction_type &outRes, std::vector< vec4i > *outArg) const
 Evaluates expression into this ArrayGl on the GPU.
 
- Protected Attributes inherited from ReductionWrapperBase
const Selection m_sel
 Selection on which the reduction gets computed.
 

Member Function Documentation

◆ eval()

template<typename Op>
reduction_type eval ( std::vector< vec4i > * outArg = nullptr) const
inlineoverridevirtual

Implements ReductionWrapperBase.

◆ operand() [1/2]

template<typename Op>
GlExprInterface & operand ( )
inlineoverridevirtual

Implements ReductionWrapperBase.

◆ operand() [2/2]

template<typename Op>
const GlExprInterface & operand ( ) const
inlineoverridevirtual

Implements ReductionWrapperBase.

◆ op()

template<typename Op>
const ImgOps::BinaryImgOpGl & op ( ) const
inlineoverridevirtual

Implements ReductionWrapperBase.


The documentation for this class was generated from the following files:
Search Tab / S to search, Esc to close