.. _get_status: get_status ========== Gets the VM Status. .. contents:: :local: :depth: 1 Description *********** The ``get_status`` function gets the VM status. The global VM Status is a single value and it accumulates via bitwise OR ( \| ) all computational errors that happen inside VM functions. The following table lists the possible error values. .. tabularcolumns:: |\Y{0.4}|\Y{0.6}| .. list-table:: :header-rows: 1 :class: longtable * - Status - Description * - Successful Execution - * - ``status::success`` - VM function execution completed successfully * - ``status::not_defined`` - VM status not defined * - Warnings - * - ``status::accuracy_warning`` - VM function execution completed successfully in a different accuracy mode * - Computational Errors - * - ``status::errdom`` - Values are out of a range of definition producing invalid (QNaN) result * - ``status::sing`` - Values cause divide-by-zero (singularity) errors and produce and invalid (QNaN or Inf) result * - ``status::overflow`` - An overflow happened during the calculation process * - ``status::underflow`` - An underflow happened during the calculation process API *** Syntax ------ .. code-block:: cpp uint8_t get_status (queue& exec_queue ) ``get_status`` supports the following devices: Host, CPU, and GPU. Input Parameters ---------------- exec_queue The queue where the routine should be executed. Output Parameters ----------------- return value (status) Specifies the VM status. Examples ******** .. code-block:: uint8_t err = get_status (exec_queue); if (err & status::errdom) { std::cout << ”Errdom status returned” << std::endl; } if (err & status::sing) { std::cout << ”Singularity status returned” << std::endl; }