Commit Graph

530 Commits

Author SHA1 Message Date
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
Jakub Szuppe
af58463ad9 Add tests for radix_sort_by_key() 2016-03-16 15:07:53 +01:00
Jakub Szuppe
a127310d73 Add test for stable_sort_by_key() 2016-03-16 15:07:28 +01:00
Jakub Szuppe
b3224ea753 Misc. strided_iterator changes 2016-03-16 13:16:14 +01:00
Kyle Lutz
38ba1c5447 Merge pull request #566 from haahh/update-test-jamfilev2
Update tests compile options in Jamfile.v2
2016-03-10 13:04:02 -08:00
Kyle Lutz
fe816c5acf Merge pull request #571 from haahh/win-related-changes
Windows related changes
2016-03-10 10:14:03 -08:00
Jakub Szuppe
3826e9cae4 Misc fixes 2016-03-09 18:56:17 +01:00
Jakub Szuppe
8bc763cd53 MSVC/WIN-related update of CMakeLists.txt files
This commit fixes misc. bugs in CMakeLists.txt files that
were causing various build errors and warnigns.
2016-03-09 18:56:16 +01:00
Jakub Szuppe
c41c1d98b1 Link OpenCL in FreeBSD in test/Jamfile.v2 2016-03-09 17:08:59 +01:00
Jakub Szuppe
fec8913be2 Remove redundant compile option
Remove redundant -Wno-deprecated-declaration (msvc: wd4996) compile
option from Travis-CI builds and test/Jamfile.v2.
2016-03-09 17:08:58 +01:00
Jakub Szuppe
1653a06f90 Suppress OpenCL-related deprecated declarations warns
Suppress deprecated declarations warnings (for MSVC, GCC and Clang)
caused by deprecated OpenCL Runtime functions.
2016-03-09 17:08:45 +01:00
Jakub Szuppe
a1895728a1 Use custom FindOpenCL.cmake only for cmake older than 3.1 2016-03-09 15:30:02 +01:00
Jakub Szuppe
112537a8cb Update tests compile options in Jamfile.v2
Different compilers have different options to suppress the same
warnings.
2016-03-09 14:57:50 +01:00
Kyle Lutz
03dc34b820 Add type_name() support for OpenGL types 2016-03-07 19:52:32 -08:00
Jakub Szuppe
4bc8a13b46 clLinkProgram and clCompileProgram unimplemented in POCL 2016-02-25 22:39:31 +01:00
Jakub Szuppe
11d445a1f5 POCL does not support clSetMemObjectDestructorCallback 2016-02-16 21:28:25 +01:00
Kyle Lutz
9f1766dd17 Fix counting_iterator with unsigned types 2016-01-18 20:53:41 -08:00
Kyle Lutz
3466881454 Merge pull request #548 from haahh/timberosx_fixes
Timber OSX fixes
2016-01-13 10:56:58 -08:00
Jakub Szuppe
6396530a2b Fix comparison between signed and unsigned integer 2016-01-07 20:54:54 +01:00
Jakub Szuppe
d142a36e98 Fix unsigned integer type to uint_ 2016-01-07 17:46:31 +01:00
Kyle Lutz
a2a5850948 Merge pull request #547 from Flast/fix-tests
Fix missing includes.
2016-01-05 20:52:07 -08:00
Kohei Takahashi
2dc156d964 Fix missing includes. 2016-01-05 09:47:40 +09:00
Kyle Lutz
6f29b3c4f9 Merge pull request #546 from okdshin/mt_rng_copy_ctor_spike
remove bad tab
2015-12-28 17:03:39 -08:00
Kyle Lutz
767c5beba8 Merge pull request #545 from okdshin/fix_linear_congruential_rng_copy
Modify linear_congruential_engine to copy its all states.
2015-12-28 12:28:58 -08:00
okdshin
d869d839b1 add linear_congruential rng copy ctor and assign op test 2015-12-29 00:50:11 +09:00
okdshin
9e0fabe4ae remove bad tab 2015-12-28 00:13:53 +09:00
okdshin
babfbafad6 Modify mersenne_twister_engine to copy its states. 2015-12-27 04:24:55 +09:00
Kyle Lutz
cb863b91a6 Add program::create_with_source() with vector of strings 2015-12-04 20:37:13 -08:00
Kyle Lutz
c983cc3a48 Merge pull request #535 from olivas/create_with_source_file
program::create_with_source_file doesn't fail with bad input
2015-11-19 19:39:58 -08:00
Alex Olivas
aa85b207d3 tested the wrong function. 2015-11-18 18:04:24 -07:00
Alex Olivas
0a2d7fa0e1 if the ifstream can't be created in program::create_with_source_file then it throws std::ios_base::failure. 2015-11-18 16:27:19 -07:00
Jakub Szuppe
fb03f87942 Add more tests for enqueue_svm_memcpy() method 2015-10-29 12:44:06 +01:00
Jakub Szuppe
972a1a26e8 Skipping copy_svm_ptr test case on AMD devices
clEnqueueSVMMemcpy() operation does not work on AMD devices due to a bug
in drivers (https://community.amd.com/thread/190585). This affects copy()
algorithm (when SVM is used) and results in copy_svm_ptr failing. Now this
test case is skipped on AMD devices.
2015-10-29 12:43:02 +01:00
Jakub Szuppe
acf83372db Fix OpenCL2.0 test cases in test_fill and test_svm_ptr 2015-10-24 21:15:44 +02:00
Kyle Lutz
f249741bf8 Merge pull request #522 from haahh/pr_find_extrema_first_extremum
Fix find_extrema_with_atomics and _with_reduce
2015-10-23 00:19:54 -07:00
Kyle Lutz
aed377d6d8 Fix Boost.Test link error in test/Jamfile.v2 2015-10-19 20:02:53 -07:00
Kyle Lutz
781cf302cb Merge pull request #525 from haahh/pr_vector_custom_alloc
Vector with custom allocator fix
2015-10-10 09:16:11 -07:00
Kyle Lutz
bc83a43045 Merge pull request #521 from boostorg/fix-test-fill
Skip fill() tests with double if not supported by device
2015-10-10 07:58:59 -07:00
Jakub Szuppe
5e2598bfdd Add more test for vector with custom allocator 2015-10-05 14:28:37 +02:00
Jakub Szuppe
01af4136da Add test for vector move ctor when custom allocator is used 2015-10-05 14:28:32 +02:00
Jakub Szuppe
e357a6a338 Test if min/max_element algorithms return the first min/max in given range 2015-10-03 18:20:48 +02:00
Kyle Lutz
dba4da7dcd Skip fill() tests with double if not supported by device
This skips the tests for fill() and fill_n() with double values
if the device does not support the cl_khr_fp64 extension.
2015-10-01 22:49:43 -07:00
Kyle Lutz
0b4509afea Merge pull request #520 from jpola/scatter_if
scatter if operation
2015-10-01 20:40:39 -07:00
Jakub Pola
e5050cbbe9 fix for initialization of output vector 2015-09-29 09:27:50 +02:00
Kyle Lutz
2c9d77413f Merge pull request #519 from haahh/pr_ocl_runtime_check_in_tests
Runtime OpenCL version check in tests
2015-09-28 19:52:10 -07:00
Kyle Lutz
b2e2bdfb0d Merge pull request #510 from haahh/dev_events_for_queue_enqueue_methods
Events for queue enqueue_map_ methods
2015-09-28 19:50:10 -07:00
Jakub Pola
c6c7f4a679 Copyrights fixes 2015-09-28 21:16:31 +02:00
Jakub Pola
f25b47d6f3 scatter if operation 2015-09-28 17:17:10 +02:00
Jakub Szuppe
1b059f8100 Runtime OpenCL version check in tests 2015-09-24 15:44:52 +02:00
Kyle Lutz
c75f5dc858 Merge pull request #516 from boostorg/adapt-struct-array
Add array support to BOOST_COMPUTE_ADAPT_STRUCT()
2015-09-20 16:58:55 -07:00
Kyle Lutz
44b0decb1f Merge pull request #514 from haahh/pr_fix_binary_find
Fix and improve binary_find
2015-09-20 16:58:05 -07:00
Kyle Lutz
346a11a6c0 Merge pull request #512 from boostorg/zip-constant-iterator
Add test for zip_iterator with constant_iterator
2015-09-20 16:54:28 -07:00
Kyle Lutz
68155f7597 Add array support to BOOST_COMPUTE_ADAPT_STRUCT()
This adds support for C-style arrays (e.g. "int array[10]") to the
BOOST_COMPUTE_ADAPT_STRUCT() macro.

Thanks to Fabian Bösch for providing the code.
2015-09-19 18:28:17 -05:00
Jakub Szuppe
ff51c44434 Fix test for binary_search, lower_bound and upper_bound
Previous test data was too small to properly test binary_find which
is used in binary_search, lower_bound and upper_bound algorithms.
2015-09-19 19:11:14 +02:00
Kyle Lutz
70bdf310d3 Add test for zip_iterator with constant_iterator 2015-09-15 12:56:11 -05:00
Kyle Lutz
f04b1aabde Merge pull request #511 from haahh/pr_fix_search_search_n
Fix for search and search_n algorithm
2015-09-15 12:41:10 -05:00
Jakub Szuppe
0e51ad4ad8 Fix for search and search_n algorithm 2015-09-12 19:29:16 +02:00
Jakub Szuppe
55a7f874a6 Add missing enqueue_map_image method in command queue 2015-09-12 16:26:10 +02:00
Lorenzo Pistone
9211260bcc fix a few instances where the device type is not used as a bit mask 2015-09-11 12:21:11 +02:00
Kyle Lutz
239f4a247c Merge pull request #498 from boostorg/invoke
Add invoke() utility function
2015-09-01 21:49:54 -07:00
Kyle Lutz
cf5e40ee26 Merge pull request #497 from haahh/pr_find_extrema_supports_custom_comparision
Support for custom comparison function in find_extrema()
2015-08-19 20:24:04 -07:00
Kyle Lutz
ef109b75d5 Add invoke() utility function
This adds an invoke() function which calls an OpenCL function on a
device with the given arguments.
2015-08-19 08:18:15 -07:00
Jakub Szuppe
a50dae747d Support for custom comparision function in find_extrema() and min/max_element() 2015-08-19 13:42:22 +02:00
Kyle Lutz
ffd35b09eb Merge pull request #487 from haahh/pr_boost_inspection_overlooked_minmax
Fix overlooked violation of the Boost min/max guidelines
2015-08-01 09:10:47 -07:00
Kyle Lutz
f278c66c14 Merge pull request #486 from haahh/pr_sort_cpu
CPU-targeted merge sort
2015-08-01 09:10:13 -07:00
Jakub Szuppe
bf78ec5ff1 Fix overlooked violation of the Boost min/max guidelines 2015-08-01 13:24:00 +02:00
Jakub Szuppe
5a9b30176d Add more tests for sort 2015-07-30 19:53:08 +02:00
Kyle Lutz
15a778d84a Merge pull request #480 from haahh/pr_boost_inspection
Fixing problems reported in Boost Inspection Report
2015-07-18 11:01:57 -07:00
Jakub Szuppe
7a8d078926 Update Boost macros, macros style unification 2015-07-18 16:12:24 +02:00
Jakub Szuppe
7e12f63a81 Add missing Boost license info and copyrights 2015-07-18 14:01:29 +02:00
Jakub Szuppe
dbf751e7fc Convert tabs to spaces 2015-07-16 21:18:12 +02:00
Jakub Szuppe
350f2c93a8 Fix violations of Boost min/max guidelines 2015-07-16 21:18:08 +02:00
Kyle Lutz
7059a30c3a Merge pull request #477 from haahh/pr_reduce_by_key
Reduce by key algorithm
2015-07-15 08:32:22 -07:00
Jakub Szuppe
706af4fce8 Reduce by key algorithm (serial implementation) 2015-07-15 11:06:23 +02:00
Jakub Szuppe
7894d1f7c0 Add missing queue and context parameters in tests 2015-07-02 22:20:42 +02:00
Kyle Lutz
2298aa5ff1 Merge pull request #468 from haahh/custom_funcs_for_scan
Support for custom functions in inclusive and exclusive scan
2015-06-24 08:30:06 -07:00
Jakub Szuppe
7bea0b13a1 Support for a custom function in exclusive and inclusive scan 2015-06-24 08:39:45 +02:00
Jakub Szuppe
feeab7a277 Add single-argument constructor for vector types 2015-06-23 10:14:50 +02:00
Kyle Lutz
1c68d8a73b Merge pull request #443 from bkchr/runtime_version_checking
Runtime version checking
2015-06-22 19:59:53 -07:00
Bastian Köcher
60f4b31bdd Add runtime version checking in the command_queue functions and fixed bug with context::get_device().
This adds runtime version checking in the command_queue functions which fixes issues if you compile
with OpenCL2.x and run your code on OpenCL1.x devices.
Fixed bug with context::get_device() if the context contains more than one device.
2015-06-04 11:59:54 +02:00
Junaid Muzammil
a9c373f92c Merge remote-tracking branch 'newrepo/develop' into develop 2015-06-02 19:18:00 +05:00
Jakub Szuppe
1ddd124495 Add fill() and fill_n() tests for every built-in type 2015-05-25 16:11:24 +02:00
Kyle Lutz
fda67a22d0 Update GitHub links 2015-05-17 20:32:09 -07:00
Kyle Lutz
d5deb08493 Fix transform_if() test
This fixes the transform_if() test to copy to a separate output
vector as in-place operation is not supported.
2015-05-17 12:04:52 -06:00
Kyle Lutz
4c00484e04 Merge pull request #454 from haahh/pr_valarray_operators
Missing valarray operators
2015-05-15 10:41:39 -06:00
Jakub Szuppe
28f08dda44 Add valarray operators
This adds missing operators to valarray. Note that in OpenCL it's impossible
to create memory buffer with bool type and because of that valarray<char> is used
as a return type for comparison and logical operators instead of valarray<bool>.
Implemented operators work only for default context (queue) and are asynchronous.
2015-05-15 18:12:07 +02:00
Kyle Lutz
79aa8f9086 Merge pull request #452 from haahh/strided_iterator
Add strided_iterator class (skip_iterator) #121
2015-04-20 19:58:31 -07:00
Jakub Szuppe
6c22df7077 Better descriptions and minor refactoring 2015-04-12 22:45:39 +02:00
Jakub Szuppe
7ce179d414 Add make_strided_iterator_end function 2015-04-12 16:05:22 +02:00
Jakub Szuppe
c80d42aa29 Strided iterator
Iterator adaptor which skips over multiple elements each time it is incremented.
2015-04-12 15:56:10 +02:00
Anees Haider
b565232b8e Merge remote-tracking branch 'compute/develop' 2015-04-06 09:33:52 +05:00
Junaid Muzammil
31342d7e53 Threefry generate signature modification 2015-04-05 21:27:31 +05:00
Muhammad Junaid Muzammil
61e16c8963 Overloaded Method for default Key Values 2015-04-02 00:26:06 +05:00
Kyle Lutz
f9136ed842 Add transform_if() algorithm 2015-03-31 19:45:58 -07:00
Junaid Muzammil
1c41612c9a Unit Test Fixed and Comments Added 2015-03-29 00:57:56 +05:00
Junaid Muzammil
1c75d5752d Necessary Changes Made to Threefry Engine as recommended 2015-03-28 18:06:01 +05:00
Muhammad Junaid Muzammil
37e060d0ca Threefry Random 123 Support Added 2015-03-22 16:53:47 +05:00
Jakub Szuppe
f95b1ee682 Separate kernel for reverse_copy()
Separate kernel for reverse_copy() algorithm improves its performance,
new tests for reverse_copy_int
2015-03-10 22:25:38 +01:00
Kyle Lutz
a1e3366ade Add Boost.Build support 2015-03-01 09:36:59 -08:00
Kyle Lutz
a71a4e9853 Add begin() and end() methods to extents<N> 2015-02-25 11:06:45 -07:00
Kyle Lutz
de76e66dd1 Merge pull request #426 from jmr1/msvc2013
MSVC 2013 build fixes
2015-02-22 19:02:45 -07:00
jmr1
bf233d833c Missing using declaration 2015-02-22 17:21:36 +01:00
Kyle Lutz
ca0bc4b7d3 Refactor image classes 2015-02-08 16:26:34 -08:00
Kyle Lutz
6e38dafbd5 Merge pull request #423 from kylelutz/buffer-clone-flags
Preserve memory flags in buffer::clone()
2015-02-08 15:06:57 -08:00
Kyle Lutz
a34aaf0456 Merge pull request #422 from kylelutz/no-device-found-exception
Add no_device_found exception
2015-02-08 15:06:43 -08:00
Kyle Lutz
8b2788f026 Add no_device_found exception 2015-02-07 12:47:11 -08:00
Kyle Lutz
3c56ea4cbe Preserve memory flags in buffer::clone() 2015-02-07 12:27:24 -08:00
Kyle Lutz
155ec4b8b9 Disable default context error handler 2015-02-07 10:56:34 -08:00
Bastian Köcher
1e711e0330 - Rebased with develop branch
- Moved include into the test

Conflicts:
	test/test_buffer.cpp
2015-01-20 10:19:37 +01:00
Kyle Lutz
f4bf942a31 Merge pull request #412 from bastiankoe/createsubbuffer
CreateSubbuffer support
2015-01-16 18:40:01 -08:00
Kyle Lutz
316109abd4 Merge pull request #410 from kylelutz/wait-guard
Add wait_guard class
2015-01-16 18:39:18 -08:00
Bastian Köcher
09d3c44cd7 - Added templated register_destructor_callback function and a test for this new functionality 2015-01-16 16:38:25 +01:00
Bastian Köcher
7eba538c55 Merge branch 'develop' into createsubbuffer 2015-01-16 15:59:24 +01:00
Bastian Köcher
78ce892705 - Added testcase for subbuffer creation
- Added documentation and asserts for buffer.create_subbuffer function
2015-01-16 15:57:28 +01:00
Kyle Lutz
79aa6758f2 Add wait_guard class 2015-01-07 20:19:05 -08:00
Kyle Lutz
8b27e22b2f Add test for vector::resize() exception-safety 2015-01-07 20:17:26 -08:00
Kyle Lutz
01643e7f9a Add test for equality with std::accumulate() 2014-12-30 16:12:55 -08:00
Kyle Lutz
6609a54c00 Merge pull request #399 from kylelutz/rename-misc-tests
Rename miscellaneous tests
2014-12-30 15:26:09 -08:00
Kyle Lutz
7f962e6078 Rename miscellaneous tests 2014-12-30 14:50:47 -08:00
Kyle Lutz
c48c4dd086 Fix local_buffer test when checking local memory size
This fixes a test failure for implementations which don't
properly report dynamically set local memory buffer sizes.
2014-12-30 14:42:52 -08:00
Kyle Lutz
c74c2abc4f Add four-iterator versions of equal() and mismatch() 2014-12-30 13:44:24 -08:00
Kyle Lutz
cfdb10c808 Move is_device_iterator to the public API 2014-12-30 10:06:47 -08:00
Kyle Lutz
c31195ec7d Add local_buffer class 2014-12-24 14:06:18 -08:00
Kyle Lutz
417cb03670 Fixes for Mac OS X 2014-12-24 09:25:55 -08:00
Kyle Lutz
e3bbce456b Merge pull request #352 from kylelutz/rename-types-builtin
Rename types/builtin.hpp to types/fundamental.hpp
2014-12-21 09:15:29 -08:00
Kyle Lutz
c97c83a562 Rename types/builtin.hpp to types/fundamental.hpp 2014-12-20 13:39:50 -08:00
Kyle Lutz
73b246603b Add for_each_n() algorithm 2014-12-20 13:30:36 -08:00
Kyle Lutz
885a2ad135 Improve documentation 2014-12-20 10:39:38 -08:00
sschaet
ea7e0a0993 fixing CHECK_RANGE_EQUAL
if the container passed to CHECK_RANGE_EQUAL is larger than the
expected range, the copy writes over the the boundaries of the
created buffer _actual.
2014-12-17 21:13:01 +01:00
Kyle Lutz
c4d49cef20 Merge pull request #341 from kylelutz/device-platform
Add device::platform() method
2014-12-14 10:58:38 -08:00
Kyle Lutz
2bab2c5ee7 Add device::platform() method 2014-12-13 11:25:11 -08:00
Kyle Lutz
a4a6614895 Add program_cache to the public API 2014-12-13 10:38:56 -08:00
Kyle Lutz
1a591e277b Add result_of<F(Args...)> meta-function 2014-12-10 22:58:54 -08:00
Kyle Lutz
8883a85fec Merge pull request #330 from Mageswaran1989/histogram_example
added histogram example based on opencv
2014-12-10 20:12:11 -08:00
Mageswaran.D
010753db26 added histogram example based on opencv 2014-12-10 22:43:23 +05:30
Kyle Lutz
848d95601e Merge pull request #335 from kylelutz/flat-map-custom-kernel
Add test for flat_map with custom kernel
2014-12-07 13:50:34 -08:00
Kyle Lutz
d62c214ddd Add test for flat_map with custom kernel 2014-12-07 13:38:26 -08:00
Kyle Lutz
425a9c006f Add utility directory
This adds a new utility directory and moves some of the utility
functions and classes (e.g. dim(), extents, wait_list) there.
2014-12-06 12:51:25 -08:00
Kyle Lutz
4185694366 Add extents<N> class
This adds an extents<N> class which stores an array of n-dimensional
extent values. This can be used to represent an ND-range for launching
an OpenCL kernel or for storing the size/shape of a 2D/3D image.

Also adds a variadic dim() function which provides a concise syntax
for creating extents<N> objects.
2014-12-02 22:42:24 -08:00
Kyle Lutz
fa75a66253 Merge pull request #318 from kylelutz/identity-function
Add identity<T>() function
2014-11-29 10:28:26 -08:00