Support OpenCL source code

Issue #847 resolved
Erik Schnetter created an issue

OpenCL source code needs to be compiled at run time, and thus needs to be passed as string to the OpenCL run-time library. This makes writing OpenCL source code inconvenient.

This patch adds *.cl as supported file type to Cactus. *.cl files are transformed into globally visible strings, with a name consisting of the thorn name and file name. These strings can then be easily used at run time to build and run OpenCL code.

Since *.cl files are converted to strings (and are not OpenCL-compiled at build time), there are no CL* options specifying compiler type, compiler flags etc.

Keyword:

Comments (3)

  1. Frank Löffler
    • changed status to open
    • removed comment

    This patch also changes the definition of CU_DEPEND to CUCC_DEPEND. Is this intentional?

    Otherwise the (untested) patch looks good and this would be a useful addition to Cactus.

  2. Log in to comment