CLUtils  0.2.1
 Hosted by GitHub
Public Member Functions | Public Attributes | List of all members
clutils::CLEnvInfo< nQueues > Class Template Reference

Facilitates the conveyance of CLEnv arguments. More...

#include <CLUtils.hpp>

Public Member Functions

 CLEnvInfo (unsigned int _pIdx=0, unsigned int _dIdx=0, unsigned int _ctxIdx=0, const std::vector< unsigned int > _qIdx={0}, unsigned int _pgIdx=0)
 Initializes a CLEnvInfo object. More...
 
CLEnvInfo< 1 > getCLEnvInfo (unsigned int idx)
 Creates a new CLEnvInfo object with the specified command queue. More...
 

Public Attributes

unsigned int pIdx
 
unsigned int dIdx
 
unsigned int ctxIdx
 
std::vector< unsigned int > qIdx
 
unsigned int pgIdx
 

Detailed Description

template<unsigned int nQueues = 1>
class clutils::CLEnvInfo< nQueues >

Facilitates the conveyance of CLEnv arguments.

CLEnv creates an OpenCL environment. A CLEnv object potentially contains many platforms, contexts, queues, etc, that are to be used by different (independent) subsystems. Those subsystems will have to know where to look inside CLEnv for their associated CL objects. CLEnvInfo organizes this process of information transfer between OpenCL systems.

Template Parameters
nQueuesthe number of command queue indices to be held by CLEnvInfo.

Constructor & Destructor Documentation

template<unsigned int nQueues = 1>
clutils::CLEnvInfo< nQueues >::CLEnvInfo ( unsigned int  _pIdx = 0,
unsigned int  _dIdx = 0,
unsigned int  _ctxIdx = 0,
const std::vector< unsigned int >  _qIdx = { 0 },
unsigned int  _pgIdx = 0 
)
inline

Initializes a CLEnvInfo object.

All provided indices are supposed to follow the order the associated objects were created in the associated CLEnv instance.

Parameters
[in]_pIdxplatform index.
[in]_dIdxdevice index.
[in]_ctxIdxcontext index.
[in]_qIdxvector with command queue indices.
[in]_pgIdxprogram index.

Member Function Documentation

template<unsigned int nQueues = 1>
CLEnvInfo<1> clutils::CLEnvInfo< nQueues >::getCLEnvInfo ( unsigned int  idx)
inline

Creates a new CLEnvInfo object with the specified command queue.

Maintains the same OpenCL configuration, but chooses only one of the available command queues to include.

Parameters
[in]idxan index for the qIdx vector.

Member Data Documentation

template<unsigned int nQueues = 1>
unsigned int clutils::CLEnvInfo< nQueues >::ctxIdx

Context index.

template<unsigned int nQueues = 1>
unsigned int clutils::CLEnvInfo< nQueues >::dIdx

Device index.

template<unsigned int nQueues = 1>
unsigned int clutils::CLEnvInfo< nQueues >::pgIdx

Program index.

template<unsigned int nQueues = 1>
unsigned int clutils::CLEnvInfo< nQueues >::pIdx

Platform index.

template<unsigned int nQueues = 1>
std::vector<unsigned int> clutils::CLEnvInfo< nQueues >::qIdx

Vector of queue indices.


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