Commit Graph

140 Commits

Author SHA1 Message Date
Kyle Lutz
49fc80d204 Fix bug when using popcount() with ulong 2014-09-07 11:00:46 -07:00
Kyle Lutz
94d182d47d Rearrange allocator headers
This moves the allocator headers from 'container' to a new
top-level 'allocator' directory.

Also renames allocator<T> to buffer_allocator<T>.
2014-09-06 09:51:46 -07:00
Kyle Lutz
c69ea170fb Remove adjacent_transform_iterator class 2014-08-21 07:00:13 -07:00
f-koehler
15f9793bd8 choose qt4 or qt5 2014-08-05 16:36:46 +02:00
Kyle Lutz
8a11a320d3 Merge pull request #203 from f-koehler/master
explicitly look for Qt4 and not for Qt in general
2014-07-29 18:30:16 -07:00
fkoehler
b70df00ce4 explicitly look for Qt4 and not for Qt in general 2014-07-29 13:23:43 +02:00
Kyle Lutz
f21abdff7e Add bind() function 2014-07-27 10:33:59 -07:00
Kyle Lutz
9dc87712e9 Improve documentation 2014-07-11 23:25:41 -07:00
Kyle Lutz
a4ae254adc Rename mersenne_twister_engine header
This renames the mersenne_twister_engine header from
"mersenne_twister.hpp" to "mersenne_twister_engine.hpp".
2014-07-11 22:27:16 -07:00
Kyle Lutz
6af32b3d8f Add hash() function 2014-07-02 23:24:18 -07:00
Kyle Lutz
9f74b5290e Enable OpenCV on Travis-CI 2014-06-24 20:54:02 -07:00
roshanr
fd2506b161 Add quick and dirty linear congruential engine 2014-06-18 02:47:00 +05:30
Kyle Lutz
3ac85e3fbc Merge pull request #141 from roshanr95/discrete_distribution
Add discrete_distribution
2014-06-16 18:39:59 -07:00
roshanr
a0a7a85d0d Add discrete_distribution 2014-06-16 03:01:36 +05:30
roshanr
79063d4fb4 Add uniform_int_distribution 2014-06-15 02:28:59 +05:30
Kyle Lutz
36681a6ad5 Merge pull request #131 from roshanr95/bernoulli-distribution
Add bernoulli distribution
2014-06-04 18:41:37 -07:00
roshanr
1777b7e5bf Add bernoulli distribution 2014-06-04 03:41:19 +05:30
roshanr
b772ae4849 Add algorithm and test for is_permutation 2014-06-01 06:01:38 +05:30
roshanr
5e08e1b0b6 Add algorithm and test for prev_permutation 2014-06-01 06:01:31 +05:30
Kyle Lutz
ff11312fd5 Merge pull request #126 from roshanr95/next_permutation
Add algorithm and test for next_permutation
2014-05-29 23:16:31 -07:00
roshanr
e4f0783ecd Add algorithm and test for next_permutation 2014-05-29 22:31:11 +05:30
roshanr
c8d4836a6f Add partition_point algorithm and test 2014-05-26 03:43:19 +05:30
roshanr
4d3d114285 Add algorithm and test for stable_partition
Added algorithm and test for stable_partition.
Changed partition to use it for now till a
better implementation is found
2014-05-23 14:19:17 +05:30
Kyle Lutz
85af9d2630 Add variadic wait_for_all() function 2014-05-18 19:47:19 -07:00
roshanr
8dbc2b658d Add algorithm and test for includes 2014-05-19 01:42:16 +05:30
roshanr
de9b2ef6ff Add algorithm and test for set_symmetric_difference 2014-05-19 01:08:41 +05:30
roshanr
acbabfeeff Add algorithm and test for set_difference 2014-05-18 22:50:00 +05:30
roshanr
5f7cd290cf Add algorithm and test for set_union 2014-05-18 22:49:54 +05:30
roshanr
c522d9a337 Add algorithm and test for set_intersection 2014-05-16 19:14:48 +05:30
Kyle Lutz
b89c886462 Refactor exception classes
This refactors and improves the exception classes. Additional
documentation as well as testing has been added. This also adds
a new static method to opencl_error which converts OpenCL error
codes to human-readable strings.
2014-05-10 14:59:33 -07:00
Kyle Lutz
4bb78de369 Merge pull request #110 from roshanr95/search_n
Search_n
2014-05-10 10:09:16 -07:00
roshanr
d3b3881d9e Add algorithm and test for search_n 2014-05-09 22:48:40 +05:30
roshanr
09760b4372 Add algorithm and test for find_end 2014-05-09 05:16:04 +05:30
Kyle Lutz
6b7d83b40e Merge pull request #103 from roshanr95/search_algorithms
Search algorithm
2014-05-07 21:04:40 -07:00
roshanr
747fe2d41f Search algorithm
Add algorithm and test for search()
2014-05-04 23:41:43 +05:30
Kyle Lutz
00f782355e Add example and test for AMD's static C++ kernel language 2014-04-28 21:53:36 -07:00
Kyle Lutz
37a00f5c4e Add normal_distribution class 2014-04-27 15:27:15 -07:00
Kyle Lutz
f6bd9de8bd Reorganize tests for issues/bugs 2014-04-27 12:42:45 -07:00
Kyle Lutz
9343b99085 Improve documentation 2014-04-24 19:51:45 -07:00
roshanr
59efaa0eeb Add tests and benchmarks for unique_copy 2014-04-21 02:00:02 +05:30
Kyle Lutz
21d81fcd76 Add user_event class 2014-04-16 21:11:47 -07:00
Kyle Lutz
dd0b1fcb7b Add discard_iterator class 2014-04-13 13:45:01 -07:00
roshanr
1e81b7ec2e Unique algorithm
Added unique() algorithm, tests and benchmarks. Removed unused variable
in scan_on_gpu() to remove warnings
2014-03-24 06:30:28 +05:30
Kyle Lutz
8e086104a0 Add event::set_callback() method
This adds a method to the event class which allows the user to
register a callback function to be invoked when the event reaches
the specified state (e.g. when it completes).
2014-03-16 13:20:57 -07:00
Kyle Lutz
0c3a325554 Move transform_if() algorithm to experimental 2014-03-16 13:16:39 -07:00
Kyle Lutz
9bf22a41d1 Merge pull request #66 from roshanr95/rotate_copy
rotate_copy algorithm and test
2014-03-13 08:07:11 -07:00
Kyle Lutz
9e5bff9d83 Add SYSTEM to third-party include_directories() calls 2014-03-12 20:41:04 -07:00
Kyle Lutz
d03fab297d Merge pull request #63 from kylelutz/coveralls
Add coveralls.io integration
2014-03-12 19:06:41 -07:00
Kyle Lutz
524ce5c799 Add coveralls.io integration
This adds support for automatic code-coverage generation with
coveralls.io and Travis-CI.
2014-03-12 18:26:29 -07:00
roshanr
f1b7f39655 rotate_copy algorithm and test 2014-03-13 03:56:56 +05:30
Kyle Lutz
5fb6f94cea Merge pull request #62 from roshanr95/rotate
Rotate algorithm
2014-03-12 10:38:56 -07:00
roshanr
03edbbbdab Rotate algorithm 2014-03-12 22:41:30 +05:30
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
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
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
9e0431006a Rearrange types tests 2014-03-08 12:55:11 -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
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
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
84b45b4394 Bump Boost version requirement to 1.48
This bumps the required Boost version to 1.48 as Boost.Compute
makes use of Boost.Move which was added in version 1.48.

