Commit Graph

530 Commits

Author SHA1 Message Date
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