Commit Graph

530 Commits

Author SHA1 Message Date
Kyle Lutz
16fdb15395 Add identity<T>() function 2014-11-29 10:19:53 -08:00
Kyle Lutz
3e3f46d144 Define BOOST_COMPUTE_DEBUG_KERNEL_COMPILATION for tests 2014-11-28 13:20:21 -08:00
Kyle Lutz
85e03f7e69 Merge pull request #315 from kylelutz/copy-to-vector-bool
Fix issue with copy() and std::vector<bool>
2014-11-28 12:34:46 -08:00
Mageswaran.D
9d813a2309 oveloaded find() for string and char pointer 2014-11-27 11:31:43 +05:30
Kyle Lutz
a6bdf21b31 Fix issue with copy() and std::vector<bool> 2014-11-26 08:46:39 -08:00
Kyle Lutz
1e0505d79c Merge pull request #311 from f-koehler/pr229
Reimplemented unit tests for unsupported extension and context error
2014-11-24 08:02:36 -08:00
f-koehler
d57fa9ffb0 reimplemented unit tests for unsupported extension and context error 2014-11-24 16:13:58 +01:00
Kyle Lutz
16834b9fb4 Improve documentation 2014-11-19 23:29:28 -08:00
Kyle Lutz
7ffd2224e8 Merge pull request #307 from Mageswaran1989/lexicographical_compare
added lexicographical_compare algorithm & test cases
2014-11-19 10:44:10 -08:00
Mageswaran.D
af7e38d2ce added lexicographical_compare algorithm & test cases 2014-11-19 23:49:10 +05:30
Kyle Lutz
3183effcb0 Merge pull request #306 from shehzan10/test-event-nvidia-fix
Adding OpenCL 1.2 required for NVIDIA when build with C++11
2014-11-11 21:57:30 -08:00
Shehzan Mohammed
ed94d4176a Adding OpenCL 1.2 required for NVIDIA when build with C++11 2014-11-11 14:00:24 -05:00
Kyle Lutz
53a869a7a1 Merge pull request #305 from kylelutz/stable-sort-radix-sort
Use radix_sort() for stable_sort() when possible
2014-11-10 21:24:14 -08:00
Kyle Lutz
88d19723e3 Use radix_sort() for stable_sort() when possible 2014-11-09 11:06:47 -08:00
Kyle Lutz
5c1aac441c Fix bug when calling radix_sort() with partial ranges 2014-11-09 10:53:23 -08:00
Mageswaran.D
4b50a5c1dc added support for output stream(cout<<) for compute::string : updated 2014-11-09 03:07:51 +05:30
Kyle Lutz
52eab193e7 Merge pull request #301 from Mageswaran1989/swap_api_string_class
added swap api for string class
2014-11-07 12:03:08 -08:00
Mageswaran.D
119e201c94 added swap api for string class 2014-11-07 23:51:00 +05:30
Kyle Lutz
a11fda7aa3 Merge pull request #295 from Mageswaran1989/String_find-issue288
String find issue288
2014-11-05 07:56:58 -08:00
Kyle Lutz
f1c61c796e Add version check to kernel::get_arg_info() test 2014-11-04 20:08:45 -08:00
Mageswaran.D
bdc6d79e4d String::find() signed char fix with test case 2014-11-04 13:06:11 +05:30
Kyle Lutz
ad33665b89 Add type_definition<T>() function 2014-09-30 22:24:31 -07:00
Kyle Lutz
e7578b697f Merge pull request #272 from kylelutz/improve-test-coverage
Improve test coverage
2014-09-29 21:26:21 -07:00
Kyle Lutz
eef75bf1fa Merge pull request #269 from kylelutz/thread-safe
Use thread-local storage for global program cache
2014-09-29 20:41:54 -07:00
Kyle Lutz
f300370366 Add test for platform class 2014-09-29 20:30:39 -07:00
Kyle Lutz
872dea05ef Add test for fill() with empty range 2014-09-29 20:01:21 -07:00
Kyle Lutz
8022923dbf Add test case for count_if_with_reduce() function 2014-09-29 19:51:08 -07:00
Kyle Lutz
4da55a4f94 Add test for sort3() function 2014-09-29 19:45:39 -07:00
Kyle Lutz
05afa5f707 Use thread-local storage for global program cache 2014-09-28 12:37:48 -07:00
Kyle Lutz
10d79c6689 Fix bug when using bind() with adapted structs 2014-09-27 11:42:29 -07:00
Kyle Lutz
0b0cbd399e Merge pull request #265 from roshanr95/uniform_int_distribution
Uniform int distribution
2014-09-21 11:06:08 -07:00
Kyle Lutz
7e05c0f9a5 Merge pull request #262 from kylelutz/opencl-2.0
Add OpenCL 2.0 support
2014-09-21 11:05:15 -07:00
roshanr
d2c25ef582 Add test to reflect issue #159 2014-09-20 12:30:17 +05:30
Kyle Lutz
cdcd4c5a32 Refactor get_info() functions 2014-09-13 18:42:43 -07:00
Kyle Lutz
ec254c04bb Add OpenCL 2.0 support 2014-09-13 12:29:03 -07:00
Kyle Lutz
60f0709bc1 Merge pull request #259 from kylelutz/dynamic-bitset
Add dynamic_bitset class
2014-09-07 11:37:50 -07:00
Kyle Lutz
8310e8e729 Add dynamic_bitset class 2014-09-07 11:21:46 -07:00
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
891aff215d Fix bug when calling reduce() with empty ranges 2014-09-04 20:42:37 -07:00
Kyle Lutz
744359715f Implement is_sorted() with adjacent_find() 2014-08-21 22:43:46 -07:00
Kyle Lutz
c69ea170fb Remove adjacent_transform_iterator class 2014-08-21 07:00:13 -07:00
Kyle Lutz
b3ea818248 Rewrite unique() algorithm 2014-08-21 07:00:10 -07:00
Kyle Lutz
b533df6a5c Rewrite adjacent_find() algorithm 2014-08-20 22:46:51 -07:00
Kyle Lutz
45c5ec3281 Rewrite adjacent_difference() algorithm 2014-08-20 22:43:27 -07:00
Kyle Lutz
8c7efd24fd Add support for multi-device contexts 2014-08-13 20:28:34 -07:00
Kyle Lutz
bd427b8a1b Merge pull request #224 from kylelutz/capture-containers-with-closure
Capture containers with closure
2014-08-09 09:00:43 -07:00
Kyle Lutz
1c746a9c6e Merge pull request #227 from ddemidov/issue-218
The test_closure does not require any OpenCL 1.2 features
2014-08-09 08:58:05 -07:00
Denis Demidov
a6467c9ec4 The test_closure does not require any OpenCL 1.2 features
see #218
2014-08-09 15:40:40 +04:00
Kyle Lutz
fd8c8f934b Support capturing containers with BOOST_COMPUTE_CLOSURE() 2014-08-07 22:20:16 -07:00
Kyle Lutz
95c331fa84 Capture references with BOOST_COMPUTE_CLOSURE() 2014-08-07 20:57:34 -07:00
Kyle Lutz
71a2787713 Merge pull request #213 from f-koehler/issue119
test for program::source()
2014-08-06 19:20:54 -07:00
fkoehler
dfd5724308 test for program::source() 2014-08-06 13:24:38 +02:00
Kyle Lutz
4703488c45 Merge pull request #212 from roshanr95/nth-element
Nth element
2014-08-05 19:00:30 -07:00
roshanr
30082abd59 Improve nth_element performance and unit testing 2014-08-05 22:12:45 +05:30
f-koehler
15f9793bd8 choose qt4 or qt5 2014-08-05 16:36:46 +02:00
Kyle Lutz
2f948a9903 Add test for count_if() with custom function 2014-07-31 20:26:47 -07: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
Denis Demidov
201f85a038 Skip tests requiring OpenCL 1.2 on usupported devices 2014-07-12 22:54:16 +04:00
Kyle Lutz
86199873b7 Fix partition_by_counts test for Intel CPUs
This fixes a test failure in partition_by_counts for Intel CPU
devices. The clCreateSubDevices() function is not guaranteed to
return the sub-devices in the same order as they were specified
in the compute unit counts argument.

