Poplar and PopLibs
poplar::FloatingPointBehaviour Struct Reference

Structure to specify floating point behaviour. More...

#include <CSRFunctions.hpp>

Detailed Description

Structure to specify floating point behaviour.

Parameters
invIf true, a floating-point invalid operation (defined by IEEE 754) will cause an exception.
The invalid operations are:
  • Addition or subtraction where the operands are + or - infinity (inf) and the operation results in the subtraction of two infs; for example: (-inf)+(+inf) or (+inf)-(+inf).
  • Divisions: (+/-0)/(+/-0) and (+/-inf)/(+/-inf).
  • Multiplications: (+/-0)*(+/-inf) and (+/-inf)*(+/-0).
  • Remainder: x REM y where y=0 or x=(+/-inf).
  • Real operations with complex results such as the square root or logarithm of a negative number.
  • Operations with Not-a-Number as at least one operand.
  • Comparisons where one of the operands is Not-a-Number.
    See also nanoo below. It can also be set in the environment variable POPLAR_ENGINE_OPTIONS by setting debug.floatPointOpException to true.
divIf true a floating point divide by zero operation will cause an exception.
ofloIf true a floating point overflow will cause an exception.
esrEnable stochastic rounding.
nanooEnable Not-a-Number on overflow mode. When enabled, half precision calculations that have overflowed will produce a Not-a-Number result, rather than saturating to the half precision max/min value, and the invalid operation (inv) flag will be set. It can also be enabled in the environment variable POPLAR_ENGINE_OPTIONS by setting debug.nanOverflowMode to true.

The documentation for this struct was generated from the following file: