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 \m[blue]OpenCL specification\m[]\s-2\u[1]\d\s+2 for details.)

SPECIFICATION

\m[blue]OpenCL Specification\m[]\s-2\u[2]\d\s+2

RELATED TO attribute…

attributes-types(3clc), attributes-variables(3clc), attributes-blocksAndControlFlow(3clc), functionQualifiers(3clc)

AUTHORS

The Khronos Group

COPYRIGHT

Copyright © 2007-2011 The Khronos Group Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.

NOTES

1.

OpenCL specification

page 355, section 11 - References (to Wong paper)

2.

OpenCL Specification

page 236, section 6.11. - Attribute Qualifiers