get_mode

Gets the VM mode.

Syntax

uint64_t get_mode(queue &exec_queue)

Description

The function get_mode function returns the global VM mode parameter that controls accuracy, handling of denormalized numbers, and error handling options. The variable value is a combination by bitwise OR ( | ) of the values listed in the following table.

Value of mode

Description

Accuracy Control

mode::ha

High accuracy versions of VM functions.

mode::la

Low accuracy versions of VM functions.

mode::ep

Enhanced performance accuracy versions of VM functions.

Denormalized Numbers Handling Control

mode::ftzdazon

Faster processing of denormalized inputs is enabled.

mode::ftzdazoff

Faster processing of denormalized inputs is disabled.

Other

mode::not_defined

VM status not defined.

See example below:

Input Parameters

exec_queue

The queue where the routine should be executed.

Output Parameters

return value (old_mode)

Specifies the global VM mode.

Example

accm = get_mode (exec_queue) & mode::accuracy_mask;
denm = get_mode (exec_queue) & mode::ftzdaz_mask;