NVIDIA Iray SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Math API Configuration Options

The Math API configuration uses the Base API configuration, see

In particular, the Math API assertions are by default mapped to the Base API assertions.

Math API Configuration Options for Assertions

The Math API supports quality software development with assertions. They are contained in various places in the Math API include files.

These tests are mapped to corresponding Base API assertions by default, which in turn are switched off by default to have the performance of a release build. To activate the tests, you need to define the two macros mi_math_assert and mi_math_assert_msg before including the relevant include files. Defining only one of the two macros is considered an error. These macros and their parameters have the following meaning:

  • mi_math_assert(expr): If expr evaluates to true this macro shall have no effect. If expr evaluates to false this macro may print a diagnostic message and change the control flow of the program, such as aborting the program or throwing an exception. But it may also have no effect at all, for example if assertions are configured to be disabled.
  • mi_math_assert_msg(expr, msg): Same behavior as mi_math_assert(expr), but the msg text string contains additional diagnostic information that may be shown with a diagnostic message. Typical usages would contain "precondition" or "postcondition" as clarifying context information in the msg parameter.

See Math API Assertions and Base API Assertions.