SG++-Doxygen-Documentation
sgpp::base::OCLManager Class Reference

#include <OCLManager.hpp>

Public Member Functions

void buildKernel (const std::string &program_src, const char *kernel_name, cl_context context, size_t num_devices, cl_device_id *device_ids, cl_kernel *kernel)
 buildKernel builds the program that is represented by program_src and creates num_devices kernel objects that are stored into the array kernel (must be already allocated with at least num_devices ) More...
 
 OCLManager (std::shared_ptr< base::OCLOperationConfiguration > parameters)
 
 ~OCLManager ()
 

Public Attributes

cl_command_queue * command_queue
 
cl_context context
 
cl_device_id * device_ids
 
cl_uint num_devices
 
cl_uint num_platforms
 
std::shared_ptr< base::OCLOperationConfigurationparameters
 
cl_platform_id platform_id
 
cl_platform_id * platform_ids
 
bool verbose
 

Constructor & Destructor Documentation

◆ OCLManager()

sgpp::base::OCLManager::OCLManager ( std::shared_ptr< base::OCLOperationConfiguration parameters)
explicit

◆ ~OCLManager()

sgpp::base::OCLManager::~OCLManager ( )

Member Function Documentation

◆ buildKernel()

void sgpp::base::OCLManager::buildKernel ( const std::string &  program_src,
const char *  kernel_name,
cl_context  context,
size_t  num_devices,
cl_device_id *  device_ids,
cl_kernel *  kernel 
)

buildKernel builds the program that is represented by program_src and creates num_devices kernel objects that are stored into the array kernel (must be already allocated with at least num_devices )

Parameters
program_srcthe source of the program to compile
kernel_namename of the kernel function (in program_src) to create the kernel for
contextOpenCL context
num_devicesnumber of OpenCL devices
device_idsarray with device ids, necessary for displaying build info
kernelalready allocated array: the resulting kernels are put into this array, one for each device (=> at least num_devices entries)
Returns

References python.statsfileInfo::i, num_devices, parameters, and verbose.

Member Data Documentation

◆ command_queue

cl_command_queue* sgpp::base::OCLManager::command_queue

Referenced by OCLManager(), and ~OCLManager().

◆ context

cl_context sgpp::base::OCLManager::context

Referenced by OCLManager(), and ~OCLManager().

◆ device_ids

cl_device_id* sgpp::base::OCLManager::device_ids

Referenced by OCLManager().

◆ num_devices

cl_uint sgpp::base::OCLManager::num_devices

◆ num_platforms

cl_uint sgpp::base::OCLManager::num_platforms

Referenced by OCLManager().

◆ parameters

std::shared_ptr<base::OCLOperationConfiguration> sgpp::base::OCLManager::parameters

Referenced by buildKernel().

◆ platform_id

cl_platform_id sgpp::base::OCLManager::platform_id

Referenced by OCLManager().

◆ platform_ids

cl_platform_id* sgpp::base::OCLManager::platform_ids

Referenced by OCLManager().

◆ verbose


The documentation for this class was generated from the following files: