NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::Target Class Reference

check legal size More...

#include <target.h>

Inheritance diagram for nest::Target:
[legend]

Public Member Functions

 Target ()
 
 Target (const Target &target)
 
 Target (const size_t tid, const size_t rank, const synindex syn_id, const size_t lcid)
 
Target & operator= (const Target &)
 
void set_lcid (const size_t lcid)
 Set local connection id.
 
size_t get_lcid () const
 Return local connection id.
 
void set_rank (const size_t rank)
 Set rank.
 
size_t get_rank () const
 Return rank.
 
void set_tid (const size_t tid)
 Set thread id.
 
size_t get_tid () const
 Return thread id.
 
void set_syn_id (const synindex syn_id)
 Set the synapse-type id.
 
synindex get_syn_id () const
 Return synapse-type id.
 
void set_status (enum_status_target_id status)
 Set the status of the target identifier: processed or unprocessed.
 
enum_status_target_id get_status () const
 Get the status of the target identifier: processed or unprocessed.
 
bool is_processed () const
 Return the status od the target identifier: processed or unprocessed.
 
double get_offset () const
 Return offset.
 
void mark_for_removal ()
 Set the status of the target identifier to processed.
 

Private Types

using bits_for_processed_flag = StaticAssert< NUM_BITS_PROCESSED_FLAG==1U >::success
 
using position_of_processed_flag = StaticAssert< BITPOS_PROCESSED_FLAG==63U >::success
 

Private Attributes

uint64_t remote_target_id_
 

Static Private Attributes

static constexpr uint8_t BITPOS_LCID = 0U
 
static constexpr uint8_t BITPOS_RANK = NUM_BITS_LCID
 
static constexpr uint8_t BITPOS_TID = BITPOS_RANK + NUM_BITS_RANK
 
static constexpr uint8_t BITPOS_SYN_ID = BITPOS_TID + NUM_BITS_TID
 
static constexpr uint8_t BITPOS_PROCESSED_FLAG = BITPOS_SYN_ID + NUM_BITS_SYN_ID
 
static constexpr uint64_t MASK_LCID = generate_bit_mask( NUM_BITS_LCID, BITPOS_LCID )
 
static constexpr uint64_t MASK_RANK = generate_bit_mask( NUM_BITS_RANK, BITPOS_RANK )
 
static constexpr uint64_t MASK_TID = generate_bit_mask( NUM_BITS_TID, BITPOS_TID )
 
static constexpr uint64_t MASK_SYN_ID = generate_bit_mask( NUM_BITS_SYN_ID, BITPOS_SYN_ID )
 
static constexpr uint64_t MASK_PROCESSED_FLAG = generate_bit_mask( NUM_BITS_PROCESSED_FLAG, BITPOS_PROCESSED_FLAG )
 

Detailed Description

check legal size

Member Typedef Documentation

◆ bits_for_processed_flag

◆ position_of_processed_flag

Constructor & Destructor Documentation

◆ Target() [1/3]

nest::Target::Target ( )
inline

◆ Target() [2/3]

nest::Target::Target ( const Target &  target)
inline

References set_status(), and nest::TARGET_ID_UNPROCESSED.

Here is the call graph for this function:

◆ Target() [3/3]

nest::Target::Target ( const size_t  tid,
const size_t  rank,
const synindex  syn_id,
const size_t  lcid 
)
inline

References set_lcid(), set_rank(), set_status(), set_syn_id(), set_tid(), and nest::TARGET_ID_UNPROCESSED.

Here is the call graph for this function:

Member Function Documentation

◆ get_lcid()

size_t nest::Target::get_lcid ( ) const
inline

Return local connection id.

References BITPOS_LCID, MASK_LCID, and remote_target_id_.

◆ get_offset()

double nest::Target::get_offset ( ) const
inline

Return offset.

◆ get_rank()

size_t nest::Target::get_rank ( ) const
inline

Return rank.

References BITPOS_RANK, MASK_RANK, and remote_target_id_.

◆ get_status()

enum_status_target_id nest::Target::get_status ( ) const
inline

Get the status of the target identifier: processed or unprocessed.

References BITPOS_PROCESSED_FLAG, MASK_PROCESSED_FLAG, remote_target_id_, nest::TARGET_ID_PROCESSED, and nest::TARGET_ID_UNPROCESSED.

Referenced by is_processed().

Here is the caller graph for this function:

◆ get_syn_id()

synindex nest::Target::get_syn_id ( ) const
inline

Return synapse-type id.

References BITPOS_SYN_ID, MASK_SYN_ID, and remote_target_id_.

◆ get_tid()

