5 #ifndef MAPOVERLAP_2D_H
6 #define MAPOVERLAP_2D_H
12 #include <OpenCL/opencl.h>
20 #include "../matrix.h"
50 template <
typename MapOverlap2DFunc>
70 m_execPlanMulti = plan;
75 MapOverlap2DFunc* m_mapOverlapFunc;
100 template <
typename T>
103 template <
typename T>
106 template <
typename T>
109 template <
typename T>
114 template <
typename T>
117 template <
typename T>
120 template <
typename T>
123 template <
typename T>
129 template <
typename T>
132 template <
typename T>
135 template <
typename T>
138 template <
typename T>
139 void CU(
Matrix<T>& input,
Matrix<T>& output,
size_t filter_rows,
size_t filter_cols,
bool useTiling=
false,
int useNumGPU=1);
142 unsigned int cudaDeviceID;
144 template <
typename T>
145 void mapOverlapSingleThread_CU(
Matrix<T>& input,
Matrix<T>& output,
unsigned int deviceID);
147 template <
typename T>
148 void mapOverlapMultipleThread_CU(
Matrix<T>& input,
Matrix<T>& output,
size_t numDevices);
153 template <
typename T>
156 template <
typename T>
159 template <
typename T>
162 template <
typename T>
163 void CL(
Matrix<T>& input,
Matrix<T>& output,
size_t filter_rows,
size_t filter_cols,
int useNumGPU = 1);
166 template <
typename T>
167 void mapOverlapSingleThread_CL(
Matrix<T>& input,
Matrix<T>& output,
unsigned int deviceID);
169 template <
typename T>
170 void mapOverlapMultipleThread_CL(
Matrix<T>& input,
Matrix<T>& output,
size_t numDevices);
173 std::vector<std::pair<cl_kernel, Device_CL*> > m_kernels_2D_CL;
175 std::vector<std::pair<cl_kernel, Device_CL*> > m_kernels_Mat_ConvolFilter_CL;
176 std::vector<std::pair<cl_kernel, Device_CL*> > m_kernels_Mat_Convol_CL;
178 void replaceText(std::string& text, std::string find, std::string replace);
179 void createOpenCLProgram();
MapOverlap2D(MapOverlap2DFunc *mapOverlapFunc)
Definition: 2dmapoverlap.inl:25
Contains the definitions of OpenCL specific member functions for the MapOverlap2D skeleton...
Includes the macro files needed for the defined backends.
void finishAll()
Definition: environment.inl:575
Contains the definitions of CUDA specific member functions for the MapOverlap2D skeleton.
~MapOverlap2D()
Definition: 2dmapoverlap.inl:91
void OMP(Matrix< T > &input)
Definition: 2dmapoverlap_omp.inl:23
Contains a class declaration for the object that represents an OpenCL device.
A class representing the MapOverlap skeleton for 2D overlap for Matrix operands (useful for convoluti...
Definition: 2dmapoverlap.h:51
void CPU(Matrix< T > &input)
Definition: 2dmapoverlap_cpu.inl:21
Contains the definitions of CPU specific member functions for the MapOverlap2D skeleton.
A class that describes an execution plan.
Definition: exec_plan.h:47
void CU(Matrix< T > &input, int useNumGPU=1)
Definition: 2dmapoverlap_cu.inl:29
void CL(Matrix< T > &input, int useNumGPU=1)
Definition: 2dmapoverlap_cl.inl:157
Contains a class declaration for Environment class.
Contains the definitions of OpenCL specific member functions for the MapOverlap2D skeleton...
A class representing the column-wise iterator for the Matrix data-type.
void operator()(Matrix< T > &input)
Definition: 2dmapoverlap.inl:108
Contains the definitions of non-backend specific member functions for the MapOverlap2D skeleton...
Contains a class that stores information about which back ends to use when executing.