Loading...
Searching...
No Matches
ops.H File Reference

Various functors for unary and binary operations. Can be used for parallel combine-reduce operations or other places requiring a functor. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  eqOp2< T1, T2 >
struct  eqOp< T >
struct  plusEqOp2< T1, T2 >
struct  plusEqOp< T >
struct  minusEqOp2< T1, T2 >
struct  minusEqOp< T >
struct  multiplyEqOp2< T1, T2 >
struct  multiplyEqOp< T >
struct  divideEqOp2< T1, T2 >
struct  divideEqOp< T >
struct  eqMagOp2< T1, T2 >
struct  eqMagOp< T >
struct  eqSqrOp2< T1, T2 >
struct  eqSqrOp< T >
struct  eqMagSqrOp2< T1, T2 >
struct  eqMagSqrOp< T >
struct  plusEqMagSqrOp2< T1, T2 >
struct  plusEqMagSqrOp< T >
struct  minEqOp2< T1, T2 >
struct  minEqOp< T >
struct  maxEqOp2< T1, T2 >
struct  maxEqOp< T >
struct  minMagSqrEqOp2< T1, T2 >
struct  minMagSqrEqOp< T >
struct  maxMagSqrEqOp2< T1, T2 >
struct  maxMagSqrEqOp< T >
struct  andEqOp2< T1, T2 >
struct  andEqOp< T >
struct  orEqOp2< T1, T2 >
struct  orEqOp< T >
struct  xorEqOp2< T1, T2 >
struct  xorEqOp< T >
struct  bitAndEqOp2< T1, T2 >
struct  bitAndEqOp< T >
struct  bitOrEqOp2< T1, T2 >
struct  bitOrEqOp< T >
struct  bitXorEqOp2< T1, T2 >
struct  bitXorEqOp< T >
struct  eqMinusOp2< T1, T2 >
struct  eqMinusOp< T >
struct  nopEqOp2< T1, T2 >
struct  nopEqOp< T >
struct  sumOp3< T, T1, T2 >
struct  sumOp2< T1, T2 >
struct  sumOp< T >
struct  plusOp3< T, T1, T2 >
struct  plusOp2< T1, T2 >
struct  plusOp< T >
struct  minusOp3< T, T1, T2 >
struct  minusOp2< T1, T2 >
struct  minusOp< T >
struct  multiplyOp3< T, T1, T2 >
struct  multiplyOp2< T1, T2 >
struct  multiplyOp< T >
struct  divideOp3< T, T1, T2 >
struct  divideOp2< T1, T2 >
struct  divideOp< T >
struct  cmptMultiplyOp3< T, T1, T2 >
struct  cmptMultiplyOp2< T1, T2 >
struct  cmptMultiplyOp< T >
struct  cmptPowOp3< T, T1, T2 >
struct  cmptPowOp2< T1, T2 >
struct  cmptPowOp< T >
struct  cmptDivideOp3< T, T1, T2 >
struct  cmptDivideOp2< T1, T2 >
struct  cmptDivideOp< T >
struct  stabiliseOp3< T, T1, T2 >
struct  stabiliseOp2< T1, T2 >
struct  stabiliseOp< T >
struct  minOp3< T, T1, T2 >
struct  minOp2< T1, T2 >
struct  minOp< T >
struct  maxOp3< T, T1, T2 >
struct  maxOp2< T1, T2 >
struct  maxOp< T >
struct  minMagSqrOp3< T, T1, T2 >
struct  minMagSqrOp2< T1, T2 >
struct  minMagSqrOp< T >
struct  maxMagSqrOp3< T, T1, T2 >
struct  maxMagSqrOp2< T1, T2 >
struct  maxMagSqrOp< T >
struct  minModOp3< T, T1, T2 >
struct  minModOp2< T1, T2 >
struct  minModOp< T >
struct  bitAndOp3< T, T1, T2 >
struct  bitAndOp2< T1, T2 >
struct  bitAndOp< T >
struct  bitOrOp3< T, T1, T2 >
struct  bitOrOp2< T1, T2 >
struct  bitOrOp< T >
struct  bitXorOp3< T, T1, T2 >
struct  bitXorOp2< T1, T2 >
struct  bitXorOp< T >
struct  andOp2< T1, T2 >
struct  andOp< T >
struct  orOp2< T1, T2 >
struct  orOp< T >
struct  xorOp2< T1, T2 >
struct  xorOp< T >
struct  equalOp2< T1, T2 >
struct  equalOp< T >
struct  notEqualOp2< T1, T2 >
struct  notEqualOp< T >
struct  lessOp2< T1, T2 >
struct  lessOp< T >
struct  lessEqualOp2< T1, T2 >
struct  lessEqualOp< T >
struct  greaterOp2< T1, T2 >
struct  greaterOp< T >
struct  greaterEqualOp2< T1, T2 >
struct  greaterEqualOp< T >
struct  lessEqOp2< T1, T2 >
struct  lessEqOp< T >
struct  greaterEqOp2< T1, T2 >
struct  greaterEqOp< T >
struct  equalOp1< T >
struct  notEqualOp1< T >
struct  lessOp1< T >
struct  lessEqualOp1< T >
struct  greaterOp1< T >
struct  greaterEqualOp1< T >
class  multiplyWeightedOp< T, CombineOp >
struct  compareOp< T >
 Three-way comparison operation of two parameters,. More...