size_t nest::Target::get_tid ( ) const
inline

Return thread id.

References BITPOS_TID, MASK_TID, and remote_target_id_.

◆ is_processed()

bool nest::Target::is_processed ( ) const
inline

Return the status od the target identifier: processed or unprocessed.

References get_status(), and nest::TARGET_ID_PROCESSED.

Here is the call graph for this function:

◆ mark_for_removal()

void nest::Target::mark_for_removal ( )
inline

Set the status of the target identifier to processed.

References set_status(), and nest::TARGET_ID_PROCESSED.

Here is the call graph for this function:

◆ operator=()

Target & nest::Target::operator= ( const Target &  other)
inline

References remote_target_id_, set_status(), and nest::TARGET_ID_UNPROCESSED.

Here is the call graph for this function:

◆ set_lcid()

void nest::Target::set_lcid ( const size_t  lcid)
inline

Set local connection id.

References BITPOS_LCID, nest::MAX_LCID, and remote_target_id_.

Referenced by Target().

Here is the caller graph for this function:

◆ set_rank()

void nest::Target::set_rank ( const size_t  rank)
inline

Set rank.

References BITPOS_RANK, nest::MAX_RANK, and remote_target_id_.

Referenced by Target().

Here is the caller graph for this function:

◆ set_status()

void nest::Target::set_status ( enum_status_target_id  status)
inline

Set the status of the target identifier: processed or unprocessed.

References MASK_PROCESSED_FLAG, remote_target_id_, nest::TARGET_ID_PROCESSED, and nest::TARGET_ID_UNPROCESSED.

Referenced by mark_for_removal(), operator=(), Target(), and Target().

Here is the caller graph for this function:

◆ set_syn_id()

void nest::Target::set_syn_id ( const synindex  syn_id)
inline

Set the synapse-type id.

References BITPOS_SYN_ID, nest::MAX_SYN_ID, and remote_target_id_.

Referenced by Target().

Here is the caller graph for this function:

◆ set_tid()

void nest::Target::set_tid ( const size_t  tid)
inline

Set thread id.

References BITPOS_TID, nest::MAX_TID, and remote_target_id_.

Referenced by Target().

Here is the caller graph for this function:

Member Data Documentation

◆ BITPOS_LCID

constexpr uint8_t nest::Target::BITPOS_LCID = 0U
staticconstexprprivate

Referenced by get_lcid(), and set_lcid().

◆ BITPOS_PROCESSED_FLAG

constexpr uint8_t nest::Target::BITPOS_PROCESSED_FLAG = BITPOS_SYN_ID + NUM_BITS_SYN_ID
staticconstexprprivate

Referenced by get_status().

◆ BITPOS_RANK

constexpr uint8_t nest::Target::BITPOS_RANK = NUM_BITS_LCID
staticconstexprprivate

Referenced by get_rank(), and set_rank().

◆ BITPOS_SYN_ID

constexpr uint8_t nest::Target::BITPOS_SYN_ID = BITPOS_TID + NUM_BITS_TID
staticconstexprprivate

Referenced by get_syn_id(), and set_syn_id().

◆ BITPOS_TID

constexpr uint8_t nest::Target::BITPOS_TID = BITPOS_RANK + NUM_BITS_RANK
staticconstexprprivate

Referenced by get_tid(), and set_tid().

◆ MASK_LCID

constexpr uint64_t nest::Target::MASK_LCID = generate_bit_mask( NUM_BITS_LCID, BITPOS_LCID )
staticconstexprprivate

Referenced by get_lcid().

◆ MASK_PROCESSED_FLAG

constexpr uint64_t nest::Target::MASK_PROCESSED_FLAG = generate_bit_mask( NUM_BITS_PROCESSED_FLAG, BITPOS_PROCESSED_FLAG )
staticconstexprprivate

Referenced by get_status(), and set_status().

◆ MASK_RANK

constexpr uint64_t nest::Target::MASK_RANK = generate_bit_mask( NUM_BITS_RANK, BITPOS_RANK )
staticconstexprprivate

Referenced by get_rank().

◆ MASK_SYN_ID

constexpr uint64_t nest::Target::MASK_SYN_ID = generate_bit_mask( NUM_BITS_SYN_ID, BITPOS_SYN_ID )
staticconstexprprivate

Referenced by get_syn_id().

◆ MASK_TID

constexpr uint64_t nest::Target::MASK_TID = generate_bit_mask( NUM_BITS_TID, BITPOS_TID )
staticconstexprprivate

Referenced by get_tid().

◆ remote_target_id_

uint64_t nest::Target::remote_target_id_
private

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