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

#include <OCLManagerMultiPlatform.hpp>

Public Member Functions

void buildKernel (const std::string &program_src, const std::string &kernel_name, std::map< cl_platform_id, std::vector< cl_kernel >> &kernels)
 buildKernel builds the program that is represented by program_src and creates num_devices kernel objects that are stored into the map kernels More...
 
cl_kernel buildKernel (const std::string &source, std::shared_ptr< OCLDevice > device, json::Node &kernelConfiguration, const std::string &kernelName)
 
void configure (base::OCLOperationConfiguration &configuration, bool useConfiguration=false)
 
void configureDevice (cl_device_id deviceId, json::Node &devicesNode, std::vector< cl_device_id > &filteredDeviceIds, std::vector< std::string > &filteredDeviceNames, std::map< std::string, size_t > &countLimitMap, bool useConfiguration)
 
void configurePlatform (cl_platform_id platformId, base::OCLOperationConfiguration &configuration, bool useConfiguration)
 
std::shared_ptr< base::OCLOperationConfigurationgetConfiguration ()
 
std::vector< std::shared_ptr< OCLDevice > > & getDevices ()
 
 OCLManagerMultiPlatform (bool verbose=false)
 
 OCLManagerMultiPlatform (std::shared_ptr< base::OCLOperationConfiguration > parameters)
 
 ~OCLManagerMultiPlatform ()
 

Public Attributes

std::vector< std::shared_ptr< OCLDevice > > devices
 
cl_uint overallDeviceCount
 
std::shared_ptr< base::OCLOperationConfigurationparameters
 
std::vector< OCLPlatformWrapperplatforms
 
bool verbose
 

Constructor & Destructor Documentation

sgpp::base::OCLManagerMultiPlatform::OCLManagerMultiPlatform ( bool  verbose = false)
explicit
sgpp::base::OCLManagerMultiPlatform::OCLManagerMultiPlatform ( std::shared_ptr< base::OCLOperationConfiguration parameters)
explicit
sgpp::base::OCLManagerMultiPlatform::~OCLManagerMultiPlatform ( )

Member Function Documentation

void sgpp::base::OCLManagerMultiPlatform::buildKernel ( const std::string &  program_src,
const std::string &  kernel_name,
std::map< cl_platform_id, std::vector< cl_kernel >> &  kernels 
)

buildKernel builds the program that is represented by program_src and creates num_devices kernel objects that are stored into the map kernels

Parameters
program_srcthe source of the program to compile
kernel_namename of the kernel function (in program_src) to create the kernel for
kernelsthe resulting kernels are put into this map, one for each platform
Returns

References python.statsfileInfo::i, platforms, and verbose.

cl_kernel sgpp::base::OCLManagerMultiPlatform::buildKernel ( const std::string &  source,
std::shared_ptr< OCLDevice device,
json::Node kernelConfiguration,
const std::string &  kernelName 
)
void sgpp::base::OCLManagerMultiPlatform::configure ( base::OCLOperationConfiguration configuration,
bool  useConfiguration = false 
)
void sgpp::base::OCLManagerMultiPlatform::configureDevice ( cl_device_id  deviceId,
json::Node devicesNode,
std::vector< cl_device_id > &  filteredDeviceIds,
std::vector< std::string > &  filteredDeviceNames,
std::map< std::string, size_t > &  countLimitMap,
bool  useConfiguration 
)
std::shared_ptr< base::OCLOperationConfiguration > sgpp::base::OCLManagerMultiPlatform::getConfiguration ( )

References parameters.

Referenced by main().

std::vector< std::shared_ptr< OCLDevice > > & sgpp::base::OCLManagerMultiPlatform::getDevices ( )

References devices.

Member Data Documentation

std::vector<std::shared_ptr<OCLDevice> > sgpp::base::OCLManagerMultiPlatform::devices

Referenced by configurePlatform(), and getDevices().

cl_uint sgpp::base::OCLManagerMultiPlatform::overallDeviceCount
std::shared_ptr<base::OCLOperationConfiguration> sgpp::base::OCLManagerMultiPlatform::parameters
std::vector<OCLPlatformWrapper> sgpp::base::OCLManagerMultiPlatform::platforms

Referenced by buildKernel(), and configurePlatform().


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