Intel® C++ Compiler 16.0 User and Reference Guide

target

Specifies a target for called functions or variables. This attribute only applies to Intel® Graphics Technology and Intel® MIC Architecture.

Syntax

Windows* OS:

__declspec(target(target-name))

Linux* OS:

__attribute__((target(target-name)))

Arguments

target-name

Specifies the target name. Possible values are:

gfx: Specifies the target name is Intel® Graphics Technology. This value is available on Windows* OS and Linux* OS on Intel® 64 architecture, and on Windows* OS on IA-32 architecture.

gfx_kernel: Declares a function as a named kernel for Intel® Graphics Technology. The named kernel is used for the asynchronous offload API. This value is available on Windows* OS and Linux* OS on Intel® 64 architecture, and on Windows* OS on IA-32 architecture.

mic: Specifies the target name is Intel® Many Integrated Core Architecture (Intel® MIC Architecture). This value is available on Windows* OS and Linux* OS on Intel® 64 architecture.

Description

This keyword specifies that the called function or variable is also available on the target. Only functions or variables marked with this attribute are available on the target, and only these functions can be called on the target.

A function declared as a named kernel using target(gfx_kernel) can only be invoked from the asynchronous offload API and not called from other target functions or target code.