LAMA
|
#include <CUDAContextManager.hpp>
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 |
References LAMA_MAX_CUDA_DEVICES, and mCUDAContext.
lama::CUDAContextManager::CUDAContextManager | ( | ) | [private] |
Make constructor private, only single static object will be created.
References LAMA_MAX_CUDA_DEVICES, mCUDAContext, and lama::ContextManager::registerFactory().
ContextPtr lama::CUDAContextManager::getContext | ( | int | deviceNr | ) | [inline, virtual] |
This routine must be implemented by each context manager individually.
Implements lama::ContextManager.
ContextPtr lama::CUDAContextManager::getInstance | ( | int | deviceNr | ) | [static] |
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] |
void lama::ContextManager::registerFactory | ( | ) | [protected, inherited] |
This method sets the context manager as responsible for its context type in the factory.
References lama::ContextFactory::addContextManager(), lama::ContextFactory::getFactory(), and lama::ContextManager::mContextType.
Referenced by CUDAContextManager(), lama::DefaultHostContextManager::DefaultHostContextManager(), lama::PGASContextManager::PGASContextManager(), lama::PGASContextManager::setAsCurrent(), and lama::CUDAHostContextManager::setAsCurrent().
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().
CUDAContextManager lama::CUDAContextManager::theInstance [static, private] |
singleton instance of this class