46 #include "detail/Skeleton.h"
47 #include "detail/Program.h"
54 template <
typename>
class Out;
55 template <
typename>
class Vector;
57 template<
typename>
class Scan;
81 class Scan<T(T)> :
public detail::Skeleton {
98 const std::string&
id =
"0",
99 const std::string& funcName = std::string(
"func"));
119 template <
typename... Args>
146 template <
typename... Args>
152 template <
typename... Args>
157 size_t calculateNumberOfPasses(
size_t workGroupSize,
158 size_t elements)
const;
160 std::vector<detail::DeviceBuffer>
161 createImmediateBuffers(
size_t passes,
164 const detail::Device::ptr_type& devicePtr);
166 void performScanPasses(
size_t passes,
168 const detail::Device::ptr_type& devicePtr,
169 const std::vector<detail::DeviceBuffer>& tmpBuffers,
170 const detail::DeviceBuffer& inputBuffer,
171 const detail::DeviceBuffer& outputBuffer);
173 void performUniformCombination(
size_t passes,
175 const detail::Device::ptr_type& devicePtr,
176 const std::vector<detail::DeviceBuffer>&
178 const detail::DeviceBuffer& outputBuffer);
180 void prepareInput(
const Vector<T>& input);
185 detail::Program createAndBuildProgram(
const std::string& source,
186 const std::string&
id,
187 const std::string& funcName)
const;
189 const detail::Program _program;
194 #include "detail/ScanDef.h"
This class is a unified wrapper for defining source code in SkelCL.
The Vector class is a one dimensional container which makes its data accessible on the host as well a...