Now the test sorts the returned sub-devices by number of compute
units and checks that each specified count is present.

See issue #185.
2014-07-12 08:52:26 -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
94306ce2e8 Merge pull request #179 from kylelutz/deprecate-device-ptr
Move device_ptr to the detail namespace
2014-07-10 20:02:39 -07:00
Kyle Lutz
9106222e61 Merge pull request #178 from kylelutz/equality-operators
Add equality operators for all wrapper classes
2014-07-09 22:10:36 -07:00
Kyle Lutz
e0535d7233 Move device_ptr to the detail namespace
This deprecates the device_ptr class and moves it to the detail
namespace. The buffer_iterator class should be used instead of
device_ptr for referencing a memory location on the device.
2014-07-08 21:04:23 -07:00
Kyle Lutz
7d377989ee Add equality operators for all wrapper classes 2014-07-08 20:33:02 -07:00
Kyle Lutz
4a1b3edf48 Fix resize bug with vector::assign()
This fixes a bug in which vector::assign() would not resize
itself to accommodate the assigned values. Now the behavior
matches that of std::vector.
2014-07-07 21:56:39 -07:00
Kyle Lutz
cae813ec3c Add get_info<Info>() specializations 2014-07-07 19:14:14 -07:00
Kyle Lutz
c156ca7198 Merge pull request #169 from kylelutz/hash-function
Add hash() function
2014-07-07 08:02:09 -07:00
Kyle Lutz
6af32b3d8f Add hash() function 2014-07-02 23:24:18 -07:00
Kyle Lutz
90217d055b Add compile() and link() methods to program 2014-07-02 22:32:58 -07:00
Kyle Lutz
2fa478a11f Merge pull request #158 from roshanr95/search-algorithms
Search algorithms
2014-06-25 18:37:56 -07:00
roshanr
f3d20639f7 Change function signature of search algorithms to match STL versions 2014-06-26 01:27:21 +05:30
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
3bf34f368b Fix test for copy_async() 2014-06-08 23:51:08 -07:00
Kyle Lutz
6ea122adb7 Add support for specifying wait-lists in command_queue 2014-06-08 22:23:59 -07:00
Kyle Lutz
57470c48c2 Add device::get() method 2014-06-08 14:03:27 -07:00
Kyle Lutz
a639e408b8 Cleanup move-semantics for all core types 2014-06-08 13:40:27 -07:00
Kyle Lutz
c2c1346f19 Rename event::get_status() to event::status() 2014-06-08 10:45:35 -07:00
Kyle Lutz
69e483696b Use reduce() for accumulate() with min()/max() 2014-06-08 10:35:49 -07:00
Kyle Lutz
5c5e813b04 Fix typo in mapped_view test 2014-06-08 09:04:51 -07:00
Kyle Lutz
60aca4401b Simplify the program::create_kernel() implementation 2014-06-07 19:58:36 -07:00
Kyle Lutz
732ab539f3 Improve documentation 2014-06-07 15:03:56 -07:00
Kyle Lutz
b228de76a7 Add memory_object::set_destructor_callback() method 2014-06-07 11:13:52 -07:00
Kyle Lutz
d30dcfb564 Use clEnqueueWriteBuffer() for writing single values with fill() 2014-06-06 23:10:27 -07:00
Kyle Lutz
2ca2c16839 Swap allocators in vector::swap() 2014-06-06 08:29:45 -07:00
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
Kyle Lutz
52886775f8 Support conversion of lambda expressions to function objects 2014-05-24 13:42:43 -07:00
Kyle Lutz
0a0fa4c25b Merge pull request #117 from roshanr95/stable_partition
Add algorithm and test for stable_partition
2014-05-23 18:34:31 -07:00
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
4a507cb368 Remove test for variadic wait_list::insert() 2014-05-22 22:40:04 -07:00
Kyle Lutz
85af9d2630 Add variadic wait_for_all() function 2014-05-18 19:47:19 -07:00
Kyle Lutz
13bc000117 Add image2d::clone() method 2014-05-18 19:34:24 -07:00
Kyle Lutz
b49a8e52f8 Add test for find_if() with distance() 2014-05-18 16:15:57 -07:00
Kyle Lutz
376713f1b4 Simplify lambda wrappers for binary geometric functions 2014-05-18 16:13:47 -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
b41ec2b1cb Fix bug when invoking binary closures 2014-05-14 10:44:52 -07:00
Kyle Lutz
a107b9239f Fix tests for event::set_callback() on Intel GPUs
Intel GPUs don't fire the callbacks registered with set_callback()
until the underlying OpenCL event object is destroyed. This changes
the test so that the events go out of scope or are explicitly reset
before checking that the callback has been executed.
2014-05-10 18:04:42 -07:00
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
b1eef72ec2 Add device vendor predicate functions
This adds a couple new functions for checking the vendor of a
compute device. This is useful for algorithms which specialize
based on the type of the underlying hardware.
2014-05-10 10:33:24 -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
79d5353a4e Minor fixes
Change documentation style, add test for search(), remove unused
variable, remove trailing whitespaces
2014-05-07 15:53:03 +05:30
Kyle Lutz
88b6a8b3d4 Only call clRetainDevice()/clReleaseDevice() for sub-devices 2014-05-06 19:56:11 -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
02fc4fa170 Add define() method to function<> and closure<> 2014-04-27 15:02:48 -07:00
Kyle Lutz
6b00246e09 Simplify function/closure macro implementations 2014-04-27 12:56:14 -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
Kyle Lutz
4b67907023 Change BOOST_COMPUTE_FUNCTION() to use custom argument names
This changes the BOOST_COMPUTE_FUNCTION() macro (and the related
BOOST_COMPUTE_CLOSURE() macro) to use custom, user-provided argument
names instead of auto-generating them based on their index.

