2
0
mirror of https://github.com/boostorg/compute.git synced 2026-01-27 06:42:19 +00:00
Commit Graph

668 Commits

Author SHA1 Message Date
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
Jakub Szuppe
c47753c4fa Stable comparison sort, sort-by-key 2016-06-22 17:06:12 +02:00
Jakub Szuppe
7996382178 Use index instead of copying vals in bitonic sort-by-key
Instead of copying values in local memory in bitonic block
sort (when sorting by key), we save and copy local index
and copy value once at the end. This saves local memory.
2016-06-22 15:59:55 +02:00
Jakub Szuppe
8f033e72ee Add comparison sort and sort by key 2016-06-21 17:41:36 +02:00
Jakub Szuppe
8f4db3d7b7 Reuse dispatch_copy_async() in dispatch_copy() 2016-05-28 22:54:51 +02:00
Jakub Szuppe
bffc9f74fb Fix async copying when first == last (input is empty) 2016-05-28 22:46:35 +02:00
Jakub Szuppe
c9a0aba172 Remove debug macro, fix names of event variables 2016-05-28 22:05:50 +02:00
Jakub Szuppe
5c29b50823 Coping SVM to/from host by mapping SVM memory 2016-05-28 13:15:36 +02:00
Jakub Szuppe
753f883321 Support for svm_ptr<T> in meta_kernel 2016-05-28 13:15:36 +02:00
Jakub Szuppe
4280024f26 Now svm_ptr<T> keeps its context
This commit modifies svm_ptr<T> to keep its context. It is
convenient for the users and enables creating
svm_ptr_index_expr<T, IndexExpr> class.
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
3dcbd4c001 Fix async coping svm_ptr<> from/to/on device 2016-05-28 13:15:36 +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
d12e07c0e9 Fix type-safety issues for async copying host->device 2016-05-21 16:58:15 +02:00
Jakub Szuppe
a830531445 Fix type-safety issues when copying host->device 2016-05-21 16:44:44 +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
227c05cbdc Add min() and max() methods for discrete_distribution 2016-05-11 08:30:44 +02:00
Jakub Szuppe
e9b2c0ff4b Add default constructor for discrete_distribution 2016-05-11 08:30:41 +02:00
Jakub Szuppe
1799ee1b6e Support for first==last in discrete_distribution range ctor
Add support for the case with first iterator being equal
to last iterator in range ctor. Now it behaves like ctor in
std::discrete_distribution.
Additionaly: now method probabilities() returns correct vector
of probabilities.
2016-05-11 08:30:39 +02:00
Jakub Szuppe
0fe1ab3e24 Add type checks for distributions
This commit adds asserts that check if used template
type is correct (is integral, is a floating point type).
2016-05-05 14:23:28 +02:00
Jakub Szuppe
38b75f920c Fix boost::compute::discrete_distribution constructor 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
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