Operations

Located in file: MEL.hpp

template <typename T>
T MEL::Functor::MAX(T &a, T &b)

Binary Max Functor.

Return
Returns the max of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::MIN(T &a, T &b)

Binary Min Functor.

Return
Returns the min of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::SUM(T &a, T &b)

Binary Sum Functor.

Return
Returns the sum of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::PROD(T &a, T &b)

Binary Product Functor.

Return
Returns the product of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::LAND(T &a, T &b)

Binary Logical And Functor.

Return
Returns the logical and of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::BAND(T &a, T &b)

Binary bitwise and Functor.

Return
Returns the bitwise and of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::LOR(T &a, T &b)

Binary logical or Functor.

Return
Returns the logical or of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::BOR(T &a, T &b)

Binary bitwise or Functor.

Return
Returns the bitwise or of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::LXOR(T &a, T &b)

Binary logical exclusive or Functor.

Return
Returns the logical exclusive or of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T>
T MEL::Functor::BXOR(T &a, T &b)

Binary bitwise exclusive or Functor.

Return
Returns the bitwise exclusive or of the two inputs
Parameters
  • a -

    The left argument

  • b -

    The right argument

template <typename T, T(*)(T &, T &) F>
void MEL::Functor::ARRAY_OP_FUNC(T *in, T *inout, int *len, MPI_Datatype *dptr)

Maps the given binary functor to the local array of a reduction / accumulate operation.

Parameters
  • in -

    The left hand array for the reduction

  • inout -

    The right hand array for the reduction. This array is modified to reflect the result of the functor on each element

  • len -

    Pointer to a single int representing the number of elements to be processed

  • dptr -

    Pointer to a single derived datatype representing the data to be processed

template <typename T, T(*)(T &, T &) F>
Op MEL::OpCreate(bool commute = true)

Create a derived operation for reduction type functions.

See
MPI_Op_create
Return
Returns a handle to a new Op
Parameters
  • commute -

    Is the operation commutative?

void MEL::OpFree(Op &op)

Free a derived operation.

See
MPI_Op_free
Parameters
  • op -

    The op to free

void MEL::OpFree(std::vector<Op> &ops)

Free a std::vector of derived operations.

Parameters
  • ops -

    A std::vector of ops to be freed

template <typename T0, typename T1, typename... Args>
void MEL::OpFree(T0 &d0, T1 &d1, Args&&... args)

Free a varadic set of derived operations.

Parameters
  • d0 -

    The first op to free

  • d1 -

    The second op to free

  • args -

    The remaining ops to free