2
0
mirror of https://github.com/boostorg/compute.git synced 2026-02-17 13:42:17 +00:00
Commit Graph

469 Commits

Author SHA1 Message Date
Jakub Szuppe
979ec52351 Add more tests for scan 2016-07-25 22:37:17 +02:00
Kyle Lutz
1d2f8cfbd9 Merge pull request #633 from haahh/pr_find_extrema_cpu
find_extrema for CPUs
2016-07-20 22:23:51 -07:00
Jakub Szuppe
934257b97d Add more tests for find_extrema algorithms 2016-07-17 13:24:07 +02:00
Jakub Szuppe
4c21633bf9 Fix vector copy ctor when using non-default context
Now correct queue (from correct context) is used in copy
constructor of boost::compute::vector.
2016-07-17 00:01:47 +02:00
Jakub Szuppe
2af23fa7e9 Change various tests to work with non-default context
Now all tests work even if Context::context, Context::device,
Context::queue are not default context, device and queue. This
is required for developing better tests in the future.

Note: Some tests may work only for default context/queue/device
since classes that they test work only for default context/q/d.
There are two solutions for this problem: either those tests run
on default queue (no matter what) or they does not run when
Context::context is not the default context. See test_string.cpp.
2016-07-16 20:30:28 +02:00
Kyle Lutz
6e3213bfcf Merge pull request #628 from haahh/pr_reduce_cpu
Reduce for CPU
2016-07-11 20:16:19 -07:00
Thomas Trummer
68d373c38a Add missing include for std::cerr (on macOS) 2016-07-10 18:38:23 +02:00
Jakub Szuppe
585eb747a0 More tests for adjacent difference 2016-07-09 14:11:01 +02:00
Jakub Szuppe
5d31bd0f07 Add tests for stable comp. sort and sort-by-key 2016-06-22 17:06:12 +02:00
Jakub Szuppe
cc1cc0e345 Add tests for comparison sort 2016-06-21 17:41:36 +02:00
Jakub Szuppe
bffc9f74fb Fix async copying when first == last (input is empty) 2016-05-28 22:46:35 +02:00
Jakub Szuppe
69e09f27d8 Minor fixes in test_copy.cpp 2016-05-28 13:15:36 +02:00
Jakub Szuppe
ba0da3f3f4 Tests for copying SVM memory when types mismatch
Tests for copying SVM memory to/from/on device when
value_types of InputIterator and OutputIterator mismatch.
2016-05-28 13:15:36 +02:00
Jakub Szuppe
933ff15ce5 Better names for tests 2016-05-28 13:15:36 +02:00
Jakub Szuppe
aaaaca4ed2 Type-safe async coping from device to host 2016-05-28 13:15:36 +02:00
Jakub Szuppe
7461c92fdc Add test for async coping with svm_ptr<> 2016-05-24 21:37:29 +02:00
Jakub Szuppe
55ac7da9d8 Fix test in test_functional_as.cpp
At the end of test we should read from input vector
(not output) in order to check if transform() with
as<int>() was performed correctly.
2016-05-24 21:37:29 +02:00
Jakub Szuppe
1419b7d36f Type-safe copying from device to host
Type-safe copying from device to host. Seperate copying
algorithm device -> host for non-contiguous OutputIterator (host).
2016-05-24 21:37:29 +02:00
Jakub Szuppe
ce8230b6f5 Coping from host for non-contiguous iterators (host)
When InputIterator (host) is a non-contiguous iterator we don't
need a separate algorithm for cases when value_types of InputIterator
and OutputIterator (device) do not match and cases when they do
match.
2016-05-21 17:16:13 +02:00
Jakub Szuppe
7c3d0c20e9 Add tests for coping on device with mismatched types 2016-05-21 16:58:31 +02:00
Jakub Szuppe
d12e07c0e9 Fix type-safety issues for async copying host->device 2016-05-21 16:58:15 +02:00
Jakub Szuppe
bba6c61ed4 Add tests for copying host->device with mismatched types 2016-05-21 16:52:05 +02:00
Jakub Szuppe
56ad192b92 Now discrete_distribution generates IntType values
Class discrete_distribution should generate values of type
IntType. Until now it always generated unsigned int values.
2016-05-11 08:30:46 +02:00
Jakub Szuppe
650e828542 Add more tests for discrete_distribution 2016-05-11 08:30:45 +02:00
Jakub Szuppe
57ea7d85df Skipping resize_throw_exception test on Apple
From tests on Travis-CI it seems that on Apple OpenCL platform
clCreatBuffer() does not return NULL and does not set error to
CL_INVALID_BUFFER_SIZE when size of the buffer memory object is
greater than CL_DEVICE_MAX_MEM_ALLOC_SIZE.
2016-05-05 14:23:28 +02:00
Jakub Szuppe
6412cb2cc6 Fix typos in test_lambda.cpp 2016-05-05 14:23:28 +02:00
Jakub Szuppe
e199304780 Turn off inplace_reduce and radix_sort tests on Apple
Tests for inplace_reduce, radix_sort and radix_sort_by_key are disabled
for CPU devices on Apple platform because for CPU devices on Apple
platform when local memory is used in a kernel, local work group size
must be [1;1;1]. Those algorithms are designed for GPU devices,
therefore we do no lose any functionality.
2016-05-05 14:23:28 +02:00
Jakub Szuppe
968056c653 Adapt command queue test to different devices
Not every device allows for local work group size to be
greater than [1;1;1].
2016-05-05 14:23:28 +02:00
Kyle Lutz
dc7bfa0252 Merge pull request #609 from haahh/pr_copy_buffer_for_device_ptr
Enable copying with copy buffer op for device_ptr
2016-05-03 20:58:09 -07:00
Kyle Lutz
7b4e652ff7 Merge pull request #608 from haahh/pr_remove_deprecated_macros
Remove deprecated macros
2016-05-03 19:33:53 -07:00
Jakub Szuppe
02e12b40fd Enable copying with copy buffer op for device_ptr
This commit enables copying data using clEnqueueCopyBuffer()
in boost::compute::copy() algorithm for device_ptr<>.
2016-05-03 21:39:19 +02:00
Jason Rhinelander
9b2c65fee9 Work around libc++ bug 17782
libc++ fails to extract a valid float/double literal when it is followed
by any special characters that can also be found in a float value,
in this case, f (https://llvm.org/bugs/show_bug.cgi?id=17782).

This commit works around the problem by not putting the "f" suffix into
the string for extraction.
2016-05-03 10:21:02 -04:00
Jason Rhinelander
d02b36e735 Simplify literal conversion tests
The tests are failing under OS X/clang, but it isn't obvious to me why.
This commit simplifies the test code by ignoring the stringstream I/O
status, and reorganizes it to be clearer whether it's the initial
conversion to string that is failing, or the subsequent conversion back
from string.
2016-05-03 10:21:02 -04:00
Jakub Szuppe
5e28138a7a Update minimum required Boost version to 1.54 2016-05-03 14:32:22 +02:00
Kyle Lutz
51afcd0c22 Merge pull request #602 from boostorg/reduce-uchar-to-float-test
Add test for reduce() with uchar to float
2016-05-02 19:44:18 -07:00
Kyle Lutz
90130f8376 Merge pull request #603 from boostorg/fix-sign-comparison-warning
Fix sign comparison warning in test_literal_conversion
2016-05-02 19:43:21 -07:00
Kyle Lutz
71f1d0d441 Add specializations for kernel::get_arg_info() 2016-04-30 10:32:13 -07:00
Kyle Lutz
d15cb3314b Fix sign comparison warning in test_literal_conversion 2016-04-30 09:21:44 -07:00
Kyle Lutz
0b3d80c35a Add test for reduce() with uchar to float 2016-04-29 20:06:52 -07:00
Kyle Lutz
3c2bbbe845 Merge pull request #597 from haahh/pr_fix_find_end
Fix find_end algorithm
2016-04-25 21:37:46 -07:00
Kyle Lutz
ecdb24ef86 Merge pull request #595 from haahh/pr_fix_uni_real_dist
Fix uniform real distribution
2016-04-25 21:35:23 -07:00
Jakub Szuppe
55bea58790 Add test for values generated by uniform real dist
New test checks if values generated by uniform real
distribution are in the [a,b) interval.
2016-04-25 19:46:09 +02:00
Jason Rhinelander
7f18293526 Increase make_literal precision
make_literal is losing some precision when making literal floating
point values because it uses digits10, but that only gives us the
number of decimal digits that will survive a decimal->native>decimal
conversion; what we are doing is a native->decimal->native conversion,
which requires the user of ::max_digits10 (which is 2 (double) or 3
(float) larger than ::digits10).

max_digits10 is a c++11 feature, however, so this commit uses
digits10 + 3 when the c++11 numeric_limits isn't available.
2016-04-24 17:32:55 -04:00
Jakub Szuppe
b18b5dbe8b Fix test_find_end test
We have to use the same queue in the whole test.
2016-04-24 21:46:07 +02:00
Jakub Szuppe
f29bbda7f8 Tests for radix sort in desc order 2016-04-23 18:24:24 +02:00
Kyle Lutz
a832380b0b Add test for mean and variance of normal_distribution 2016-04-22 18:51:43 -04:00
Kyle Lutz
3d9fd19350 Merge pull request #585 from bwitherspoon/wait-list-initializer-list
Add initializer list constructor to wait_list
2016-04-18 14:51:16 -07:00
Brett Witherspoon
8f449cde4b Add initializer list constructor to wait_list 2016-04-17 02:59:51 -05:00
Jakub Szuppe
796c5d4629 Fix tests for clSetMemObjectDestructorCallback() 2016-04-10 12:42:35 +02:00
Kyle Lutz
da71051593 Merge pull request #573 from haahh/pr_stable_sort_by_key
Add stable_sort_by_key()
2016-03-18 19:36:22 -07:00