LAMA
|
This singleton class provides the one and only-one manager that provides access to a Default Host Context. More...
#include <DefaultHostContextManager.hpp>
Public Member Functions | |
virtual ContextPtr | getContext (int deviceNr) |
This routine must be implemented by each context manager individually. | |
~DefaultHostContextManager () | |
Static Public Member Functions | |
static void | setAsCurrent () |
This method sets the DefaultHostContextManager as manager for Context::Host. | |
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 | |
DefaultHostContextManager () | |
Static Private Attributes | |
static boost::weak_ptr< class DefaultHostContext > | contextInstance |
static DefaultHostContextManager | theInstance |
This singleton class provides the one and only-one manager that provides access to a Default Host Context.
The DefaultHostManager will add itself to the ContextFactory so that HostContext pointers can be obtained by the Context factory.
References lama::ContextManager::registerFactory().
ContextPtr lama::DefaultHostContextManager::getContext | ( | int | deviceNr | ) | [virtual] |
This routine must be implemented by each context manager individually.
Implements lama::ContextManager.
References contextInstance, and LAMA_DEFAULT_DEVICE_NUMBER.
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 lama::CUDAContextManager::CUDAContextManager(), DefaultHostContextManager(), lama::PGASContextManager::PGASContextManager(), lama::PGASContextManager::setAsCurrent(), and lama::CUDAHostContextManager::setAsCurrent().
void lama::DefaultHostContextManager::setAsCurrent | ( | ) | [static] |
This method sets the DefaultHostContextManager as manager for Context::Host.
Due to singleton, it is a static routine.
boost::weak_ptr< DefaultHostContext > lama::DefaultHostContextManager::contextInstance [static, private] |
Referenced by getContext().
DefaultHostContextManager lama::DefaultHostContextManager::theInstance [static, private] |