See issue #37.
2014-01-05 18:53:19 -08:00
Kyle Lutz
701bc8a5f3 Add nth_element() algorithm
This adds an implementation of the nth_element() algorithm. For
now the algorithm is trivially implemented by calling sort().
2013-11-15 20:51:13 -08:00
Kyle Lutz
8213697307 Add BOOST_COMPUTE_FUNCTION() macro
This adds a new macro to ease the definition of custom user
functions. The BOOST_COMPUTE_FUNCTION() macro creates a new
boost::compute::function<> object with the provided return
type, argument types, function name and OpenCL source code.
2013-11-10 15:32:15 -08:00
Kyle Lutz
feb510a019 Add unpack() function adaptor
This adds a new unpack() function adaptor which converts
a function with N arguments to a function which takes a
single tuple argument with N components.

This is useful for calling built-in functions with the tuples
values returned from zip_iterator. This also removes the now
un-needed binary_transform_iterator.
2013-09-24 23:05:08 -04:00
Kyle Lutz
44920c6443 Rename ext.get test to functional.get
This renames the ext.get test to function.get.
2013-09-24 22:37:32 -04:00
Kyle Lutz
dc6b3228eb Add as() and convert() type-conversion functions
This adds the as() and convert() functions for converting
between OpenCL types.
2013-09-24 22:27:50 -04:00
Kyle Lutz
07e4a6b3aa Remove BLAS functions
This removes the incomplete BLAS API functions.
2013-09-24 22:19:56 -04:00
Kyle Lutz
d16309f57e Add program_cache
This adds a program cache which can be used by algorithms and other
functions to store programs which may be re-used. This improves
performance by reducing the need for costly recompilation of commonly
used programs.

Program caches are context specific and multiple copies of the same
context will use the same program cache. They are created and accessed
by the global get_program_cache() function.

For now, only a few algorithms and functions (radix sort, mersenne
twister, fixed size sorts) make use of the program cache.
2013-09-07 22:58:34 -04:00
Kyle Lutz
d04e628367 Add experimental sort_by_transform() algorithm
This adds a sort_by_transform() algorithm which sorts a sets of
values based on the value of a transform function.

