2
0
mirror of https://github.com/boostorg/compute.git synced 2026-01-31 08:02:16 +00:00
Commit Graph

182 Commits

Author SHA1 Message Date
Kyle Lutz
83d104f24f Add BOOST_COMPUTE_CLOSURE() macro
This adds a new macro which allows users to create closure functions
which can capture C++ variables and make them available in OpenCL.
2014-03-08 18:44:03 -08:00
Kyle Lutz
dec92cc438 Add BOOST_COMPUTE_ADAPT_STRUCT() macro
This adds a new macro which allows the user to adapt a C++ struct
or class for use with OpenCL given its type, name, and members.

This allows for custom user-defined data-types to be used with the
Boost.Compute containers and algorithms.
2014-03-08 18:21:34 -08:00
Kyle Lutz
6f3f30bee9 Add enqueue_native_kernel() method to command_queue 2014-03-08 15:21:57 -08:00
Kyle Lutz
3b49cf14f8 Add wait_list class
This adds a wait_list class which contains a vector of OpenCL
events that can be waited on before executing further commands.
2014-03-08 14:09:41 -08:00
Kyle Lutz
71af014b3d Add mapped_view container 2014-03-08 13:17:55 -08:00
Kyle Lutz
51e89596b1 Simplify accumulate() with reduce() 2014-03-08 13:13:32 -08:00
Kyle Lutz
b8de46d4de Add experimental directory
This adds an experimental directory which contains various
experimental algorithms and functions. The files and APIs
under this directory are experimental and unstable.
2014-03-08 13:02:06 -08:00
Kyle Lutz
86c0bb0a12 Add inline specifier to opengl_enqueue_release_gl_objects() 2014-02-28 21:09:34 -08:00
Kyle Lutz
b1b50f5e3a Add meta_kernel::insert_function_call() method 2014-02-24 19:56:52 -08:00
Kyle Lutz
d9a45b06d3 Move float vector stream operators in meta_kernel 2014-02-24 19:42:31 -08:00
Kyle Lutz
80781ce9d2 Add OpenCV-OCL interop functions 2014-02-22 10:57:42 -08:00
Kyle Lutz
dacdbf0ffd Bug in fill() with uchar4 2014-02-22 10:51:39 -08:00
Kyle Lutz
e7a76c343a Remove unused variable in reduce_on_gpu() kernel 2014-02-14 18:14:18 -08:00
Kyle Lutz
ec11d8cdc4 Add third-party perf tests
This adds third-party performance tests to use in comparing
Boost.Compute with other parallel/GPGPU frameworks like Intel's
TBB and NVIDIA's Thrust along with the C++ STL.

Also refactors the timing and profiling infrastructure and adds
a simple perf.py driver script for running performance tests.
2014-02-02 13:12:17 -08:00
Kyle Lutz
6de0b65d18 Improve documentation 2014-02-02 11:32:49 -08:00
Kyle Lutz
f3c2384af4 Add opengl_create_shared_context() function 2014-02-01 12:27:23 -08:00
Kyle Lutz
0c88eca831 Add platform::id() method 2014-02-01 12:17:21 -08:00
Kyle Lutz
9a0aa33c2f Make platform::get_extension_function_address() const 2014-02-01 12:15:53 -08:00
Kyle Lutz
ccd6f21d98 Change vector constructors to take queue argument
This changes the vector<T> constructors which copy or initialize
data to take a queue argument used for performing the operations.

Previously they just took a context argument used to initialize the
buffer and then created a new command queue to use. This improves
performance by not requiring a new command queue and also fixes issues
when performing operations on a different command queue while the
vector was still being initialized.
2014-01-27 23:39:19 -08:00
Kyle Lutz
47922aa780 Add Boost version check to config.hpp
This adds a compile-time check to config.hpp which ensures
that the miniumum supported Boost version (1.48) is found.
2014-01-20 18:31:18 -08:00
Kyle Lutz
dc20f09d92 Add make_tuple() lambda function 2014-01-14 22:18:35 -08:00
Kyle Lutz
ea7c2bf2f4 Add make_pair() lambda function 2014-01-14 22:03:48 -08:00
Kyle Lutz
c784ae994e Add third lambda placeholder 2014-01-14 22:00:22 -08:00
Kyle Lutz
46ef3fffb5 Make lambda function expressions variadic 2014-01-14 21:58:09 -08:00
Kyle Lutz
c57e1953d8 Make lambda get<N>() variadic 2014-01-14 21:54:54 -08:00
Kyle Lutz
8aad57612b Make function_signature_to_mpl_vector<> meta-function variadic 2014-01-14 21:52:34 -08:00
Kyle Lutz
72664c8de9 Add test for generate() with pair<T1, T2> 2014-01-14 21:31:51 -08:00
Kyle Lutz
68412f5ae0 Refactor function handling in lambda expressions 2014-01-13 18:27:57 -08:00
Kyle Lutz
936d801466 Add support for host iterators to sort() 2014-01-13 18:27:52 -08:00
Kyle Lutz
413267b32a Improve accumulate() performance
This improves the performance for the accumulate() algorithm
for types/operations that can be performed with reduce().
2014-01-13 18:27:48 -08:00
Kyle Lutz
ac148e8f1f Fix extra semicolon warning in interop/eigen/core.hpp 2014-01-13 18:27:40 -08:00
Denis Demidov
5e912dff1c Move BOOST_COMPUTE_MAX_ARITY definition to compute/config.hpp 2014-01-10 09:55:35 +04:00
Denis Demidov
52bae83504 Make zip_iterator take more than three elements
This uses Boost.Preprocessor macros to allow zip iterators to work with
arbitrary number of elements (the current limit is maximum boost::tuple
size which is 10 by default).

