GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
varAccess.h File Reference

Go to the source code of this file.

Enumerations

enum  VarAccessModeAttribute : unsigned int {
  VarAccessModeAttribute::READ_ONLY = (1 << 0), VarAccessModeAttribute::READ_WRITE = (1 << 1), VarAccessModeAttribute::REDUCE = (1 << 2), VarAccessModeAttribute::SUM = (1 << 3),
  VarAccessModeAttribute::MAX = (1 << 4)
}
 
enum  VarAccessMode : unsigned int { VarAccessMode::READ_WRITE = static_cast<unsigned int>(VarAccessModeAttribute::READ_WRITE), VarAccessMode::READ_ONLY = static_cast<unsigned int>(VarAccessModeAttribute::READ_ONLY), VarAccessMode::REDUCE_SUM = static_cast<unsigned int>(VarAccessModeAttribute::REDUCE) | static_cast<unsigned int>(VarAccessModeAttribute::SUM), VarAccessMode::REDUCE_MAX = static_cast<unsigned int>(VarAccessModeAttribute::REDUCE) | static_cast<unsigned int>(VarAccessModeAttribute::MAX) }
 Supported combination of VarAccessModeAttribute. More...
 
enum  VarAccessDuplication : unsigned int { VarAccessDuplication::DUPLICATE = (1 << 5), VarAccessDuplication::SHARED = (1 << 6), VarAccessDuplication::SHARED_NEURON = (1 << 7) }
 Flags defining how variables should be duplicated across multiple batches. More...
 
enum  VarAccess : unsigned int {
  VarAccess::READ_WRITE = static_cast<unsigned int>(VarAccessMode::READ_WRITE) | static_cast<unsigned int>(VarAccessDuplication::DUPLICATE), VarAccess::READ_ONLY = static_cast<unsigned int>(VarAccessMode::READ_ONLY) | static_cast<unsigned int>(VarAccessDuplication::SHARED), VarAccess::READ_ONLY_SHARED_NEURON = static_cast<unsigned int>(VarAccessMode::READ_ONLY) | static_cast<unsigned int>(VarAccessDuplication::SHARED_NEURON), VarAccess::READ_ONLY_DUPLICATE = static_cast<unsigned int>(VarAccessMode::READ_ONLY) | static_cast<unsigned int>(VarAccessDuplication::DUPLICATE),
  VarAccess::REDUCE_BATCH_SUM = static_cast<unsigned int>(VarAccessMode::REDUCE_SUM) | static_cast<unsigned int>(VarAccessDuplication::SHARED), VarAccess::REDUCE_BATCH_MAX = static_cast<unsigned int>(VarAccessMode::REDUCE_MAX) | static_cast<unsigned int>(VarAccessDuplication::SHARED), VarAccess::REDUCE_NEURON_SUM = static_cast<unsigned int>(VarAccessMode::REDUCE_SUM) | static_cast<unsigned int>(VarAccessDuplication::SHARED_NEURON), VarAccess::REDUCE_NEURON_MAX = static_cast<unsigned int>(VarAccessMode::REDUCE_MAX) | static_cast<unsigned int>(VarAccessDuplication::SHARED_NEURON)
}
 Supported combinations of VarAccessMode and VarAccessDuplication. More...
 

Functions

bool operator& (VarAccess type, VarAccessMode mode)
 
bool operator& (VarAccess type, VarAccessDuplication duplication)
 
bool operator& (VarAccess type, VarAccessModeAttribute modeAttribute)
 
bool operator& (VarAccessMode mode, VarAccessModeAttribute modeAttribute)
 
VarAccessMode getVarAccessMode (VarAccess type)
 
VarAccessDuplication getVarAccessDuplication (VarAccess type)
 

Enumeration Type Documentation

◆ VarAccess

enum VarAccess : unsigned int
strong

Supported combinations of VarAccessMode and VarAccessDuplication.

Enumerator
READ_WRITE 
READ_ONLY 
READ_ONLY_SHARED_NEURON 
READ_ONLY_DUPLICATE 
REDUCE_BATCH_SUM 
REDUCE_BATCH_MAX 
REDUCE_NEURON_SUM 
REDUCE_NEURON_MAX 

◆ VarAccessDuplication

enum VarAccessDuplication : unsigned int
strong

Flags defining how variables should be duplicated across multiple batches.

Enumerator
DUPLICATE 
SHARED 

This variable should be duplicated in each batch.

SHARED_NEURON 

This variable should be shared between batches.

◆ VarAccessMode

enum VarAccessMode : unsigned int
strong

Supported combination of VarAccessModeAttribute.

Enumerator
READ_WRITE 
READ_ONLY 
REDUCE_SUM 
REDUCE_MAX 

◆ VarAccessModeAttribute

enum VarAccessModeAttribute : unsigned int
strong

Flags defining attributes of var access models NOTE Read-only and read-write are seperate flags rather than read and write so you can test mode & VarAccessMode::READ_ONLY

Enumerator
READ_ONLY 
READ_WRITE 

This variable is read only.

REDUCE 

This variable is read-write.

SUM 

This variable is a reduction target.

MAX 

This variable's reduction operation is a summation.

Function Documentation

◆ getVarAccessDuplication()

VarAccessDuplication getVarAccessDuplication ( VarAccess  type)
inline

◆ getVarAccessMode()

VarAccessMode getVarAccessMode ( VarAccess  type)
inline

◆ operator&() [1/4]

bool operator & ( VarAccess  type,
VarAccessMode  mode 
)
inline

◆ operator&() [2/4]

bool operator & ( VarAccess  type,
VarAccessDuplication  duplication 
)
inline

◆ operator&() [3/4]

bool operator & ( VarAccess  type,
VarAccessModeAttribute  modeAttribute 
)
inline

◆ operator&() [4/4]

bool operator & ( VarAccessMode  mode,
VarAccessModeAttribute  modeAttribute 
)
inline