Difference between revisions of "OpenCL"
From NaplesPU Documentation
(Created page with "The OpenCL support for the nu+ architecture is made through POCL. == How to install vanilla POCL == # Download POCL following the http://portab...") |
|||
Line 1: | Line 1: | ||
− | The OpenCL support for the nu+ architecture is made through [[http://portablecl.org/| | + | The OpenCL support for the nu+ architecture is made through [[http://portablecl.org/|//portablecl.org/]]. |
− | == How to install vanilla | + | == How to install vanilla == |
− | # Download | + | # Download following the [[http://portablecl.org/download.html|link]]. |
# In order to build pocl, you need the following support libraries and tools: | # In order to build pocl, you need the following support libraries and tools: | ||
#* Latest released version of LLVM & Clang | #* Latest released version of LLVM & Clang | ||
Line 25: | Line 25: | ||
make && make install | make && make install | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | == Using pocl == | ||
+ | To compile with pocl you have to execute: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | gcc example1.c -o example `pkg-config --libs --cflags pocl` | ||
+ | </syntaxhighlight> | ||
+ | See [[http://portablecl.org/docs/html/using.html]] and [[https://github.com/pocl/pocl/issues/282]] for further informations. |
Revision as of 17:03, 14 September 2017
The OpenCL support for the nu+ architecture is made through [[1]].
How to install vanilla
- Download following the [[2]].
- In order to build pocl, you need the following support libraries and tools:
- Latest released version of LLVM & Clang
- GNU make
- libtool dlopen wrapper files (e.g. libltdl3-dev in Debian)
- pthread (should be installed by default)
- hwloc v1.0 or newer (e.g. libhwloc-dev)
- pkg-config
- cmake
- libclang-3.8-dev if you are using Ubuntu 16.04 LTS
- On Ubuntu 16.04 LTS you can run the following code on a terminal
-
sudo apt-get install llvm & clang & libltdl3-dev & libhwloc-dev & libhwloc-dev & libclang-3.8-dev & make & cmake
- Build and install
-
cd <directory-with-pocl-sources> mkdir build cd build cmake [-D<option>=<value> ...] .. make && make install
-
Using pocl
To compile with pocl you have to execute:
gcc example1.c -o example `pkg-config --libs --cflags pocl`