Commit Graph

791 Commits

Author SHA1 Message Date
Kyle Lutz
251d02b17d Merge pull request #731 from jszuppe/pr_svm_migrate_mem
Add wrapper for clEnqueueSVMMigrateMem()
2017-06-11 13:18:47 -07:00
Jakub Szuppe
f568c447e3 Add wrapper for clEnqueueSVMMigrateMem() 2017-06-11 08:19:35 +02:00
Kyle Lutz
08e00e3848 Merge pull request #729 from jszuppe/pr_default_device_queue
Default device queue
2017-06-10 19:13:44 -07:00
Jakub Szuppe
97b91bffa1 Fix OpenCL 2.1 references 2017-06-04 14:47:37 +02:00
Jakub Szuppe
cb534cdfa2 Add clSetDefaultDeviceCommandQueue wrapper 2017-06-04 14:46:05 +02:00
Jakub Szuppe
70234dd24b Fix issue #727 2017-06-03 13:32:41 +02:00
Jakub Szuppe
8f0b1bbc3f Make device get timer methods const 2017-05-27 20:31:53 +02:00
Jakub Szuppe
b43adb4517 Add host timer res query to platform 2017-05-27 18:05:01 +02:00
Jakub Szuppe
86af893f58 Add OpenCL 2.1 device info queries 2017-05-27 18:05:01 +02:00
Jakub Szuppe
80ef5a7758 Add clGetHostTimer and clGetDeviceAndHostTimer
Add wrappers for clGetHostTimer and clGetDeviceAndHostTimer to
device class.
2017-05-27 18:05:01 +02:00
Jakub Szuppe
7542dd0622 Add create_program_with_il() to program 2017-05-23 00:06:12 +02:00
Jakub Szuppe
8979846ba0 Merge pull request #720 from jszuppe/pr_kernel_clone
Add clCloneKernel() wrapper
2017-05-16 10:51:51 +02:00
Janusz Rupar
da05ba9631 vector::reserve() implemented
Fixes bug #687
2017-05-14 11:32:33 +02:00
Jakub Szuppe
6fc7bea6e9 Fix scan_on_cpu algorithm 2017-05-13 15:22:45 +02:00
Jakub Szuppe
24bbb350bb Add clone() to kernel class
This adds wrapper for clCloneKernel() OpenCL 2.1 API
function to the kernel class.
2017-05-12 21:38:24 +02:00
Jakub Szuppe
c736d6eb9c Add check_version() to platform class 2017-05-12 21:23:03 +02:00
Jakub Szuppe
77fe5e8204 Add desc to check_version() in device class 2017-05-12 21:23:03 +02:00
Jakub Szuppe
aa778dc822 Add missing BOOST_COMPUTE_MAX_CL_VERSION defs 2017-05-07 11:56:26 +02:00
Jakub Szuppe
d4b0192634 Add get_sub_group_info() to kernel class 2017-05-07 11:56:25 +02:00
Jakub Szuppe
114e444a7e Small fixes to opengl/context.hpp 2017-05-06 20:27:17 +02:00
Jakub Szuppe
863371d290 Merge pull request #715 from haahh/pr_fixes
Various fixes
2017-04-27 20:58:01 +02:00
Jakub Szuppe
193d7f6247 Merge pull request #712 from ddemidov/issue-692
Optionally enforce device selected with BOOST_COMPUTE_DEFAULT variables
2017-04-26 11:32:58 +02:00
Jakub Szuppe
0f5c49d5f5 Fix write/read race bug
If you write to and read from buffer using different command queues,
you have a race condition. User expects operator= to be synchronous,
however, clEnqueueWriteBuffer call can only promises:

If blocking_write is CL_TRUE, the OpenCL implementation copies the data
referred to by ptr and enqueues the write operation in the
command-queue. The memory pointed to by ptr can be reused by the
application after the clEnqueueWriteBuffer call returns.
2017-04-26 11:22:45 +02:00
Jakub Szuppe
64d389203b Explicit conversion to cl_uint 2017-04-26 11:22:45 +02:00
Jakub Szuppe
84cff684c2 Add missing == != operators 2017-04-26 11:22:36 +02:00
Jakub Szuppe
3906cd6587 Disable deprecated warns for max CL version
Disable deprecated OpenCL API warnings for max
OpenCL version defined in BOOST_COMPUTE_MAX_CL_VERSION.

