CSol
|
CSol solver base class. More...
#include <csol_solver.h>
Inherited by CSol_SmoothedParticleImpl, and CSol_SW_LBImpl.
Public Types | |
enum | Buffer_Types { Buffer_Type_SW_b, Buffer_Type_SW_c, Buffer_Type_SW_h, Buffer_Type_SW_w, Buffer_Type_SW_uh, Buffer_Type_SW_vh, Buffer_Type_User = 100 } |
Solver OpenCL buffer types. More... | |
enum | Grid_Types { Grid_Type_SW_b, Grid_Type_SW_h, Grid_Type_SW_w, Grid_Type_SW_uh, Grid_Type_SW_vh, Grid_Type_User = 100 } |
Solver two-dimensional grid layer types. More... | |
enum | Lattice_Types { Lattice_Type_SW_LB_f } |
Solver lattice types. More... | |
enum | Var_Types { Var_Type_Gravity, Var_Type_Time, Var_Type_TimeStep, Var_Type_Seed, Var_Type_User = 100 } |
Solver variable types. More... | |
enum | Vect_Types { Vect_Type_x, Vect_Type_y, Vect_Type_z, Vect_Type_r, Vect_Type_time } |
Solver vector types. More... | |
Public Member Functions | |
CSol_Solver () | |
CSol_Solver constructor. More... | |
bool | get_OpenCLInitialised () |
bool | getBuffer (int type, cl::Buffer **) |
Get buffer associated with buffer type. More... | |
cl::Context & | getContext () |
Get OpenCL context. More... | |
int | getDeviceID () |
std::vector< cl::Device > & | getDevices () |
Get OpenCL device list. More... | |
bool | getDimensions (int &, int &, int &, int &) |
Get dimensions of set-up. More... | |
QString | getError () |
bool | getGrid (int type, GridScalar **) |
Get grid pointer associated with grid type. More... | |
bool | getLattice (int type, GridLattice **) |
Get lattice pointer associated with lattice type. More... | |
cl_ulong | getMaxMemorySize () |
int | getMaxWorkGroupSize () |
bool | getMetrics (REAL &, REAL &, REAL &, REAL &) |
Get spatial metrics of set-up. More... | |
bool | getPoI (unsigned int &, cl::Buffer **) |
Get buffer associated with points-of-interest. More... | |
cl::CommandQueue & | getQueue () |
Get OpenCL queue. More... | |
bool | getSize (int &) |
Get OpenCL workgroup-specific size. More... | |
bool | getVar (int type, float &) |
Get pointer associated with variable. More... | |
bool | getVar (int type, double &) |
bool | getVar (int type, int &) |
bool | getVar (int type, qint64 &) |
std::vector< double > & | getVect (int type) |
Get pointer associated with vector. More... | |
bool | initOpenCL () |
Detect OpenCL platforms and devices, create OpenCL context and run OpenCL test. More... | |
void | registerBuffer (int type, cl::Buffer &) |
Set buffer associated with buffer type. More... | |
void | registerDimensions (int pnx, int pny, int ppadx, int plocalx) |
void | registerGrid (int type, GridScalar &) |
Set grid pointer associated with grid type. More... | |
void | registerLattice (int type, GridLattice &) |
Set lattice pointer associated with lattice type. More... | |
void | registerMetrics (REAL phx, REAL phy, REAL pox, REAL poy) |
void | registerPoI (unsigned int npoi_, cl::Buffer &poi_) |
void | registerVar (int type, float) |
Set variable associated with variable type. More... | |
void | registerVar (int type, double) |
void | registerVar (int type, int) |
void | registerVar (int type, qint64) |
bool | testOpenCL () |
Run a simple OpenCL test program and compare results against expected values from the CPU. More... | |
Static Public Member Functions | |
static void | destroyOpenCLInstance () |
static CSol_Solver * | getOpenCLInstance () |
static QString | timeFormat (REAL) |
Return a QString from a time value. More... | |
Contains register and OpenCL handles for inter-processor use.
enum Buffer_Types |
enum Grid_Types |
enum Lattice_Types |
enum Var_Types |
enum Vect_Types |
CSol_Solver | ( | ) |
|
static |
|
inline |
bool getBuffer | ( | int | type, |
cl::Buffer ** | rbuffer | ||
) |
cl::Context & getContext | ( | ) |
|
inline |
std::vector< cl::Device > & getDevices | ( | ) |
bool getDimensions | ( | int & | rnx, |
int & | rny, | ||
int & | rpadx, | ||
int & | rlocalx | ||
) |
|
inline |
bool getGrid | ( | int | type, |
GridScalar ** | rgrid | ||
) |
bool getLattice | ( | int | type, |
GridLattice ** | rlattice | ||
) |
|
inline |
|
inline |
bool getMetrics | ( | REAL & | rhx, |
REAL & | rhy, | ||
REAL & | rox, | ||
REAL & | roy | ||
) |
|
static |
bool getPoI | ( | unsigned int & | npoi_, |
cl::Buffer ** | rbuffer | ||
) |
cl::CommandQueue & getQueue | ( | ) |
bool getSize | ( | int & | rpadx | ) |
bool getVar | ( | int | type, |
float & | rvar | ||
) |
bool getVar | ( | int | type, |
double & | rvar | ||
) |
bool getVar | ( | int | type, |
int & | rvar | ||
) |
bool getVar | ( | int | type, |
qint64 & | rvar | ||
) |
std::vector< double > & getVect | ( | int | type | ) |
bool initOpenCL | ( | ) |
void registerBuffer | ( | int | type, |
cl::Buffer & | buffer | ||
) |
|
inline |
void registerGrid | ( | int | type, |
GridScalar & | grid | ||
) |
void registerLattice | ( | int | type, |
GridLattice & | lattice | ||
) |
|
inline |
|
inline |
void registerVar | ( | int | type, |
float | var | ||
) |
void registerVar | ( | int | type, |
double | var | ||
) |
void registerVar | ( | int | type, |
int | var | ||
) |
void registerVar | ( | int | type, |
qint64 | var | ||
) |
bool testOpenCL | ( | ) |
|
static |