Intel® Math Kernel Library 2018 Developer Reference - C

mkl_mic_get_workdivision

For computations in the Automatic Offload mode, retrieves the fraction of the work for the specified coprocessor or host CPU to do.

Syntax

int mkl_mic_get_workdivision (MKL_MIC_TARGET_TYPE target_type, int target_number, double *wd);

Include Files

Input Parameters

Name

Type

Description

target_type

MKL_MIC_TARGET_TYPE

Type of the target device. Use one of the following values:

  • MKL_TARGET_HOST - host CPU

  • MKL_TARGET_MIC - Intel Xeon Phi coprocessor, default

target_number

int

The device to retrieve the fraction of work for. Takes the following values:

  • 0. Specifies execution on a specific coprocessor. The coprocessor is determined by target_number modulo the number of Intel Xeon Phi coprocessors on the system as returned by mkl_mic_get_device_count(). For example: for a system with 4 Intel Xeon Phi coprocessors, target_number = 6 determines the coprocessor number 2.

  • <0. Reserved.

If target_type = MKL_TARGET_HOST, the function ignores the target_number parameter, which may have any value.

Output Parameters

Name

Type

Description

wd

double

The fractional amount of the work that the specified device should do, where 0.0 wd 1.0.

MKL_MIC_AUTO_WORKDIVISION set for wd indicates that Intel MKL should determine the amount of the work for the specified device.

Description

If you are using Intel MKL in the Automatic Offload mode, the mkl_mic_get_workdivision function provides you with the amount of the work that the specified coprocessor or host CPU is configured to do.

Return Values

Name

Type

Description

ierr

int

Result status:

= 0  Indicates that the fraction is successfully returned.

< 0  Indicates a failure to retrieve the fraction.

See Also