12 #include <OpenCL/opencl.h>
67 template <
typename ScanFunc>
73 Scan(ScanFunc* scanFunc);
87 m_execPlanMulti = plan;
104 template <
typename T>
107 template <
typename T>
110 template <
typename InputIterator>
111 void operator()(InputIterator inputBegin, InputIterator inputEnd,
ScanType type,
typename InputIterator::value_type init =
typename InputIterator::value_type());
113 template <
typename T>
116 template <
typename T>
119 template <
typename InputIterator,
typename OutputIterator>
120 void operator()(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type,
typename InputIterator::value_type init =
typename InputIterator::value_type());
123 template <
typename T>
126 template <
typename T>
129 template <
typename InputIterator>
130 void CPU(InputIterator inputBegin, InputIterator inputEnd,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type());
132 template <
typename T>
135 template <
typename T>
138 template <
typename InputIterator,
typename OutputIterator>
139 void CPU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type());
143 template <
typename T>
146 template <
typename T>
149 template <
typename InputIterator>
150 void OMP(InputIterator inputBegin, InputIterator inputEnd,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type());
152 template <
typename T>
155 template <
typename T>
158 template <
typename InputIterator,
typename OutputIterator>
159 void OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type());
164 template <
typename T>
170 template <
typename InputIterator>
171 void CU(InputIterator inputBegin, InputIterator inputEnd,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type(),
int useNumGPU = 1);
173 template <
typename T>
179 template <
typename InputIterator,
typename OutputIterator>
180 void CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type(),
int useNumGPU = 1);
183 unsigned int cudaDeviceID;
185 template <
typename InputIterator,
typename OutputIterator>
186 void scanSingleThread_CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type,
typename InputIterator::value_type init,
unsigned int deviceID);
188 template <
typename T>
195 template <
typename T>
201 template <
typename InputIterator>
202 void CL(InputIterator inputBegin, InputIterator inputEnd,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type(),
int useNumGPU = 1);
204 template <
typename T>
210 template <
typename InputIterator,
typename OutputIterator>
211 void CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type = INCLUSIVE,
typename InputIterator::value_type init =
typename InputIterator::value_type(),
int useNumGPU = 1);
214 template <
typename InputIterator,
typename OutputIterator>
215 void scanSingle_CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type,
typename InputIterator::value_type init,
unsigned int deviceID);
217 template <
typename InputIterator,
typename OutputIterator>
218 void scanNumDevices_CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin,
ScanType type,
typename InputIterator::value_type init,
size_t numDevices);
220 template <
typename T>
224 std::vector<std::pair<cl_kernel, Device_CL*> > m_scanKernels_CL;
225 std::vector<std::pair<cl_kernel, Device_CL*> > m_scanUpdateKernels_CL;
226 std::vector<std::pair<cl_kernel, Device_CL*> > m_scanAddKernels_CL;
228 void createOpenCLProgram();
void CL(Vector< T > &input, ScanType type=INCLUSIVE, T init=T(), int useNumGPU=1)
Definition: scan_cl.inl:435
void OMP(Vector< T > &input, ScanType type=INCLUSIVE, T init=T())
Definition: scan_omp.inl:26
Contains a class declaration for the SparseMatrix container.
Includes the macro files needed for the defined backends.
void finishAll()
Definition: environment.inl:575
Contains the definitions of OpenCL specific member functions for the Scan skeleton.
A class representing an OpenCL device memory allocation for container.
Definition: device_mem_pointer_cl.h:38
~Scan()
Definition: scan.inl:88
Contains a class declaration for the object that represents an OpenCL device.
Scan(ScanFunc *scanFunc)
Definition: scan.inl:21
Contains the definitions of OpenMP specific member functions for the Scan skeleton.
Contains the definitions of non-backend specific member functions for the Scan skeleton.
void CPU(Vector< T > &input, ScanType type=INCLUSIVE, T init=T())
Definition: scan_cpu.inl:23
Contains a class declaration for the Matrix container.
A vector container class, implemented as a wrapper for std::vector.
Definition: vector.h:61
A class that describes an execution plan.
Definition: exec_plan.h:47
void operator()(Vector< T > &input, ScanType type, T init=T())
Definition: scan.inl:107
A class representing a CUDA device memory allocation for container.
Definition: device_mem_pointer_cu.h:58
Contains a class declaration for the Vector container.
Contains a class declaration for Environment class.
void CU(Vector< T > &input, ScanType type=INCLUSIVE, T init=T(), int useNumGPU=1)
Definition: scan_cu.inl:213
Contains the definitions of CUDA specific member functions for the Scan skeleton. ...
A class representing the column-wise iterator for the Matrix data-type.
A class representing the Scan skeleton.
Definition: scan.h:68
Contains a class that stores information about which back ends to use when executing.
Contains the definitions of CPU specific member functions for the Scan skeleton.
ScanType
Definition: scan.h:35