struct  lerpOp< T >
 Linear interpolation (cf. std::lerp). More...
struct  lerpOp1< T >
 Linear interpolation (lerp) with interpolation value defined on construct. More...
struct  getNameOp< T >
 Deprecated(2020-11) use nameOp (word.H). More...
struct  getTypeOp< T >
 Deprecated(2020-11) use typeOp (word.H). More...

Namespaces

namespace  Foam
 Namespace for OpenFOAM.

Macros

#define EqOp(opName, op)
#define Op(opName, op)
#define BoolOp(opName, op)
#define Bool1Op(opName, op)
#define WeightedOp(opName, op)

Detailed Description

Various functors for unary and binary operations. Can be used for parallel combine-reduce operations or other places requiring a functor.

Original source file ops.H

InNamespace Foam

Definition in file ops.H.

Macro Definition Documentation

◆ EqOp

◆ Op

◆ BoolOp

#define BoolOp ( opName,
op )
Value:
\
template<class T1, class T2> \
struct opName##Op2 \
{ \
[[nodiscard]] bool operator()(const T1& x, const T2& y) const \
{ \
return op; \
} \
}; \
\
template<class T> \
struct opName##Op \
{ \
[[nodiscard]] bool operator()(const T& x, const T& y) const \
{ \
return op; \
} \
};

Definition at line 131 of file ops.H.

Referenced by andOp2< T1, T2 >::operator()(), equalOp2< T1, T2 >::operator()(), greaterEqOp2< T1, T2 >::operator()(), greaterEqualOp2< T1, T2 >::operator()(), greaterOp2< T1, T2 >::operator()(), lessEqOp2< T1, T2 >::operator()(), lessEqualOp2< T1, T2 >::operator()(), lessOp2< T1, T2 >::operator()(), notEqualOp2< T1, T2 >::operator()(), orOp2< T1, T2 >::operator()(), and xorOp2< T1, T2 >::operator()().

◆ Bool1Op

#define Bool1Op ( opName,
op )
Value:
\
template<class T> \
struct opName##Op1 \
{ \
const T& value; \
\
opName##Op1(const T& v) : value(v) {} \
\
[[nodiscard]] bool operator()(const T& x) const \
{ \
return op; \
} \
};

Definition at line 155 of file ops.H.

Referenced by equalOp1< T >::equalOp1(), greaterEqualOp1< T >::greaterEqualOp1(), greaterOp1< T >::greaterOp1(), lessEqualOp1< T >::lessEqualOp1(), lessOp1< T >::lessOp1(), and notEqualOp1< T >::notEqualOp1().

◆ WeightedOp

#define WeightedOp ( opName,
op )
Value:
\
template<class T, class CombineOp> \
class opName##WeightedOp \
{ \
const CombineOp& cop_; \
\
public: \
\
opName##WeightedOp(const CombineOp& cop) \
: \
cop_(cop) \
{} \
\
void operator() \
( \
T& x, \
const label index, \
const T& y, \
const scalar weight \
) const \
{ \
cop_(x, op); \
} \
}; \
#define WeightedOp(opName, op)
Definition ops.H:173

Definition at line 173 of file ops.H.

Referenced by multiplyWeightedOp< T, CombineOp >::multiplyWeightedOp().