set_mode#

Sets a new mode for VM functions according to the mode parameter and returns the previous VM mode.

Syntax

namespace oneapi::mkl::vm {

    oneapi::mkl::vm::mode set_mode(
        sycl::queue& exec_queue,
        oneapi::mkl::vm::mode new_mode);

} // namespace oneapi::mkl::vm

Description

The set_mode function sets a new mode for VM functions according to the new_mode parameter and returns the previous VM mode. The mode change has a global effect on all the VM functions within a queue.

The mode parameter is designed to control accuracy for a given queue.

Value of mode

Description

Accuracy Control

oneapi::mkl::vm::mode::ha

High accuracy versions of VM functions.

oneapi::mkl::vm::mode::la

Low accuracy versions of VM functions.

oneapi::mkl::vm::mode::ep

Enhanced performance accuracy versions of VM functions.

oneapi::mkl::vm::mode::not_defined

VM mode not defined. This has no effect.

The assumed value of the mode parameter for a new queue, if set_mode is not called is oneapi::mkl::vm::mode::ha.

Input Parameters

exec_queue

The queue where the routine should be executed.

new_mode

Specifies the VM mode to be set.

Output Parameters

return value (old_mode)

Specifies the former VM mode.