This is an API-breaking change. Users should now provide argument
names when using the BOOST_COMPUTE_FUNCTION() macro. The examples
and documentation have been updated to reflect the new API.
2014-04-20 19:13:48 -07:00
Kyle Lutz
2511bdb436 Merge pull request #97 from roshanr95/unique
Fix errors in unique
2014-04-20 16:42:56 -07:00
roshanr
59efaa0eeb Add tests and benchmarks for unique_copy 2014-04-21 02:00:02 +05:30
Kyle Lutz
6ac757887c Support generic function callbacks for event 2014-04-19 11:38:10 -07:00
Kyle Lutz
2fb2c08806 Fix unused variable warning in test_user_event.cpp 2014-04-17 23:10:24 -07:00
Kyle Lutz
21d81fcd76 Add user_event class 2014-04-16 21:11:47 -07:00
Kyle Lutz
6336b81911 Rename mersenne_twister_engine::fill() to generate() 2014-04-13 14:13:53 -07:00
Kyle Lutz
2ebb04caac Add discard() method to mersenne_twister_engine 2014-04-13 13:57:12 -07:00
Kyle Lutz
dd0b1fcb7b Add discard_iterator class 2014-04-13 13:45:01 -07:00
Kyle Lutz
b7c4f0ce18 Change mersenne_twister::seed() to take a command_queue 2014-04-12 11:14:44 -07:00
Kyle Lutz
7966768c80 Remove read/write buffer convenience overloads in command_queue 2014-04-12 09:40:37 -07:00
Kyle Lutz
6499e30c66 Add test creating a std::future for an event object 2014-04-11 20:24:12 -07:00
Kyle Lutz
bae2bb6c7f Add get_nvidia_compute_capability() function 2014-04-02 21:30:22 -07:00
Kyle Lutz
6334d67720 Merge pull request #75 from roshanr95/unique
Unique algorithm
2014-03-23 21:24:05 -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
667aa9c200 Add buffer::clone() method 2014-03-20 23:31:41 -07:00
Kyle Lutz
0446e24baf Fix BOOST_COMPUTE_FUNCTION() with non-default-constructible types 2014-03-20 23:31:36 -07:00
Kyle Lutz
35eef1e6be Add test for inner_product() with counting_iterator 2014-03-20 23:17:27 -07:00
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
bae7432c04 Improve sort_by_key() performance 2014-03-12 23:40:57 -07:00
Kyle Lutz
cf8e972e55 Improve kernel::set_arg() method 2014-03-12 21:02:22 -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
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
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
Kyle Lutz
dacdbf0ffd Bug in fill() with uchar4 2014-02-22 10:51:39 -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
bc8aa0e9d5 Skip generate_pair test on AMD
This skips the generate_pair test on AMD which does not
properly support struct assignment. Before this patch the
test would fail with "UNREACHABLE executed!" and a SIGABRT.
2014-01-26 18:52:58 -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
e313aae6f7 Rename lambda result test functions to check_lambda_result() 2014-01-14 21:48:33 -08:00
Kyle Lutz
72664c8de9 Add test for generate() with pair<T1, T2> 2014-01-14 21:31:51 -08:00
Kyle Lutz
1dd35de225 Fix sign comparison warnings in tests 2014-01-14 21:29:25 -08:00
Kyle Lutz
936d801466 Add support for host iterators to sort() 2014-01-13 18:27:52 -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
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
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
e337f632da Add height() and width() methods to image2d 2014-01-05 18:36:29 -08:00
Denis Demidov
0c8a59ef84 Fix core.system test
The find_device check in core.system is invalid. It could fail when same
device is supported by several platforms. In my case this happens for
Intel CPU when both AMD and Intel platforms are installed. The CPU
returned by boost::compute::system::default_device() is served by the
AMD platform, and the CPU returned by
boost::compute::system::find_device(name) is served by Intel SDK. The
only thing that could be safely asserted here is that both devices have
the same name.
2013-12-27 11:26:25 +04: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
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
cf473bebd3 Use BOOST_COMPUTE_FUNCTION() macro in tests
This replaces the usages of make_function_from_source() with
the BOOST_COMPUTE_FUNCTION() macro.
2013-12-07 15:26:07 -08:00
Kyle Lutz
2728282c19 Add merge_floats test
This adds a test case for merge() with float's.
2013-12-07 15:18:45 -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
Kyle Lutz
6b6f66b6ba Add reduce() overload without function argument
This adds adds an overload of the reduce() function which
uses plus<T>() as the reductor. This simplifies the common
case of calculating the sum for a range of values.
2013-12-07 15:02:04 -08:00
Kyle Lutz
ba9e64e316 Remove init argument from reduce()
This removes the init argument from reduce. This simplifies the
implementation and avoids copying a value from the host to the
device on every call to reduce.

