Applied result detail

Expand OpenCL Includes

POLOK, L.

Original Title

Expand OpenCL Includes

English Title

Expand OpenCL Includes

Type

Software

Abstract

Since an early version, it is possible to #include files in OpenCL kernels. While this is a reasonably good way to reduce repeated code, it also makes it harder to package your application. This tool partially preprocesses the given kernel files and expands the includes. It also (optionally) adds the #line directives so that in case there are compile errors, the line numbers and the original source file name are reported correctly.

This also includes a build rule for Visual Studio. This build rule cooperates with File-to-header to package the kernel in an include file so that it is not needed to package the kernel files alongside your application. Note that the kernels should be built in a separate VS project on which the main project should depend, to ensure correct build order (otherwise the headers get updated and the depending C++ files that include them may not get compiled anymore).

Abstract in English

Since an early version, it is possible to #include files in OpenCL kernels. While this is a reasonably good way to reduce repeated code, it also makes it harder to package your application. This tool partially preprocesses the given kernel files and expands the includes. It also (optionally) adds the #line directives so that in case there are compile errors, the line numbers and the original source file name are reported correctly.

This also includes a build rule for Visual Studio. This build rule cooperates with File-to-header to package the kernel in an include file so that it is not needed to package the kernel files alongside your application. Note that the kernels should be built in a separate VS project on which the main project should depend, to ensure correct build order (otherwise the headers get updated and the depending C++ files that include them may not get compiled anymore).

Keywords

OpenCL, GPGPU, kernel, preprocessor, compiler

Key words in English

OpenCL, GPGPU, kernel, preprocessor, compiler

Location

http://www.fit.vutbr.cz/~ipolok/prods.php?file=%2Fproduct%2F526%2FExpandCLIncludes_distro.zip&id=526¬itle=1

Licence fee

In order to use the result by another entity, it is always necessary to acquire a license

www

Documents