GPUMLib  0.2.2
GPU Machine Learning Library
Public Member Functions | List of all members
DeviceAccessibleVariable< Type > Class Template Reference

Represents a variable residing in memory that is page-locked and accessible to the device. More...

#include <DeviceAccessibleVariable.h>

Public Member Functions

 DeviceAccessibleVariable ()
 Constructor.
 
 DeviceAccessibleVariable (const Type initialValue)
 
 ~DeviceAccessibleVariable ()
 Destructor.
 
Type & Value ()
 
Type * Pointer ()
 
void UpdateValue (Type *deviceValue)
 
void UpdateValueAsync (Type *deviceValue, cudaStream_t stream)
 

Detailed Description

template<class Type>
class GPUMLib::DeviceAccessibleVariable< Type >

Represents a variable residing in memory that is page-locked and accessible to the device.

Definition at line 30 of file DeviceAccessibleVariable.h.

Constructor & Destructor Documentation

DeviceAccessibleVariable ( const Type  initialValue)
inline

Constructor

Parameters
initialValueInitial value

Definition at line 42 of file DeviceAccessibleVariable.h.

Member Function Documentation

Type* Pointer ( )
inline

Gets a pointer to the variable

Returns
a pointer to the variable

Definition at line 60 of file DeviceAccessibleVariable.h.

void UpdateValue ( Type *  deviceValue)
inline

Updates the variable value from a device memory variable

Parameters
deviceValuea pointer to the variable on the device

Definition at line 66 of file DeviceAccessibleVariable.h.

void UpdateValueAsync ( Type *  deviceValue,
cudaStream_t  stream 
)
inline

Asynchronously updates the variable value from a device memory variable

Parameters
deviceValuea pointer to the variable on the device
streamThe CUDA stream used to transfer the data

Definition at line 73 of file DeviceAccessibleVariable.h.

Type& Value ( )
inline

Gets a reference to the variable

Returns
a reference to the variable

Definition at line 54 of file DeviceAccessibleVariable.h.


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