If an initial value is required, the accumulate function can be
called instead.
2013-12-07 14:49:46 -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
0daa62e41f Add experimental copy_index_if() algorithm
This adds an experimental algorithm like copy_if() which copies
the index of the values for which predicate returns true instead
of the values themselves.
2013-11-15 20:30:30 -08:00
Kyle Lutz
953ebb4e26 Add variadic tuple support
This adds support for variadic tuples on C++11 compilers.
2013-11-15 20:07:39 -08:00
Kyle Lutz
844690070f Remove STL algorithm tests from vector<> test
This removes the STL algorithm tests from the vector<> test.
2013-11-15 19:41:12 -08:00
Kyle Lutz
b5ff4743bb Add field() function
This adds a new function which will return the named field
from a value. For example, this can be used to return one of
the components of a pair object or to swizzle a vector value.
2013-11-10 15:44:45 -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
efa83c9420 Add test for calculating mean and standard deviation
This adds a test which uses reduce() and transform_reduce()
to calculate mean and standard deviation.
2013-09-24 22:50:02 -04:00
Kyle Lutz
736f3a17a6 Add min_and_max reduce() test
This adds a test for computing the minimum and maximum
values of a vector simultaneously using reduce() with a
custom reduction function.

Also fixes a bug in reduce() in which inplace_reduce() was
being used even if the input type and result type differed.
2013-09-24 22:47:16 -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
a96c9c0182 Add result argument to reduce() algorithm
This adds an output iterator result argument to the reduce()
algorithm. Now, instead of returning the reduced result, the
result is written to an output iterator. This allows the value
to stay on the device and avoids a device-to-host copy in cases
where the result is not needed on the host (e.g. it is part of
a larger computation).

