@@ -56,7 +56,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
5656
5757
5858// / --> Coreneuron
59- int corenrn_embedded;
59+ bool corenrn_embedded;
6060int corenrn_embedded_nthread;
6161
6262void (*nrn2core_group_ids_)(int *);
@@ -291,14 +291,14 @@ static void store_phase_args(int ngroup,
291291 FileHandler* file_reader,
292292 const char * path,
293293 const char * restore_path,
294- int byte_swap) {
294+ bool byte_swap) {
295295 ngroup_w = ngroup;
296296 gidgroups_w = gidgroups;
297297 imult_w = imult;
298298 file_reader_w = file_reader;
299299 path_w = path;
300300 restore_path_w = restore_path;
301- byte_swap_w = ( bool ) byte_swap;
301+ byte_swap_w = byte_swap;
302302}
303303
304304/* read files.dat file and distribute cellgroups to all mpi ranks */
@@ -333,7 +333,7 @@ void nrn_read_filesdat(int& ngrp, int*& grp, int multiple, int*& imult, const ch
333333 // being backward compatible
334334 if (iNumFiles == -1 ) {
335335 nrn_assert (fscanf (fp, " %d\n " , &iNumFiles) == 1 );
336- nrn_have_gaps = 1 ;
336+ nrn_have_gaps = true ;
337337 if (nrnmpi_myid == 0 ) {
338338 printf (" Model uses gap junctions\n " );
339339 }
@@ -672,7 +672,7 @@ void nrn_setup_cleanup() {
672672
673673void nrn_setup (const char * filesdat,
674674 bool is_mapping_needed,
675- int byte_swap,
675+ bool byte_swap,
676676 bool run_setup_cleanup,
677677 const char * datpath,
678678 const char * restore_path,
@@ -1189,7 +1189,7 @@ void delete_trajectory_requests(NrnThread& nt) {
11891189}
11901190
11911191void read_phase2 (FileHandler& F, int imult, NrnThread& nt) {
1192- bool direct = corenrn_embedded ? true : false ;
1192+ bool direct = corenrn_embedded;
11931193 if (!direct) {
11941194 assert (!F.fail ()); // actually should assert that it is open
11951195 }
@@ -1497,7 +1497,7 @@ void read_phase2(FileHandler& F, int imult, NrnThread& nt) {
14971497 }
14981498 }
14991499
1500- if (nrn_have_gaps == 1 ) {
1500+ if (nrn_have_gaps) {
15011501 nrn_partrans::gap_thread_setup (nt);
15021502 }
15031503
@@ -1581,7 +1581,7 @@ void read_phase2(FileHandler& F, int imult, NrnThread& nt) {
15811581 vectors will be read and will need to be permuted as well in subsequent
15821582 sections of this function.
15831583 */
1584- if (use_interleave_permute ) {
1584+ if (interleave_permute_type ) {
15851585 nt._permute = interleave_order (nt.id , nt.ncell , nt.end , nt._v_parent_index );
15861586 }
15871587 if (nt._permute ) {
@@ -1628,7 +1628,7 @@ for (int i=0; i < nt.end; ++i) {
16281628 }
16291629 }
16301630
1631- if (nrn_have_gaps == 1 && use_interleave_permute ) {
1631+ if (nrn_have_gaps && interleave_permute_type ) {
16321632 nrn_partrans::gap_indices_permute (nt);
16331633 }
16341634
0 commit comments