For example, this can be used to sort a set of vectors by their
length (when used with the length<T>() function) or by a single
component (when used with the get<N>() function).
2013-09-07 17:10:15 -04:00
Kyle Lutz
3389a5c741 Add sort_by_key() algorithm
This adds a new sort_by_key() algorithm which sorts a range
of values by a range of keys with a comparison operator.

For now this is only implemented by the serial insertion sort
algorithm. In the future it will be ported to the other sorting
algorithms (e.g. radix sort).
2013-09-07 17:02:08 -04:00
Kyle Lutz
f9d887e30d Add experimental tabulate() algorithm
This adds a tabulate() algorithm which fills a range with values
calculated from a function given each elements index.
2013-09-07 16:53:08 -04:00
Kyle Lutz
bacec5b8fe Add uniform_real_distribution
This adds a random number distribution which generates random
numbers in a uniform distribution.

Also adds a convenience algorithm which fills a range with
uniformly distributed random numbers between two values.
2013-08-13 20:40:42 -04:00
Kyle Lutz
fab7be5f43 Add inplace_merge() algorithm
This adds a simple inplace_merge() algorithm which merges
two contiguous sorted ranges in-place.

For now, the implementation simply copies the ranges to
two temporary vectors and calls merge().
2013-05-20 20:50:12 -04:00
Kyle Lutz
b43e79b983 Add support for get<N>() in lambda expressions
This adds support for using the get<N>() function in lambda
expressions to extract a single component of an aggregate type.

Also adds a test of using boost::tuple<> to store a user-defined
data type on the device and sort them by their first component
using a lambda expression as the comparator.
2013-05-20 20:50:10 -04:00
Kyle Lutz
9a64f6b39a Add get<N>() function
This adds a get<N>() function which returns the n'th element
of an aggregate type (e.g. vector type, pair, tuple).

This unifies the functionality of, and replaces, the get_pair()
and vector_component() functions.
2013-05-05 12:46:05 -04:00
Kyle Lutz
3e840fa306 Add transform_if() algorithm
This adds a new algorithm named transform_if() which applies
a given unary function to an input value only if it passes a
separate predicate function.
2013-05-05 11:51:21 -04:00
Kyle Lutz
49a34442e5 Remove unused histogram() algorithm
This removes the unused histogram() algorithm.
2013-05-05 10:56:14 -04:00
Dominic Meiser
2a93124ef5 Using FindOpenCL module from VexCL
Changed CMakeLists.txt files in Boost.Compute to use the variables
defined by FindOpenCL.
2013-04-23 20:03:38 -04:00
Kyle Lutz
ea107ae5d6 Add clamp_range() algorithm
This adds a clamp_range() algorithm which clamps a range
of values between a low and high value. This is based on
the algorithm of the same name in Boost.Algorithm.
2013-04-22 22:06:04 -04:00
Kyle Lutz
3b24d0d15e Add test for SAXPY
This adds a test for the SAXPY function.
2013-04-22 20:40:50 -04:00
Kyle Lutz
35f3bdc7fd Add test for transform_iterator
This adds a unit test for transform_iterator.
2013-03-19 18:22:54 -04:00
Kyle Lutz
d80e2a5c30 Add test for permutation_iterator
This adds a unit test for permutation_iterator.
2013-03-19 18:22:08 -04:00
Kyle Lutz
5f6bdf8644 Add test for counting_iterator
This adds a unit test for counting_iterator.
2013-03-19 18:12:22 -04:00
Kyle Lutz
4aaf4bcbb0 Add test for constant_iterator
This adds a unit test for constant_iterator.
2013-03-19 18:11:59 -04:00
Kyle Lutz
7c3a05b421 Add construct_from_cl_context test-case to test_context
This adds a new test executable for the context class and
adds a new test-case which checks the functionality of the
context(cl_context) constructor.
2013-03-19 17:51:44 -04:00
Kyle Lutz
2d81f561c4 Add zip_iterator class
This adds a zip_iterator class which allows for one or more
iterators to be combined into a single iterator object.
2013-03-17 23:42:56 -04:00
Kyle Lutz
ada2351812 Add support for boost::tuple<>
This adds support for using boost::tuple<> types with the
Boost.Compute containers and algorithms.
2013-03-17 23:28:07 -04:00
Kyle Lutz
69aef15cab Add merge() algorithm
This implements the merge() algorithm which merges two
ranges of sorted values into a single sorted range.

The current implementation uses a simple serial merge
algorithm. A GPU optimized version is coming soon.
2013-03-10 20:10:58 -04:00
Kyle Lutz
d34cdaac59 Initial commit 2013-03-02 15:14:17 -05:00