Skip to content

Commit 6483565

Browse files
authored
Merge pull request #3707 from JanVogelsang/master-sort-fix
Fix issue with sorting when simulating more than 2 billion neurons
2 parents 5dcaa2f + 278997e commit 6483565

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

libnestutil/iterator_pair.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ struct rightshift_iterator_pair
170170
}
171171

172172
template < typename T >
173-
inline int
173+
inline size_t
174174
operator()( boost::tuples::tuple< nest::Source&, T& > s, unsigned offset )
175175
{
176176
return boost::get< 0 >( s ).get_node_id() >> offset;

nestkernel/source.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ namespace nest
4040
class Source
4141
{
4242
private:
43-
uint64_t node_id_ : NUM_BITS_NODE_ID; //!< node ID of source
44-
bool processed_ : 1; //!< whether this target has already been moved
45-
//!< to the MPI buffer
46-
bool primary_ : 1; //!< source of primary connection
47-
bool disabled_ : 1; //!< connection has been disabled
43+
size_t node_id_ : NUM_BITS_NODE_ID; //!< node ID of source
44+
bool processed_ : 1; //!< whether this target has already been moved
45+
//!< to the MPI buffer
46+
bool primary_ : 1; //!< source of primary connection
47+
bool disabled_ : 1; //!< connection has been disabled
4848

4949
public:
5050
Source();
51-
explicit Source( const uint64_t node_id, const bool primary );
51+
explicit Source( const size_t node_id, const bool primary );
5252

5353
/**
5454
* Returns this Source's node ID.
5555
*/
56-
uint64_t get_node_id() const;
56+
size_t get_node_id() const;
5757

5858
void set_processed( const bool processed );
5959
bool is_processed() const;
@@ -91,7 +91,7 @@ inline Source::Source()
9191
{
9292
}
9393

94-
inline Source::Source( const uint64_t node_id, const bool is_primary )
94+
inline Source::Source( const size_t node_id, const bool is_primary )
9595
: node_id_( node_id )
9696
, processed_( false )
9797
, primary_( is_primary )
@@ -100,7 +100,7 @@ inline Source::Source( const uint64_t node_id, const bool is_primary )
100100
assert( node_id <= MAX_NODE_ID );
101101
}
102102

103-
inline uint64_t
103+
inline size_t
104104
Source::get_node_id() const
105105
{
106106
return node_id_;

0 commit comments

Comments
 (0)