This is an API breaking change to users of reduce(). Affected code
should now declare a result variable and then pass a pointer to it
as the new result argument.
2013-09-07 15:36:49 -04:00
Kyle Lutz
a8f4421739 Add copy() specialization for host-to-host transfers
This adds a copy() specialization for host-to-host transfers
which simply forwards the call to std::copy().

This is useful in templated algorithms which may in certain
circumstances copy() between data ranges on the host.
2013-09-07 15:29:48 -04:00
Kyle Lutz
1c4c772921 Add quirks for image tests on POCL
This adds code to skip certain image tests on POCL devices which
do not fully support images and image samplers.
2013-09-07 15:10:35 -04:00
Kyle Lutz
3a7b90ff06 Fix issue with comparison operators in lambda expressions
This fixes an issue in which comparison operators (e.g. <, ==)
in lambda expressions would return the wrong result type causing
compilation errors.

Also adds a few test cases to ensure the correct result type
and that lambda expressions can be properly used with count_if().
2013-08-15 22:10:03 -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
767589fe0d Rearrange type headers
This rearranges the type headers to live under the
<boost/compute/types/...> directory instead of the
top-level <boost/compute/...> directory.
2013-08-13 20:37:56 -04:00
Kyle Lutz
220d0df600 Add test for fill() command type
This adds a test to ensure the fill() algorithm uses the
clEnqueueFillBuffer() function if supported.
2013-07-02 21:57:19 -04:00
Kyle Lutz
b10a7a43c6 Add test for copy() command type
This adds a test to ensure that the copy() algorithm uses
the proper command type when copying memory buffers.
2013-07-02 21:57:19 -04:00
Denis Demidov
84394de119 Get rid of type convesion warnings inside VS2010 2013-06-24 09:57:22 +02:00
Denis Demidov
b2484376f3 Use std::numeric_limits<float>::infinity() directly
Division by zero, that was used initially, results in compilation error
in VS2010
2013-06-24 09:55:40 +02:00
Kyle Lutz
f2b812019c Fix bugs with char/uchar/bool literals in meta_kernel
This fixes a few issues that occurred when using char, uchar
and bool literals with meta_kernel.
2013-06-19 23:55:22 -04:00
Kyle Lutz
e01569049b Add type_name<bool>() specialization
This adds a type_name() specialization for bool.
2013-06-19 23:48:49 -04:00
Kyle Lutz
7fb77ef9c5 Add test for any/all/none_if() with NaN and inf
This adds a test for the any_of(), all_of() and none_of() functions
with NaN and Inf values.
2013-06-11 21:16:15 -04:00
Kyle Lutz
8e51a0a162 Refactor lambda expression framework to use meta_kernel
This refactors the lambda expression framework to use meta_kernel
to construct kernel source code instead of using plain strings.
2013-06-11 21:14:28 -04:00
Kyle Lutz
64e94549b3 Add specialization for get<N>() with zip_iterator
This adds a specialization for the get<N>() function when used
with zip_iterator's. Now, only the N'th iterator for the expression
will be dereferenced instead of dereferencing all of the iterators
into a tuple and then extracting the N'th component.
2013-06-11 20:37:23 -04:00
Denis Demidov
b731d6146d Skipping fill_char_pair_vector test on AMD
The test fails for the same reason that fill_pair_vector does.

