Skip to content

Commit

Permalink
Update global make with C++ instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdeakin committed Sep 12, 2013
1 parent dddaa72 commit 1e96259
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,34 @@ try `export CPATH=/path/to/OpenCL/include` and `export LD_LIBRARY_PATH=/path/to/

You can also run `make` in the Examples/ and Solutions/ high-level directory;
this calls all the sub-directory make files so all the examples can be built in one command.
This also builds all the C++ examples.

Define the variable `DEVICE` in the Makefiles to be one of the OpenCL device types to vary the device type the C applications use.
This can be done easily in the two global Makefiles found in the Exercises and Solutions directories.
To use a GPU, for example, change the line `DEVICE = CL_DEVICE_TYPE_DEFAULT` to `DEVICE=CL_DEVICE_TYPE_GPU`.

Note: you can also edit each of the source files to use a specific device type, but we would recommend using the global Makefile method above.

Define the variable `CC` to change the C compiler used.
By default, this is set to gcc for all platforms.

**C++**

You must first run `make` to build the binary.
We assume that your environment is set up to find the OpenCL library.

You can also run `make` in the Examples/ and Solutions/ high-level directory;
this calls all the sub-directory make files so all the examples can be built in one command.
This also builds all the C examples.

Define the variable `DEVICE` in the Makefiles to be one of the OpenCL device types to vary the device type the C++ applications use.
This can be done easily in the two global Makefiles found in the Exercises and Solutions directories.
To use a GPU, for example, change the line `DEVICE = CL_DEVICE_TYPE_DEFAULT` to `DEVICE=CL_DEVICE_TYPE_GPU`.

Note: you can also edit each of the source files to use a specific device type, but we would recommend using the global Makefile method above.

Define the variable `CPPC` to change the C compiler used.
By default, this is set to g++ on Linux, and clang++ on OS X.

Directory structure
-------------------
Expand Down

0 comments on commit 1e96259

Please sign in to comment.