49 #include "detail/Program.h"
50 #include "detail/Skeleton.h"
56 template <
typename>
class Out;
57 template <
typename>
class Vector;
58 namespace detail {
class DeviceList; }
60 template <
typename>
class Reduce;
96 class Reduce<T(T)> :
public detail::Skeleton {
112 Reduce(
const Source& source,
const std::string&
id =
"0",
113 const std::string& funcName =
"func");
133 template <
typename... Args>
160 template <
typename... Args>
169 std::string source()
const;
176 std::string func()
const;
183 std::string id()
const;
186 void prepareInput(
const Vector<T>& input);
191 template <
typename... Args>
192 void execute_first_step(
const detail::Device&
device,
193 const detail::DeviceBuffer& input,
194 detail::DeviceBuffer& output,
size_t data_size,
195 size_t global_size, Args&&... args);
197 template <
typename... Args>
198 void execute_second_step(
const detail::Device& device,
199 const detail::DeviceBuffer& input,
200 detail::DeviceBuffer& output,
size_t data_size,
203 skelcl::detail::Program createPrepareAndBuildProgram();
210 std::string _funcName;
213 std::string _userSource;
216 skelcl::detail::Program _program;
221 #include "detail/ReduceDef.h"
This class is a unified wrapper for defining source code in SkelCL.
SKELCL_DLL detail::DeviceID device(size_t dID)
Creates an OpenCL device ID to be used as parameter of the init(detail::PlatformID, detail::DeviceID) function.
The Vector class is a one dimensional container which makes its data accessible on the host as well a...