Commit Graph

9 Commits

Author SHA1 Message Date
Kyle Lutz
fda67a22d0 Update GitHub links 2015-05-17 20:32:09 -07:00
Kyle Lutz
9343b99085 Improve documentation 2014-04-24 19:51:45 -07:00
Kyle Lutz
ccd6f21d98 Change vector constructors to take queue argument
This changes the vector<T> constructors which copy or initialize
data to take a queue argument used for performing the operations.

Previously they just took a context argument used to initialize the
buffer and then created a new command queue to use. This improves
performance by not requiring a new command queue and also fixes issues
when performing operations on a different command queue while the
vector was still being initialized.
2014-01-27 23:39:19 -08:00
Kyle Lutz
ba9e64e316 Remove init argument from reduce()
This removes the init argument from reduce. This simplifies the
implementation and avoids copying a value from the host to the
device on every call to reduce.

If an initial value is required, the accumulate function can be
called instead.
2013-12-07 14:49:46 -08:00
Kyle Lutz
efa83c9420 Add test for calculating mean and standard deviation
This adds a test which uses reduce() and transform_reduce()
to calculate mean and standard deviation.
2013-09-24 22:50:02 -04:00
Kyle Lutz
a96c9c0182 Add result argument to reduce() algorithm
This adds an output iterator result argument to the reduce()
algorithm. Now, instead of returning the reduced result, the
result is written to an output iterator. This allows the value
to stay on the device and avoids a device-to-host copy in cases
where the result is not needed on the host (e.g. it is part of
a larger computation).

This is an API breaking change to users of reduce(). Affected code
should now declare a result variable and then pass a pointer to it
as the new result argument.
2013-09-07 15:36:49 -04:00
Denis Demidov
84394de119 Get rid of type convesion warnings inside VS2010 2013-06-24 09:57:22 +02:00
Denis Demidov
5d77bbebee Global setup for OpenCL context in tests
refs kylelutz/compute#9

device, context, and queue are initialized statically in `context_setup.hpp`.
With this change all tests are able to complete when an NVIDIA GPU is in
exclusive compute mode.

Side effect of the change:
Time for all tests to complete reduced from 15.71 to 13.03 sec Tesla C2075.
2013-04-19 14:53:59 +04:00
Kyle Lutz
d34cdaac59 Initial commit 2013-03-02 15:14:17 -05:00