table of contents
other versions
other sections
__ATTRIBUTE__(3clc) | OpenCL Manual | __ATTRIBUTE__(3clc) |
NAME¶
__attribute__¶
__attribute__ ((attribute-list)) attribute-list: attribute<sub>opt</sub> attribute-list, attribute<sub>opt</sub> attribute: attribute-token attribute-argument-clause<sub>opt</sub> attribute-token: identifier attribute-argument-clause: ( attribute-argument-list ) attribute-argument-list: attribute-argument attribute-argument-list, attribute-argument attribute-argument: assignment-expression |
DESCRIPTION¶
This section describes the syntax with which __attribute__ may be used, and the constructs to which attribute specifiers bind. An attribute specifier is of the form __attribute__ ((attribute-list )). This syntax is taken directly from GCC but unlike GCC, which allows attributes to be applied only to functions, types, and variables, OpenCL attributes can be associated with:•attributes-types(3clc)
•functionQualifiers(3clc)
•attributes-variables(3clc)
•attributes-blocksAndControlFlow(3clc)
•attributes-blocksAndControlFlow(3clc)
In general, the rules for how an attribute binds for a given context are
non-trivial and the reader is pointed to GCC's documentation and Maurer and
Wong's paper (See the "References" section in the OpenCL
specification[1] for details.)
SPECIFICATION¶
OpenCL Specification[2]SEE ALSO¶
attributes-types(3clc), attributes-variables(3clc), attributes-blocksAndControlFlow(3clc), functionQualifiers(3clc)AUTHORS¶
The Khronos GroupCOPYRIGHT¶
Copyright © 2007-2011 The Khronos Group Inc.NOTES¶
- 1.
- OpenCL specification
page 355, section 11 - References (to Wong paper)
- 2.
- OpenCL Specification
page 236, section 6.11. - Attribute Qualifiers
06/18/2014 | The Khronos Group |