LibreOffice Module opencl (master) 1
Namespaces | Macros | Functions | Variables
openclwrapper.cxx File Reference
#include <config_folders.h>
#include <opencl_device.hxx>
#include <opencl_device_selection.h>
#include <opencl/openclconfig.hxx>
#include <opencl/openclwrapper.hxx>
#include <opencl/platforminfo.hxx>
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/digest.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
#include <sal/config.h>
#include <sal/log.hxx>
#include <opencl/OpenCLZone.hxx>
#include <memory>
#include <string_view>
#include <stdlib.h>
#include <officecfg/Office/Common.hxx>
Include dependency graph for openclwrapper.cxx:

Go to the source code of this file.

Namespaces

namespace  openclwrapper
 

Macros

#define OPENCL_DLL_NAME   "libOpenCL.so.1"
 
#define DEVICE_NAME_LENGTH   1024
 
#define DRIVER_VERSION_LENGTH   1024
 
#define PLATFORM_VERSION_LENGTH   1024
 
#define CHECK_OPENCL(status, name)
 
#define CASE(val)   case CL_##val: return #val
 

Functions

static bool openclwrapper::initializeCommandQueue (GPUEnv &aGpuEnv)
 
void openclwrapper::setKernelEnv (KernelEnv *envInfo)
 
bool openclwrapper::generatBinFromKernelSource (cl_program program, const char *clFileName)
 
bool openclwrapper::buildProgramFromBinary (const char *buildOption, GPUEnv *gpuInfo, const char *filename, int idx)
 
const std::vector< OpenCLPlatformInfo > & openclwrapper::fillOpenCLInfo ()
 
bool openclwrapper::canUseOpenCL ()
 
bool openclwrapper::switchOpenCLDevice (std::u16string_view aDevice, bool bAutoSelect, bool bForceEvaluation, OUString &rOutSelectedDeviceVersionIDString)
 Used to set or switch between OpenCL devices. More...
 
void openclwrapper::getOpenCLDeviceInfo (size_t &rDeviceId, size_t &rPlatformId)
 
void openclwrapper::getOpenCLDeviceName (OUString &rDeviceName, OUString &rPlatformName)
 
void openclwrapper::setOpenCLCmdQueuePosition (int nPos)
 Set the current command queue position in case of multiple command queues for a given device. More...
 
const char * openclwrapper::errorString (cl_int nError)
 Return a textual representation of an OpenCL error code. More...
 
void releaseOpenCLEnv (openclwrapper::GPUEnv *gpuInfo)
 

Variables

GPUEnv openclwrapper::gpuEnv
 
sal_uInt64 openclwrapper::kernelFailures = 0
 

Macro Definition Documentation

◆ CASE

#define CASE (   val)    case CL_##val: return #val

◆ CHECK_OPENCL

#define CHECK_OPENCL (   status,
  name 
)
Value:
if( status != CL_SUCCESS ) \
{ \
SAL_WARN( "opencl", "OpenCL error code " << status << " at " SAL_DETAIL_WHERE "from " name ); \
return false; \
}

Definition at line 52 of file openclwrapper.cxx.

◆ DEVICE_NAME_LENGTH

#define DEVICE_NAME_LENGTH   1024

Definition at line 48 of file openclwrapper.cxx.

◆ DRIVER_VERSION_LENGTH

#define DRIVER_VERSION_LENGTH   1024

Definition at line 49 of file openclwrapper.cxx.

◆ OPENCL_DLL_NAME

#define OPENCL_DLL_NAME   "libOpenCL.so.1"

Definition at line 41 of file openclwrapper.cxx.

◆ PLATFORM_VERSION_LENGTH

#define PLATFORM_VERSION_LENGTH   1024

Definition at line 50 of file openclwrapper.cxx.

Function Documentation

◆ releaseOpenCLEnv()

void releaseOpenCLEnv ( openclwrapper::GPUEnv gpuInfo)

Variable Documentation

◆ mpOclContext

cl_context mpOclContext

Definition at line 296 of file openclwrapper.cxx.

◆ mpOclDevsID

cl_device_id mpOclDevsID

Definition at line 297 of file openclwrapper.cxx.

◆ mpOclPlatformID

cl_platform_id mpOclPlatformID

Definition at line 295 of file openclwrapper.cxx.