]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/compute/doc/design.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / compute / doc / design.qbk
CommitLineData
7c673cae
FG
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:design Design]
10
11[section Library Architecture]
12
13The Boost Compute library consists of several different components. The core
14layer provides a "thin" C++ wrapper over the OpenCL API. This includes classes
15to manage OpenCL objects such as
16[classref boost::compute::device device]'s,
17[classref boost::compute::device kernel]'s and
18[classref boost::compute::device command_queue]'s.
19
20On top of the core layer is a partial implementation of the C++ standard
21library providing common containers (e.g.
22[classref boost::compute::vector vector<T>],
23[classref boost::compute::array array<T, N>]) along with common algorithms
24(e.g. [funcref boost::compute::transform transform()] and
25[funcref boost::compute::sort sort()]).
26
27The library also provides a number of "fancy" iterators (e.g.
28[classref boost::compute::transform_iterator transform_iterator] and
29[classref boost::compute::permutation_iterator permutation_iterator]) which
30enhance the functionality of the standard algorithms.
31
32Boost.Compute also supplies a number of facilities for interoperation with
33other C and C++ libraries. See the section on [link boost_compute.interop
34interoperability] for more information.
35
36See the [link boost_compute.reference.api_overview API Overview] section for
37a full list of functions, classes, and macros provided by Boost.Compute.
38
39[endsect] [/ library architecture]
40
41[section Why OpenCL]
42
43Boost.Compute uses [@http://en.wikipedia.org/wiki/OpenCL OpenCL] as its
44interface for executing code on parallel devices such as GPUs and multi-core
45CPUs.
46
47OpenCL was chosen for a number of reasons:
48
49* Vendor-neutral, standard C/C++, and doesn't require a special compiler,
50non-standard pragmas, or compiler extensions.
51* It is not just another parallel-library abstraction layer, it provides direct
52access to the underlying hardware.
53* Its runtime compilation model allows for kernels to be optimized and tuned
54dynamically for the device present when the application is run rather that the
55device that was present when the code was compiled (which is often a separate
56machine).
57* Using OpenCL allows Boost.Compute to directly interoperate with other OpenCL
58libraries (such as VexCL and OpenCV), as well as existing code written with
59OpenCL.
60* The "thin" C++ wrapper provided by Boost.Compute allows the user to break-out
61and write their own custom kernels when the provided APIs are not suitable.
62
63[endsect] [/ why opencl]
64
65[endsect]