See: c085d64a46
See: http://devgurus.amd.com/thread/166622

closes: #2
2013-05-24 09:02:48 +04:00
Kyle Lutz
c085d64a46 Skip tests using struct assignment on AMD
This adds a check to skip tests which use fill() with pair and
tuple types on AMD platforms. There is a bug which crashes the
OpenCL compiler with an "UNREACHABLE executed!" message on AMD
platforms when using struct assignment in kernel code.

See: http://devgurus.amd.com/thread/166622
2013-05-22 23:05:54 -04:00
Kyle Lutz
2560600122 Fix issues with boost::tuple<>, char, and fill()
This fixes issues when using boost::tuple<> containing char
types with the fill() algorithm.
2013-05-21 23:10:56 -04:00
Kyle Lutz
9141732b3e Fix issues with std::pair<>, char, and fill()
This fixes issues when using std::pair<> containing char
types with the fill() algorithm.
2013-05-21 23:10:56 -04:00
Kyle Lutz
a2f54abd06 Add test for copy() with std::stringstream
This adds a test for using std::stringstream with the
copy() algorithm.
2013-05-20 22:51:47 -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
e46828a9d6 Fix issues involving iterators with void value_type
This fixes a few issues encountered when using iterators with a
void value_type (e.g. std::insert_iterator<>).

The is_contiguous_iterator meta-function was refactored to always
return false for iterators with a void value_type and avoid
instantiating types for containers with a void value_type
(e.g. std::vector<void>::iterator) which previously resulted
in compilation errors.
2013-05-20 19:57:13 -04:00
Kyle Lutz
4ab37ada07 Add system-wide default command queue
This adds a system-wide default command queue. This queue is
accessible via the new static system::default_queue() method.
The default command queue is created for the default compute
device in the default context and is analogous to the default
stream in CUDA.

This changes how algorithms operate when invoked without an
explicit command queue. Previously, each algorithm had two
overloads, the first expected a command queue to be explicitly
passed and the second would create and use a temporary command
queue. Now, all algorithms take a command queue argument which
has a default value equal to system::default_queue().

