Skip to content

Commit

Permalink
Added docstring for sizes of newly introduces bitfields
Browse files Browse the repository at this point in the history
  • Loading branch information
JanVogelsang committed Sep 11, 2024
1 parent bda2f0b commit e137c86
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libnestutil/nest_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,15 @@ constexpr uint8_t NUM_BITS_LCID = 27U;
constexpr uint8_t NUM_BITS_PROCESSED_FLAG = 1U;
constexpr uint8_t NUM_BITS_MARKER_SPIKE_DATA = 2U;
constexpr uint8_t NUM_BITS_LAG = 14U;
constexpr uint8_t NUM_BITS_DELAY = 21U;
constexpr uint8_t NUM_BITS_DENDRITIC_DELAY = NUM_BITS_DELAY;
constexpr uint8_t NUM_BITS_AXONAL_DELAY = 32U - NUM_BITS_DENDRITIC_DELAY;
constexpr uint8_t NUM_BITS_NODE_ID = 62U;

// These types are used in delay_types.h and denote the space available for the dendritic and axonal portions of the
// total transmission delay. The delay is only split into two parts for selected synapse types.
// Given that axonal delays can be much larger than dendritic/backpropagation delays, they require more bits.
constexpr uint8_t NUM_BITS_DENDRITIC_DELAY = 14U;
constexpr uint8_t NUM_BITS_AXONAL_DELAY = sizeof( unsigned int ) * 8 - NUM_BITS_DENDRITIC_DELAY;


// Maximally allowed values for bitfields

constexpr uint64_t MAX_LCID = generate_max_value( NUM_BITS_LCID );
Expand Down

0 comments on commit e137c86

Please sign in to comment.