IFELSE#

Conditional “if/else” statement for operators

template<typename C1, typename T1, typename T2>
class IFELSE : public matx::BaseOp<IFELSE<C1, T1, T2>>#

Conditionally execute an operator, otherwise execute a different operator

Compares two operators or views and conditionally executes the second statement if the first is true, otherwise executes the third statement. Values from an operator are executed individually, and the only requirement for the conditional is the comparison operator must be defined for the particular type. For example, operator< on two integers is okay, but the same operator on two complex numbers will give a compiler error.

Examples#

IFELSE(tiv0 == d, tov0 = z, tov0 = d).run(exec);