LAMA
lama::CUDAContextManager Class Reference

#include <CUDAContextManager.hpp>

Inheritance diagram for lama::CUDAContextManager:

Public Member Functions

ContextPtr getContext (int deviceNr)
 This routine must be implemented by each context manager individually.
 ~CUDAContextManager ()

Static Public Member Functions

static ContextPtr getInstance (int deviceNr)
 Static version of the member method getContext.

Protected Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)
void registerFactory ()
 This method sets the context manager as responsible for its context type in the factory.

Private Member Functions

 CUDAContextManager ()
 Make constructor private, only single static object will be created.

Static Private Attributes

static boost::weak_ptr
< CUDAContext
mCUDAContext [LAMA_MAX_CUDA_DEVICES]
 The manager keeps weak pointers to CUDA contexts so it can return a shared pointer if the contexts are still in use.
static CUDAContextManager theInstance
 singleton instance of this class

Constructor & Destructor Documentation

Make constructor private, only single static object will be created.

References LAMA_MAX_CUDA_DEVICES, mCUDAContext, and lama::ContextManager::registerFactory().


Member Function Documentation

ContextPtr lama::CUDAContextManager::getContext ( int  deviceNr) [inline, virtual]

This routine must be implemented by each context manager individually.

Implements lama::ContextManager.

Static version of the member method getContext.

References LAMA_ASSERT_ERROR, LAMA_CUDA_ENV_FOR_DEVICE, LAMA_DEFAULT_DEVICE_NUMBER, LAMA_MAX_CUDA_DEVICES, and mCUDAContext.

lama::ContextManager::LAMA_LOG_DECL_STATIC_LOGGER ( logger  ) [protected, inherited]

Field Documentation

boost::weak_ptr< CUDAContext > lama::CUDAContextManager::mCUDAContext [static, private]

The manager keeps weak pointers to CUDA contexts so it can return a shared pointer if the contexts are still in use.

Entry is available for each possible device.

Referenced by CUDAContextManager(), getInstance(), and ~CUDAContextManager().

singleton instance of this class


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