This fixes a number of race-conditions and performance issues
througout the library associated with create, using, and
destroying many separate command queues.
2013-05-15 20:59:56 -04:00
Kyle Lutz
1b9e904cc7 Add CHECK_RANGE_EQUAL() test macro
This adds a new macro for the unit-tests which checks a range of
values on the device against an array of values on the host. This
simplifies writing tests and removes the need to explicitly copy
values back to the host for verification.
2013-05-13 23:06:40 -04:00
Kyle Lutz
eea16e61c7 Remove simple_histogram from flat_map test
This removes the inefficent simple_histogram test-case from
the flat_map test-suite.
2013-05-11 20:17:24 -04:00
Kyle Lutz
130f8c30f1 Rename kernel::num_args() method to arity()
This renames the kernel::num_args() method to arity().
2013-05-11 20:15:00 -04:00
Kyle Lutz
178676df4f Refactor the system::default_device() method
This refactors the system::default_device() method. Now, the
default compute device for the system is only found once and
stored in a static variable. This eliminates many redundant
calls to clGetPlatformIDs() and clGetDeviceIDs().

Also, the default_cpu_device() and default_gpu_device() methods
have been removed and their usages replaced with default_device().
2013-05-10 22:49:05 -04:00
Kyle Lutz
fecbe63043 Check for partitioning support in device test
This adds checks to the device test-suite to ensure that the
current device supports the partitioning types before attempting
to use the corresponding device::partition_*() methods.
2013-05-09 23:05:11 -04:00
Kyle Lutz
8934bea627 Skip enqueue_write_buffer_rect() test on AMD GPUs
This skips the enqueue_write_buffer_rect() test on AMD GPUs which
don't correctly implement the clEnqueueWriteBuffer() function.
2013-05-09 22:13:28 -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
Kyle Lutz
9a350f65cf Change clamp_range() test to use float
This changes the clamp_range() test to use float values instead
of int values. The OpenCL clamp() function is only defined for
float values and this test caused kernel compilation errors on
certain platforms.

Also updates the test to use the new global context.
2013-04-27 10:20:47 -04:00
Kyle Lutz
dde1747b32 Merge remote-tracking branch 'ddemidov/master' 2013-04-27 09:45:32 -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
Denis Demidov
13887e8ed5 Rely on system::default_context() to hold static context
refs kylelutz/compute#9
2013-04-19 15:16:46 +04:00
Denis Demidov
5d77bbebee Global setup for OpenCL context in tests
refs kylelutz/compute#9

device, context, and queue are initialized statically in `context_setup.hpp`.
With this change all tests are able to complete when an NVIDIA GPU is in
exclusive compute mode.

Side effect of the change:
Time for all tests to complete reduced from 15.71 to 13.03 sec Tesla C2075.
2013-04-19 14:53:59 +04:00
Kyle Lutz
8142e5d5f9 Add move-constructors to wrapper classes
This adds move-constructors and move-assignment operators
to the OpenCL wrapper classes.
2013-04-17 20:45:04 -04:00
Kyle Lutz
5cb51569eb Add test for command_queue::enqueue_write_buffer_rect()
This adds a test for the enqueue_write_buffer_rect() method
in the command_queue class. This method copies a rectangular
region of memory from the host to a device buffer.
2013-04-13 20:52:42 -04:00
Kyle Lutz
4bdec761cd Add memory_object::reference_count() method
This adds a reference_count() method to the memory_object
class which returns its current reference count.
2013-04-13 11:07:04 -04:00
Kyle Lutz
da4cb81679 Return event from command_queue::enqueue_nd_range_kernel()
This changes the enqueue_nd_range_kernel() method to return an
event object. This allows clients to monitor the progress of a
kernel executing on a device.
2013-04-13 10:23:01 -04:00
Kyle Lutz
001b3ff7fe Add get() methods to wrapper classes
This adds a get() method to each wrapper class which returns
a reference to the underlying OpenCL object.
2013-04-13 09:44:51 -04:00
Kyle Lutz
1be19a6305 Add multiplies<T> specialization for std::complex<T>
This adds a specialization of multiplies<T> for std::complex<T>
which implements complex number multiplication.