Example: If you have 2.1 OpenCL headers and set
BOOST_COMPUTE_MAX_CL_VERSION to 102 (OpenCL 1.2), you
won't get warnings for using API function deprecated in
OpenCL 1.1.
2017-04-23 20:11:10 +02:00
Amir Shavit
09ef2163c2 Added BOOST_COMPUTE_MAX_CL_VERSION to specify the newest version to use 2017-04-23 20:11:09 +02:00
Denis Demidov
a7aa6cb564 Optionally enforce device selected with BOOST_COMPUTE_DEFAULT variables
See #692
2017-04-21 13:23:39 +03:00
Jakub Szuppe
dadfc113bd Fix bc::valarray copy ctor 2017-04-18 21:03:20 +02:00
Huan Zhang
11c5e4af5c use _WIN32 instead of WIN32 2017-04-12 16:28:57 -07:00
Jakub Szuppe
4b080c1b6c Fixes bug #688 2017-04-07 19:38:25 +02:00
Jakub Szuppe
a0c0602536 Fixes #162 2017-04-02 17:18:04 +02:00
koosha94
12af5a850a This fix #570 2017-04-01 13:41:15 +02:00
Jakub Szuppe
6f9e6cf650 Merge pull request #658 from Slonegg/compile_program_with_headers
added headers to program::compile
2017-03-29 21:31:21 +02:00
dPavelDev
5cd00f5423 Add compute::program::create_with_source_file with more than one file. 2017-03-27 22:41:29 +03:00
Jakub Szuppe
1380a04582 Merge pull request #677 from kenba/master
Check platform extension for issue #676
2017-03-25 13:58:29 +01:00
Huan Zhang
1a7eeedf30 fix SHA1 hash in build_with_source() 2017-03-24 14:35:04 -07:00
Kyle Lutz
d8beaaf227 Merge pull request #694 from haahh/pr_vs_fixes
Various fixes for Visual Studio
2017-03-20 20:11:12 -07:00
Jakub Szuppe
ee7591b930 Fix: snprintf is in VS only since VS2015 2017-03-18 15:19:57 +01:00
Jakub Szuppe
d0f3e50a32 Fix issue #683
Make sure variable type is kept when
stringifying its value in bc::lambda.
2017-03-17 21:44:00 +01:00
Ken Barker
e2f998bec6 Check platform extension for issue #676 2016-12-20 19:02:45 +00:00
Kyle Lutz
cc30762666 Merge pull request #675 from Ravi0li/patch-1
delete convert_T()
2016-12-05 20:24:42 -08:00
Kyle Lutz
bd2f3ffb23 Merge pull request #672 from haahh/pr_fix_merge_sort_gpu
Fix merge_sort_on_gpu()
2016-12-05 20:23:58 -08:00
Ravi0li
1a0c8d5a71 delete convert_T()
fix #674
2016-12-05 15:51:26 +01:00
Jakub Szuppe
760eda4e01 Fix merge_sort_on_gpu() 2016-12-02 20:13:05 +01:00
Kyle Lutz
47f2b8fde8 Add BOOST_COMPUTE_NO_BOOST_CHRONO configuration macro
This adds a "BOOST_COMPUTE_NO_BOOST_CHRONO" which disables
including/using Boost.Chrono from Boost.Compute.
2016-11-30 22:36:29 -08:00
Kyle Lutz
e2bca3a14a Merge pull request #666 from haahh/pr_fix_iterators_index_expr
Fix buffer_iterator_index_expr
2016-11-08 22:00:00 -08:00
Kyle Lutz
30d02534d9 Merge pull request #667 from keryell/ronan/2.0-queue-properties
Add OpenCL 2.0 command queue properties
2016-11-07 20:10:57 -08:00
Ronan Keryell
3be6b4e96c Add OpenCL 2.0 command queue properties 2016-11-07 20:50:35 +00:00
Kyle Lutz
a94c75df9f Merge pull request #660 from haahh/pr_lambda_funcs
Add missing lambda wrappers for builtin OpenCL funcs
2016-10-18 21:10:01 -07:00
Kyle Lutz
1360b882f8 Merge pull request #657 from Slonegg/check_flush_and_finish
check result of flush and finish
2016-10-18 21:08:42 -07:00
Kyle Lutz
dd045f721a Merge pull request #656 from Slonegg/master
transform_if_impl optimization: avoid reduction
2016-10-18 21:08:09 -07:00
Kyle Lutz
84673799c3 Merge pull request #654 from haahh/pr_docs
Document rough space complexity for every algorithm
2016-10-18 21:06:58 -07:00
Jakub Szuppe
9ed62a480f Make index expressions immutable 2016-10-08 11:25:28 +02:00
Jakub Szuppe
8c024fe178 Index expression is valid as long as buffer is
buffer_iterator_index_expr<> is now valid as long
as underlying buffer is valid, not buffer_iterator<>
used to create the expression.
2016-10-08 11:25:28 +02:00
Jakub Szuppe
8d9109e2f8 Add lambda wrappers for native_|half_ funcs 2016-09-24 21:37:21 +02:00
Jakub Szuppe
6f704003f1 Add wrappers for OpenCL builtin funs with ptrs 2016-09-24 21:37:21 +02:00
Jakub Szuppe
1b2bb4b98e Add missing lambda wrappers for builtin funcs 2016-09-24 21:35:25 +02:00
Dmitry Trifonov
e845a80ab8 added headers to program::compile 2016-09-14 13:54:49 -07:00
Dmitry Trifonov
9b2e9d05ab check result of flush and finish 2016-09-14 12:02:41 -07:00
Dmitry Trifonov
4bd324e6ff transform_if_impl optimization: avoid reduction 2016-09-10 14:42:56 -07:00
Kyle Lutz
86211062a7 Merge pull request #653 from haahh/pr_misc_doc_fixes
Misc documentation fixes
2016-09-01 21:41:46 -07:00
Jakub Szuppe
35f0f8145e Document rough space complexity for every algorithm 2016-08-28 23:19:28 +02:00
Jakub Szuppe
9496721421 Fix transform() description 2016-08-26 23:55:46 +02:00
Kyle Lutz
886205fdcf Merge pull request #651 from haahh/fix_minmax_element
Fix minmax_element() and add test for it
2016-08-23 21:53:24 -07:00
Jakub Szuppe
3196b71273 Fix minmax_element() and add test for it
Remove useless Compare template parameter and add
test for minmax_element().
2016-08-23 21:27:32 +02:00
Jakub Szuppe
2bd90c6392 Fix C4267 warn. when compiling with MSVC, OpenCL 2.0 2016-08-22 18:57:36 +02:00
Jakub Szuppe
45ea54f704 Fix gather algorithm 2016-08-22 18:55:20 +02:00
Jakub Szuppe
544242744c Fix typo in wait_list 2016-08-22 18:55:20 +02:00
Jakub Szuppe
6cd0222bbd Fix typo in context.hpp 2016-08-22 18:55:20 +02:00
Kyle Lutz
8cbe8b30c3 Merge pull request #642 from dPavelDev/master
Fixed unnecessary reallocation in vector::resize() when size == capacity
2016-08-15 18:36:33 -07:00
dPavelDev
7fc6e47970 Fixed unnecessary reallocation in vector::resize() when size == capacity 2016-08-15 14:10:15 +03:00
Jakub Szuppe
90861687d1 Fix system::platforms()
The 2nd call to clGetPlatformsIDs crashed when there
were no OpenCL platforms because then count variable was 0
and clGetPlatformIDs specification says: "If platforms is
not NULL, the num_entries must be greater than zero".
2016-08-12 11:58:49 +02:00
Kyle Lutz
05ab43ed58 Cast index argument to cl_uint in kernel::get_arg_info()
This casts the 'index' argument in kernel::get_arg_info() to cl_uint
in order to match the signature for clGetKernelArgInfo(). This fixes
the "conversion from 'size_t' to 'cl_uint', possible loss of data"
compiler warning.
2016-08-03 20:16:19 -07:00
Kyle Lutz
6688e92f07 Change size_t argument to uint_ in opengl_enqueue_*_gl_objects() functions
This changes the opengl_enqueue_*_gl_objects() functions to take their
'num_objects' argument as 'uint_' instead of 'size_t'. This fixes the
"conversion from 'size_t' to 'cl_uint', possible loss of data" compiler
warnings from MSVC.
2016-07-30 18:28:41 -07:00
Kyle Lutz
c4b3793be1 Ignore unused arguments in kernel::set_arg_svm_ptr()
This ignores unused arguments in the kernel::set_arg_svm_ptr()
when compiled without OpenCL 2.0 support. This fixes the "unused
parameter" compiler warning.
2016-07-30 18:19:26 -07:00
Kyle Lutz
75daaf67d1 Remove const from return type of context_error::get_private_info_size()
This removes the const specifier from the return type of the
context_error::get_private_info_size() method. This fixes the "type
qualifiers ignored on function return type" compiler warning.
2016-07-30 18:14:56 -07:00
Kyle Lutz
b8fdabab19 Merge pull request #636 from dPavelDev/develop
Fixed bug in opengl_create_shared_context
2016-07-27 21:14:38 -07:00
dPavelDev
e978396b21 Fixed bug in opengl_create_shared_context 2016-07-27 14:36:57 +03:00
Jakub Szuppe
32dc57bbf9 Add scan for multicore CPUs 2016-07-25 22:37:17 +02:00
Jakub Szuppe
cd5bb606ec Rename scan_on_cpu to serial_scan 2016-07-25 15:28:19 +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
06124180dc Fix find_extrema_with_reduce()
It fixes wrong type of variable representing index.
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
fb641de7cc Add operator= for vectors with different allocator
Now code: `vector<T> a(context); vector<T, OtherAlloc> b(context);
a = b;` works.
2016-07-16 20:14:14 +02:00
Jakub Szuppe
8ae5cc9117 Array should always use queue from its context
Until now boost::compute::array worked correctly only
for default context (global) since it was using default
queue (global) for all its operations. Now it uses queue
from its context.
2016-07-16 19:30:25 +02:00
Jakub Szuppe
b810d12aea Making sure serial_reduce_threshold is in the right range
Parameter serial_reduce_threshold for reducing on CPU
should be always greater or equal to the number of compute units
(cores) in the CPU.
2016-07-16 13:02:34 +02:00
Jakub Szuppe
04b6e8fba3 find_extrema() optimized for multicore CPUs 2016-07-16 13:02:34 +02:00
Kyle Lutz
d303097000 Merge pull request #626 from haahh/pr_transform_cpu
Transform for multicore CPUs
2016-07-11 20:16:53 -07: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
a800dd33a1 Fix build error due to possible typo (on macOS) 2016-07-10 19:54:45 +02:00
Jakub Szuppe
a10e7d31f7 Disable CPU-optimized transform/copy_on_device() on Apple
Yet another bug on Apple OpenCL Platform.
2016-07-10 16:17:48 +02:00
Jakub Szuppe
4093481920 Remove unnecessary check 2016-07-10 13:56:39 +02:00
Jakub Szuppe
97f0225072 Fix ‘local_vals_arg’ may be uninitialized warning 2016-07-09 14:39:47 +02:00
Jakub Szuppe
9e2fc74826 Use serial_reduce for small inputs
For inputs smaller than <serial_reduce_threshold>
serial_reduce algorithm is used.
2016-07-09 14:06:06 +02:00
Jakub Szuppe
a085e6b3e1 Reduce for multicore CPUs 2016-07-09 14:06:06 +02:00
Jakub Szuppe
34c476c87a Tranform/copy on device optimized for CPUs 2016-07-06 19:23:30 +02:00
Kyle Lutz
a3f72e6191 Merge pull request #622 from haahh/pr_adjacent_diff_fix
Fix adjacent_difference when first == result
2016-07-05 16:52:40 -07:00
Jakub Szuppe
c6123c403c Remove unused function 2016-07-05 13:40:42 +02:00
Jakub Szuppe
92a16e459c Fix adjacent_difference when first == result
Situation where first == result was only covered
when binary function was not specified.
2016-07-01 21:25:46 +02:00