Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 7eb49bf

Browse files
nrnran123.h : change which to char to match neuron signature (#509)
1 parent b18835b commit 7eb49bf

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

coreneuron/mechanism/mech/modfile/netstim.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static void bbcore_write(double* x, int* d, int* xx, int *offset, _threadargspro
216216
assert(0);
217217
}
218218
if (d) {
219-
unsigned char which;
219+
char which;
220220
uint32_t* di = ((uint32_t*)d) + *offset;
221221
#if !NRNBBCORE
222222
if (_ran_compat == 1) {

coreneuron/utils/randoms/nrnran123.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ void nrnran123_deletestream(nrnran123_State* s) {
7272
free(s);
7373
}
7474

75-
void nrnran123_getseq(nrnran123_State* s, uint32_t* seq, unsigned char* which) {
75+
void nrnran123_getseq(nrnran123_State* s, uint32_t* seq, char* which) {
7676
*seq = s->c.v[0];
7777
*which = s->which_;
7878
}
7979

80-
void nrnran123_setseq(nrnran123_State* s, uint32_t seq, unsigned char which) {
80+
void nrnran123_setseq(nrnran123_State* s, uint32_t seq, char which) {
8181
if (which > 3) {
8282
s->which_ = 0;
8383
} else {
@@ -100,7 +100,7 @@ void nrnran123_getids3(nrnran123_State* s, uint32_t* id1, uint32_t* id2, uint32_
100100

101101
uint32_t nrnran123_ipick(nrnran123_State* s) {
102102
uint32_t rval;
103-
unsigned char which = s->which_;
103+
char which = s->which_;
104104
assert(which < 4);
105105
rval = s->r.v[which++];
106106
if (which > 3) {

coreneuron/utils/randoms/nrnran123.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ __global__ void nrnran123_cuda_deletestream(nrnran123_State* s) {
4848
atomicSub(&instance_count_, 1);
4949
}
5050

51-
__device__ void nrnran123_getseq(nrnran123_State* s, uint32_t* seq, unsigned char* which) {
51+
__device__ void nrnran123_getseq(nrnran123_State* s, uint32_t* seq, char* which) {
5252
*seq = s->c.v[0];
5353
*which = s->which_;
5454
}
5555

56-
__device__ void nrnran123_setseq(nrnran123_State* s, uint32_t seq, unsigned char which) {
56+
__device__ void nrnran123_setseq(nrnran123_State* s, uint32_t seq, char which) {
5757
if (which > 3) {
5858
s->which_ = 0;
5959
} else {
@@ -76,7 +76,7 @@ __device__ void nrnran123_getids3(nrnran123_State* s, uint32_t* id1, uint32_t* i
7676

7777
__device__ uint32_t nrnran123_ipick(nrnran123_State* s) {
7878
uint32_t rval;
79-
unsigned char which = s->which_;
79+
char which = s->which_;
8080
rval = s->r.v[which++];
8181
if (which > 3) {
8282
which = 0;

coreneuron/utils/randoms/nrnran123.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ extern GLOBAL void nrnran123_setup_newstream3(nrnran123_State* s,
108108
uint32_t id3);
109109

110110
/* minimal data stream */
111-
extern DEVICE void nrnran123_getseq(nrnran123_State*, uint32_t* seq, unsigned char* which);
111+
extern DEVICE void nrnran123_getseq(nrnran123_State*, uint32_t* seq, char* which);
112112
extern DEVICE void nrnran123_getids(nrnran123_State*, uint32_t* id1, uint32_t* id2);
113113
extern DEVICE void nrnran123_getids3(nrnran123_State*, uint32_t* id1, uint32_t* id2, uint32_t* id3);
114114
extern DEVICE uint32_t nrnran123_ipick(nrnran123_State*); /* uniform 0 to 2^32-1 */
@@ -124,7 +124,7 @@ extern DEVICE double nrnran123_dblpick(nrnran123_State*); /* uniform open interv
124124
#if !defined(DISABLE_OPENACC)
125125
#pragma acc routine seq
126126
#endif
127-
extern DEVICE void nrnran123_setseq(nrnran123_State*, uint32_t seq, unsigned char which);
127+
extern DEVICE void nrnran123_setseq(nrnran123_State*, uint32_t seq, char which);
128128

129129
#if !defined(DISABLE_OPENACC)
130130
#pragma acc routine seq

0 commit comments

Comments
 (0)