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

◆ OCLManagerMultiPlatform() [1/2]

sgpp::base::OCLManagerMultiPlatform::OCLManagerMultiPlatform ( bool  verbose = false)
explicit

◆ OCLManagerMultiPlatform() [2/2]

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

◆ ~OCLManagerMultiPlatform()

sgpp::base::OCLManagerMultiPlatform::~OCLManagerMultiPlatform ( )

Member Function Documentation

◆ buildKernel() [1/2]

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.

◆ buildKernel() [2/2]

cl_kernel sgpp::base::OCLManagerMultiPlatform::buildKernel ( const std::string &  source,
std::shared_ptr< OCLDevice device,
json::Node kernelConfiguration,
const std::string &  kernelName 
)

◆ configure()

void sgpp::base::OCLManagerMultiPlatform::configure ( base::OCLOperationConfiguration configuration,
bool  useConfiguration = false 
)

◆ configureDevice()

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 
)

◆ configurePlatform()

◆ getConfiguration()

std::shared_ptr< base::OCLOperationConfiguration > sgpp::base::OCLManagerMultiPlatform::getConfiguration ( )

References parameters.

Referenced by main().

◆ getDevices()

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

References devices.

Member Data Documentation

◆ devices

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

Referenced by configurePlatform(), and getDevices().

◆ overallDeviceCount

cl_uint sgpp::base::OCLManagerMultiPlatform::overallDeviceCount

◆ parameters

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

◆ platforms

std::vector<OCLPlatformWrapper> sgpp::base::OCLManagerMultiPlatform::platforms

Referenced by buildKernel(), and configurePlatform().

◆ verbose


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