.. index:: pair: group; Dnnl_api_mathmode .. _doxid-group__dnnl__api__mathmode: Dnnl_api_mathmode ================= .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_get_default_fpmath_mode`(:ref:`dnnl_fpmath_mode_t`* mode); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_default_fpmath_mode`(:ref:`dnnl_fpmath_mode_t` mode); .. _details-group__dnnl__api__mathmode: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; dnnl_get_default_fpmath_mode .. _doxid-group__dnnl__api__mathmode_1gada52f7858332a7cda0e0c5e7907056d7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_get_default_fpmath_mode(:ref:`dnnl_fpmath_mode_t`* mode) Returns the floating-point math mode that will be used by default for all subsequently created primitives. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - mode - Output FP math mode. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_set_default_fpmath_mode .. _doxid-group__dnnl__api__mathmode_1ga97dd535e43073cee2ebc4b709e42c3ca: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_default_fpmath_mode(:ref:`dnnl_fpmath_mode_t` mode) Sets the floating-point math mode that will be used by default for all subsequently created primitives. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - mode - FP math mode. The possible values are: :ref:`dnnl_fpmath_mode_strict `, :ref:`dnnl_fpmath_mode_bf16 `, :ref:`dnnl_fpmath_mode_f16 `, :ref:`dnnl_fpmath_mode_any `. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.