3 #define __CL_ENABLE_EXCEPTIONS
5 #ifdef LANGMUIR_OPEN_CL
108 #ifdef LANGMUIR_OPEN_CL
112 cl::Platform m_platform;
117 cl::Context m_context;
127 cl::CommandQueue m_queue;
132 cl::Kernel m_coulomb1K;
137 cl::Kernel m_guass1K;
142 cl::Kernel m_coulomb2K;
147 cl::Kernel m_guass2K;
160 QVector<int> m_sHost;
165 QVector<int> m_qHost;
170 QVector<double> m_oHost;
175 cl::Buffer m_sDevice;
180 cl::Buffer m_qDevice;
185 cl::Buffer m_oDevice;
194 #endif // LANGMUIR_OPEN_CL
199 #endif // OPENCLHELPER_H
void copySiteAndChargeToHostVector(int index, int site, int charge=-1)
Does exactly what it says (host means the memory on the CPU)
double getOutputHostFuture(int index) const
Get the result stored in host memory (for future site)
void launchGaussKernel2()
Kernel2 calculates the coulomb potential with erf at current and future sites only.
World & m_world
Reference to World object.
Definition: openclhelper.h:106
A class to hold all objects in a simulation.
Definition: world.h:51
void compareHostAndDeviceForAllCarriers()
Compare GPU and CPU results.
void launchGaussKernel1()
Kernel1 calculates the coulomb potential with erf at every site.
double getOutputHost(int index) const
Get the result stored in host memory (for current site)
A class to run OpenCL calculations.
Definition: openclhelper.h:21
void launchCoulombKernel1()
Kernel1 calculates the coulomb potential at every site.
OpenClHelper(World &world, QObject *parent=0)
Create THE OpenClHelper; don't make more than one.
bool toggleOpenCL(bool on)
Turn on/off OpenCL in a smart-way.
void initializeOpenCL(int gpuID=-1)
Perform the tedious boilerplate code to initialize OpenCL.
void launchCoulombKernel2()
Kernel2 calculates the coulomb potential at current and future sites only.