Skip to content

Automatic download OpenCL header files (version 1.0 to 2.1) from Khronos Group repositories

License

Notifications You must be signed in to change notification settings

robertwgh/get-opencl-headers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

get-opencl-headers

Description

This script automatically fetches OpenCL header files from Khronos Group repositories to your local workspace:

Usage

Fetch OpenCL headers including cl.h, cl_ext.h, cl_go.h and so on.

sh get-opencl-headers.sh

Fetch cl.hpp header (for OpenCL 1.0, 1.1, 1.2) or cl2.hpp (for OpenCL 2.0, 2.1), simply add an argument "--include-clhpp":

sh get-opencl-headers.sh --include-clhpp

Notice: to get the cl.hpp header, python is required (some function templates in cl.hpp are generated by a python script.)

Local file structures

After fetching is done, the headers are put into include folder with the following structure:

-include
    |-CL10
    |-CL11
    |-CL12
    |-CL20
    |-CL21
    |-CL

The CL folder is a symbolic link, by default, pointing to CL11. You can change it based on your need. For example, if we want CL to link to CL20:

rm CL
ln -s CL20 CL

Therefore, in your OpenCL program, you can easily include OpenCL header file by doing the following:

#include <CL/cl.h>

or

#include <CL/cl.hpp>

About

Automatic download OpenCL header files (version 1.0 to 2.1) from Khronos Group repositories

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages