LibreOffice Module opencl (master) 1
|
Classes | |
struct | GPUEnv |
struct | KernelEnv |
Functions | |
static bool | initializeCommandQueue (GPUEnv &aGpuEnv) |
void | setKernelEnv (KernelEnv *envInfo) |
bool | generatBinFromKernelSource (cl_program program, const char *clFileName) |
bool | buildProgramFromBinary (const char *buildOption, GPUEnv *gpuInfo, const char *filename, int idx) |
const std::vector< OpenCLPlatformInfo > & | fillOpenCLInfo () |
bool | canUseOpenCL () |
bool | switchOpenCLDevice (std::u16string_view aDevice, bool bAutoSelect, bool bForceEvaluation, OUString &rOutSelectedDeviceVersionIDString) |
Used to set or switch between OpenCL devices. More... | |
void | getOpenCLDeviceInfo (size_t &rDeviceId, size_t &rPlatformId) |
void | getOpenCLDeviceName (OUString &rDeviceName, OUString &rPlatformName) |
void | setOpenCLCmdQueuePosition (int nPos) |
Set the current command queue position in case of multiple command queues for a given device. More... | |
const char * | errorString (cl_int nError) |
Return a textual representation of an OpenCL error code. More... | |
Variables | |
GPUEnv | gpuEnv |
sal_uInt64 | kernelFailures = 0 |
OPENCL_DLLPUBLIC bool openclwrapper::buildProgramFromBinary | ( | const char * | buildOption, |
GPUEnv * | gpuInfo, | ||
const char * | filename, | ||
int | idx | ||
) |
Definition at line 363 of file openclwrapper.cxx.
References CHECK_OPENCL, i, idx, length, openclwrapper::GPUEnv::mpArryPrograms, openclwrapper::GPUEnv::mpContext, and SAL_INFO.
OPENCL_DLLPUBLIC bool openclwrapper::canUseOpenCL | ( | ) |
Definition at line 752 of file openclwrapper.cxx.
References env.
Referenced by fillOpenCLInfo(), getOpenCLDeviceInfo(), getOpenCLDeviceName(), and switchOpenCLDevice().
OPENCL_DLLPUBLIC const char * openclwrapper::errorString | ( | cl_int | nError | ) |
Return a textual representation of an OpenCL error code.
(Currently the symbolic name sans the CL_ prefix.)
Definition at line 881 of file openclwrapper.cxx.
Referenced by initializeCommandQueue(), and switchOpenCLDevice().
OPENCL_DLLPUBLIC const std::vector< OpenCLPlatformInfo > & openclwrapper::fillOpenCLInfo | ( | ) |
Definition at line 666 of file openclwrapper.cxx.
References canUseOpenCL(), i, nState, and OPENCL_DLL_NAME.
Referenced by switchOpenCLDevice().
OPENCL_DLLPUBLIC bool openclwrapper::generatBinFromKernelSource | ( | cl_program | program, |
const char * | clFileName | ||
) |
Definition at line 250 of file openclwrapper.cxx.
References CHECK_OPENCL, and SAL_INFO.
OPENCL_DLLPUBLIC void openclwrapper::getOpenCLDeviceInfo | ( | size_t & | rDeviceId, |
size_t & | rPlatformId | ||
) |
Definition at line 835 of file openclwrapper.cxx.
References canUseOpenCL(), gpuEnv, openclwrapper::GPUEnv::mpDevID, and OPENCL_DLL_NAME.
OPENCL_DLLPUBLIC void openclwrapper::getOpenCLDeviceName | ( | OUString & | rDeviceName, |
OUString & | rPlatformName | ||
) |
Definition at line 848 of file openclwrapper.cxx.
References canUseOpenCL(), DEVICE_NAME_LENGTH, gpuEnv, openclwrapper::GPUEnv::mpDevID, and OPENCL_DLL_NAME.
|
static |
Definition at line 105 of file openclwrapper.cxx.
References errorString(), i, openclwrapper::GPUEnv::mbCommandQueueInitialized, openclwrapper::GPUEnv::mpCmdQueue, openclwrapper::GPUEnv::mpContext, openclwrapper::GPUEnv::mpDevID, nState, OPENCL_CMDQUEUE_SIZE, SAL_INFO, and SAL_WARN.
Referenced by setKernelEnv().
OPENCL_DLLPUBLIC void openclwrapper::setKernelEnv | ( | KernelEnv * | envInfo | ) |
Definition at line 146 of file openclwrapper.cxx.
References gpuEnv, initializeCommandQueue(), openclwrapper::GPUEnv::mbCommandQueueInitialized, openclwrapper::GPUEnv::mnCmdQueuePos, openclwrapper::GPUEnv::mpArryPrograms, openclwrapper::GPUEnv::mpCmdQueue, openclwrapper::GPUEnv::mpContext, openclwrapper::KernelEnv::mpkCmdQueue, openclwrapper::KernelEnv::mpkContext, openclwrapper::KernelEnv::mpkProgram, and OPENCL_CMDQUEUE_SIZE.
OPENCL_DLLPUBLIC void openclwrapper::setOpenCLCmdQueuePosition | ( | int | nPos | ) |
Set the current command queue position in case of multiple command queues for a given device.
Definition at line 872 of file openclwrapper.cxx.
References gpuEnv, openclwrapper::GPUEnv::mnCmdQueuePos, nPos, and OPENCL_CMDQUEUE_SIZE.
Referenced by switchOpenCLDevice().
OPENCL_DLLPUBLIC bool openclwrapper::switchOpenCLDevice | ( | std::u16string_view | aDevice, |
bool | bAutoSelect, | ||
bool | bForceEvaluation, | ||
OUString & | rOutSelectedDeviceVersionIDString | ||
) |
Used to set or switch between OpenCL devices.
aDeviceId | the id of the opencl device of type cl_device_id, "" means use software calculation |
bAutoSelect | use the algorithm to select the best OpenCL device |
rOutSelectedDeviceVersionIDString | returns the selected device's version string. |
Definition at line 762 of file openclwrapper.cxx.
References ds_device::aDeviceID, canUseOpenCL(), env, errorString(), ds_device::eType, fillOpenCLInfo(), getDeviceInfoString(), getDeviceSelection(), gpuEnv, openclwrapper::GPUEnv::mpDevID, nState, OPENCL_DLL_NAME, OpenCLDevice, releaseOpenCLEnv(), SAL_INFO, SAL_WARN, and setOpenCLCmdQueuePosition().
OPENCL_DLLPUBLIC GPUEnv openclwrapper::gpuEnv |
Definition at line 67 of file openclwrapper.cxx.
Referenced by getOpenCLDeviceInfo(), getOpenCLDeviceName(), OpenCLZone::hardDisable(), openclwrapper::GPUEnv::isOpenCLEnabled(), releaseOpenCLEnv(), setKernelEnv(), setOpenCLCmdQueuePosition(), and switchOpenCLDevice().
OPENCL_DLLPUBLIC sal_uInt64 openclwrapper::kernelFailures = 0 |
Definition at line 68 of file openclwrapper.cxx.