LAMA
lama::CUDAHostContextManager Class Reference

This singleton class provides the one and only-one manager that provides access to a Host Context. More...

#include <CUDAHostContextManager.hpp>

Inheritance diagram for lama::CUDAHostContextManager:

Public Member Functions

virtual ContextPtr getContext (int contextNr)
 This routine must be implemented by each context manager individually.
 ~CUDAHostContextManager ()

Static Public Member Functions

static void setAsCurrent (ContextPtr cudaContext)
 Configure the CUDAHostManager to be the current one.

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

 CUDAHostContextManager ()

Static Private Attributes

static boost::weak_ptr< const
class CUDAHostContext
contextInstance
static int cudaDeviceNr = LAMA_DEFAULT_DEVICE_NUMBER
static CUDAHostContextManager theInstance

Detailed Description

This singleton class provides the one and only-one manager that provides access to a Host Context.

The HostManager will add itself to the ContextFactory so that CUDAHostContext pointers can be obtained by the Context factory.


Constructor & Destructor Documentation


Member Function Documentation

This routine must be implemented by each context manager individually.

Implements lama::ContextManager.

References contextInstance, lama::Context::CUDA, cudaDeviceNr, and LAMA_DEFAULT_DEVICE_NUMBER.

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

Configure the CUDAHostManager to be the current one.

Host context will now allocate data to allow faster transfer

References lama::Context::CUDA, cudaDeviceNr, lama::CUDAContext::getDeviceNr(), LAMA_THROWEXCEPTION, lama::ContextManager::registerFactory(), and theInstance.

Referenced by lama::LUSolver::computeLUFactorization().


Field Documentation

boost::weak_ptr< const CUDAHostContext > lama::CUDAHostContextManager::contextInstance [static, private]

Referenced by getContext().


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