Also adds a simple test using transform() to verify the complex
multiplication works correctly.
2013-04-10 22:04:04 -04:00
Kyle Lutz
8d13920dc4 Move swizzle_iterator to detail namespace
This moves the swizzle_iterator class to the detail
namespace.
2013-04-10 21:51:24 -04:00
Kyle Lutz
bcc3aed40f Move pixel_input_iterator to detail namespace
This moves the pixel_input_iterator class to the detail
namespace.
2013-04-10 21:38:05 -04:00
Kyle Lutz
e30ec9f26c Move adjacent_transform_iterator to detail namespace
This moves the adjacent_transform_iterator class to the
detail namespace.
2013-04-10 21:24:15 -04:00
Kyle Lutz
430a76bb6c Add generate_fibonacci_sequence test-case
This adds a new test case which computes the first twenty-five
fibonacci numbers using the transform() algorithm and a custom
generator function.
2013-04-09 22:36:00 -04:00
Kyle Lutz
9a3d7c7d4b Add missing iostream header include to test_device
This adds a missing include for the iostream header to
test_device. This fixes a compilation issue when using
OpenCL 1.2.
2013-04-07 13:00:55 -04:00
Kyle Lutz
14ea0bdbff Fix bug in command_queue test on AMD platforms
This fixes a bug in the event_profiling test case in the
command_queue test. On AMD platforms, the event object
returned from clEnqueueMarker() has no profiling information
associated with it and returns an error code when accessed.

Now, profiling information for a simple write to a device
buffer is checked instead.
2013-03-26 23:36:58 -04:00
Kyle Lutz
4338b311f7 Add device::partition() method
This adds a new set of methods to the device class allowing
device objects to be partitioned into multiple sub-devices
using the clCreateSubDevices() function.

For now, device partitioning is only supported on systems
with OpenCL version 1.2 (or later).
2013-03-26 23:36:54 -04:00
Kyle Lutz
4752fb2404 Support returning std::vector<T> from get_info<T>()
This adds support for returning a std::vector<T> from the
various get_info<T>() methods. This provides a simpler
interface to get the values in an array returned from one
of the clGet*Info() functions.

This also adds a test using the new API to get the maximum
work item sizes in each dimension for a device.
2013-03-26 22:44:56 -04:00
Kyle Lutz
25e7214e5c Fix bug in inplace_reduce() test
This fixes a bug in the test for inplace_reduce() in which
the vector was being filled with data from two different
command queues leaving the data in an undefined state.
2013-03-25 21:05:42 -04:00
Kyle Lutz
ecc0944afe Remove check for local_memory_size in test_kernel
This removes the check for local_memory_size in test_kernel. The
local memory size differs between platforms and some (e.g. Intel)
don't report any local memory usage.
2013-03-20 18:38:09 -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
34cfe34edb Add construct_from_cl_command_queue test-case to test_command_queue
This adds a new test-case to test_command_queue which checks the
functionality of the command_queue(cl_command_queue) constructor.
2013-03-19 17:48:30 -04:00
Kyle Lutz
e8f77897eb Add construct_from_cl_mem test-case to test_buffer
This adds a new test-case to test_buffer which checks the
functionality of the buffer(cl_mem) constructor.
2013-03-19 17:46:14 -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
db53bdb246 Fix check for local memory size in test_kernel
This fixes the check for the local memory size in the
get_work_group_info kernel test.

While the kernel only allocates 16 float's, some platforms
will use more local memory. This changes the test to check
for at least 16 float's worth of local memory.
2013-03-17 22:42:56 -04:00
Kyle Lutz
b88de104f3 Add queue.finish() call to test_mersenne_twister
This adds a call to queue.finish() to ensure that the results
are ready before being checked in the mersenne_twister test.
2013-03-14 22:17:50 -04:00
Kyle Lutz
e16890aa9f Add queue.finish() calls to test_merge
This adds calls to queue.finish() to ensure that the results
are ready before being checked in the merge test.
2013-03-14 22:16:39 -04:00
Kyle Lutz
ef2a14a278 Add queue.finish() calls to test_inplace_reduce
This adds calls to queue.finish() to ensure that the results
are ready before being checked in the inplace_reduce test.
2013-03-14 22:15:00 -04:00
Kyle Lutz
de0bdcd2e4 Fix test module name for TestInsertionSort
This fixes the module name for the insertion sort test.
2013-03-10 20:21:26 -04:00
Kyle Lutz
30e5f6a836 Fix test module name for TestRadixSort
This fixes the module name for the radix sort test.
2013-03-10 20:20:32 -04:00
Kyle Lutz
08045a3466 Add test for sorting vectors by length
This adds a test for the sort() method which sorts a container
of 3D vectors by their length. This uses a lambda expression to
generate the compare function for the sort() algorithm.
2013-03-10 20:17:02 -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