Define MORPHEUS_EXPECTS

MORPHEUS_EXPECTS(cond, reason)

Macro for checking (pre-)conditions that throws an exception when a condition is violated.

Example usage:

Copy
Copied!
            

MORPHEUS_EXPECTS(lhs->dtype == rhs->dtype, "Column type mismatch");

Parameters:
  • cond[in] Expression that evaluates to true or false

  • reason[in] String literal description of the reason that cond is expected to be true

Throws morpheus::LogicError:

if the condition evaluates to false.

© Copyright 2023, NVIDIA. Last updated on Aug 23, 2023.