diff options
author | cnugteren <web@cedricnugteren.nl> | 2016-03-30 16:24:38 -0700 |
---|---|---|
committer | cnugteren <web@cedricnugteren.nl> | 2016-03-30 16:24:38 -0700 |
commit | 6578102ae996ce0aa52b45704f38c1cd5a10d3c0 (patch) | |
tree | e02694a1b3d69a706353cfdd271ce4367bd92064 | |
parent | c1df78676471a8a26ea8ec5a092734566d490db4 (diff) |
CMake now downloads the cl.hpp header from the Khronos website when building the samples
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | samples/sgemm.cc | 6 |
3 files changed, 8 insertions, 4 deletions
@@ -2,4 +2,5 @@ build stash .* *.pyc -*.db
\ No newline at end of file +*.db +cl.hpp
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 65debdf4..d3ad6889 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,9 @@ endif() # This section contains all the code related to the examples if(SAMPLES) + # Downloads the cl.hpp file from Khronos + file(DOWNLOAD https://www.khronos.org/registry/cl/api/1.1/cl.hpp ${clblast_SOURCE_DIR}/samples/cl.hpp) + # Adds sample programs (C++) foreach(SAMPLE ${SAMPLE_PROGRAMS_CPP}) add_executable(clblast_sample_${SAMPLE} samples/${SAMPLE}.cc) diff --git a/samples/sgemm.cc b/samples/sgemm.cc index 8f33b6ad..785b051c 100644 --- a/samples/sgemm.cc +++ b/samples/sgemm.cc @@ -8,8 +8,8 @@ // Cedric Nugteren <www.cedricnugteren.nl> // // This file demonstrates the use of the SGEMM routine. It is a stand-alone example, but it does -// requires the Khronos C++ OpenCL API header file (not included). The example uses C++ features, -// but CLBlast can also be used using the regular C-style OpenCL API. +// require the Khronos C++ OpenCL API header file (downloaded by CMake). The example uses C++ +// features, but CLBlast can also be used using the regular C-style OpenCL API. // // Note that this example is meant for illustration purposes only. CLBlast provides other programs // for performance benchmarking ('client_xxxxx') and for correctness testing ('test_xxxxx'). @@ -22,7 +22,7 @@ // Includes the C++ OpenCL API. If not yet available, it can be found here: // https://www.khronos.org/registry/cl/api/1.1/cl.hpp -#include <CL/cl.hpp> +#include "cl.hpp" // Includes the CLBlast library #include <clblast.h> |