]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/compute/doc/getting_started.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / compute / doc / getting_started.qbk
1 [/===========================================================================
2 Copyright (c) 2013-2015 Kyle Lutz <kyle.r.lutz@gmail.com>
3
4 Distributed under the Boost Software License, Version 1.0
5 See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt
7 =============================================================================/]
8
9 [section:getting_started Getting Started]
10
11 [section Installation]
12
13 Boost.Compute is available in Boost starting with version 1.61. Visit
14 [@http://www.boost.org/users/download/] for download instructions.
15
16 [endsect]
17
18 [section Compilation and Usage]
19
20 Boost.Compute is a header-only library, so no linking is required. To use the
21 library just add the include directory to the compilation flags and link with
22 the system's OpenCL library. For example, with GCC:
23
24 ``
25 g++ -I/path/to/compute/include main.cpp -lOpenCL
26 ``
27
28 All of the Boost.Compute headers can be included with the following directive:
29
30 ``
31 #include <boost/compute.hpp>
32 ``
33
34 If you only want to include the core OpenCL wrapper headers (which have minimal
35 dependencies on the rest of Boost), use the following directive:
36
37 ``
38 #include <boost/compute/core.hpp>
39 ``
40
41 All of the classes and functions in Boost.Compute live in the `boost::compute`
42 namespace and can be brought into global scope with:
43
44 ``
45 using namespace boost::compute;
46 ``
47
48 [endsect]
49
50 [section Configuration Macros]
51
52 Boost.Compute provides a number of optional features which can be configured
53 with the following macros.
54
55 [table
56 [[Macro] [Description]]
57 [
58 [[^BOOST_COMPUTE_DEBUG_KERNEL_COMPILATION]][
59 When defined, if program::build() fails, the program source and
60 build log will be written to stdout.
61 ]
62 ]
63 [
64 [[^BOOST_COMPUTE_HAVE_THREAD_LOCAL]][
65 Enables the use of C++11 [^thread_local] storage specifier.
66 ]
67 ]
68 [
69 [[^BOOST_COMPUTE_THREAD_SAFE]][
70 Builds Boost.Compute in a thread-safe mode. This requires either
71 support for C++11 thread-local storage (via defining the
72 [^BOOST_COMPUTE_HAVE_THREAD_LOCAL] macro) or linking with
73 Boost.Thread.
74 ]
75 ]
76 [
77 [[^BOOST_COMPUTE_USE_OFFLINE_CACHE]][
78 Enables the offline-cache which stores compiled binaries on disk.
79 This option requires linking with Boost.Filesystem and
80 Boost.System.
81 ]
82 ]
83 ]
84
85 [endsect]
86
87 [section Support]
88
89 Bugs and issues can be reported to the
90 [@https://github.com/boostorg/compute/issues?state=open issue tracker].
91
92 There is also a mailing list for users and developers at
93 [@https://groups.google.com/forum/#!forum/boost-compute].
94
95 Look through the [link boost_compute.faq FAQ] to see if you're encountering a
96 known or common issue.
97
98 [endsect] [/ support]
99
100 [endsect]