Refs #50
2014-01-09 23:39:58 +04:00
Denis Demidov
d24749ae52 Use SHA1 for online cache keys
This makes online cache use sha1 of the program source as key.
Introduces boost::compute::detail::sha1() function, which is moved
from compute::program into its own header file.
2014-01-07 23:07:18 +04:00
Kyle Lutz
6f52e3ce1f Merge pull request #46 from ddemidov/offline-cache
Use the original program source for program creation/compilation
2014-01-07 10:11:08 -08:00
Denis Demidov
41d2052c2a Fix linkage problem with detail::getenv()
detail::getenv() function was not declared inline, which led to
`multiple definition` errors at link time when a program consisted of
multiple objects that included Boost.Compute headers.

Fixed the problem and added core.multiple_objects test.
2014-01-07 21:29:18 +04:00
Denis Demidov
f519ad3639 Use the original program source for program creation/compilation
Instead of building the program from source with the added comment
block (used for distinction between different platforms and devices
when offline cache is in use), only use the altered source for the
hash computation. This way users will not get unexpected results from
program.source().
2014-01-07 21:05:26 +04:00
Kyle Lutz
aad03486d9 Add interop support
This adds interoperability support between Boost.Compute and various
other C/C++ libraries (Eigen, OpenCV, OpenGL, Qt and VTK). This eases
development for users using external libraries with Boost.Compute.
2014-01-06 23:35:38 -08:00
Kyle Lutz
b47e74df6f Add is_fundamental type-trait 2014-01-06 23:04:36 -08:00
Kyle Lutz
eca81df028 Merge pull request #39 from ddemidov/offline-cache
Implements offline kernel caching
2014-01-06 22:47:52 -08:00
Denis Demidov
562f149b18 Implements offline kernel caching
See kylelutz/compute#21

This adds program::build_with_source() function that both creates and
builds the program for the given context with supplied source and
compile options. In case BOOST_COMPUTE_USE_OFFLINE_CACHE macro is
defined, it also saves the compiled program binary for reuse in the
offline cache located in $HOME/.boost_compute folder on UNIX-like
systems and in %APPDATA%/boost_compute folder on Windows.

All internal uses of program::create_with_source() followed by
program::build() are replaced with program::build_with_source().
2014-01-07 09:07:00 +04:00
Kyle Lutz
b17888b604 Move future header to async directory 2014-01-06 18:44:37 -08:00
Kyle Lutz
55eeada078 Add getenv() wrapper
This adds a getenv() wrapper which can be used to avoid having to
explicitly disable MSVC warnings when checking for environment
variables.
2014-01-06 07:53:07 -08:00
Kyle Lutz
e337f632da Add height() and width() methods to image2d 2014-01-05 18:36:29 -08:00
Kyle Lutz
3bc4a6366d Add BOOST_COMPUTE_STRINGIZE_SOURCE() macro 2014-01-05 18:30:34 -08:00
Kyle Lutz
6b30645d6d Remove extra semicolon in accumulate.hpp 2014-01-05 18:18:45 -08:00
Kyle Lutz
0d9be38326 Fix issues with gather() algorithm
This fixes some issues with the gather algorithm and also
adds another test for it.
2013-12-21 15:34:29 -08:00
Kyle Lutz
55783258e7 Add cache support to meta_kernel::compile()
This updates the meta_kernel::compile() method to support
caching of program objects. The programs are cached based
on a hash of their source code.
2013-12-21 11:44:02 -08:00
Kyle Lutz
ac1ff45eff Add reduce_on_gpu() algorithm
This adds a improved reduce() algorithm implementation for
GPUs. Also adds checks to accumulate() which allow it to
use the higher-performance reduce() algorithm if possible.
2013-12-21 10:56:55 -08:00
Kyle Lutz
26612823a4 Add merge() overload with custom compare function
This adds a merge() function overload which uses a custom compare
function instead of the default less<T>() to compare the values.
2013-12-07 15:15:37 -08:00