OpenCL Example

This is a small collection of OpenCL example to demostrate the OpenCL APIs.

Contents

  • vec_add: A simple vector addition in OpenCL
    • vec_add_source.c: Host program to run vec_add.cl from source.
    • vec_add_binary.c: Host program to run vec_add.cl from the pre-built binary.
    • vec_add_spir.c: Host program to run vec_add.cl from SPIR.
  • fma: A simple fma program to demostrate clLinkProgram().
  • cl-compile: A simple program to compile OpenCL to prebuilt binaries.

License

The source code and documentation are hereby granted released in public domain.