SG++
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

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

References command_queue, context, and num_devices.

Member Function Documentation

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 num_devices, parameters, and verbose.

Member Data Documentation

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

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

cl_context sgpp::base::OCLManager::context

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

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

Referenced by OCLManager().

cl_uint sgpp::base::OCLManager::num_devices
cl_uint sgpp::base::OCLManager::num_platforms

Referenced by OCLManager().

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

Referenced by buildKernel().

cl_platform_id sgpp::base::OCLManager::platform_id

Referenced by OCLManager().

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

Referenced by OCLManager().


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