@@ -169,7 +169,6 @@ void setup_nrnthreads_on_device(NrnThread* threads, int nthreads) {
169169
170170 /* update d_nt._data to point to device copy */
171171 cnrn_memcpy_to_device (&(d_nt->_data ), &d__data, sizeof (double *));
172- auto host_id = omp_get_initial_device ();
173172
174173 /* -- setup rhs, d, a, b, v, node_aread to point to device copy -- */
175174 double * dptr;
@@ -725,7 +724,7 @@ void update_net_send_buffer_on_host(NrnThread* nt, NetSendBuffer_t* nsb) {
725724 nsb->_weight_index [:nsb->_cnt ],
726725 nsb->_nsb_t [:nsb->_cnt ],
727726 nsb->_nsb_flag [:nsb->_cnt ])
728- if nsb->_cnt )
727+ if ( nsb->_cnt ) )
729728 nrn_pragma_omp (target update from (
730729 nsb->_sendtype [:nsb->_cnt ],
731730 nsb->_vdata_index [:nsb->_cnt ],
@@ -766,7 +765,7 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) {
766765 nt->_actual_v [:ne],
767766 nt->_actual_area [:ne]))
768767
769- nrn_pragma_acc (update self (nt->_actual_diam [:ne]) if nt->_actual_diam )
768+ nrn_pragma_acc (update self (nt->_actual_diam [:ne]) if ( nt->_actual_diam != nullptr ) )
770769 nrn_pragma_omp (target update from (nt->_actual_diam [:ne]) if (nt->_actual_diam != nullptr ))
771770
772771 /* @todo: nt._ml_list[tml->index] = tml->ml; */
@@ -775,8 +774,8 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) {
775774 for (auto tml = nt->tml ; tml; tml = tml->next ) {
776775 Memb_list* ml = tml->ml ;
777776
778- nrn_pragma_acc (update self (& tml->index ,
779- & ml->nodecount ))
777+ nrn_pragma_acc (update self (tml->index ,
778+ ml->nodecount ))
780779 nrn_pragma_omp (target update from (tml->index ,
781780 ml->nodecount ))
782781
@@ -801,22 +800,22 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) {
801800 ml->nodeindices [:n]))
802801
803802 int dpcnt = nrn_soa_padded_size (n, SOA_LAYOUT) * szdp;
804- nrn_pragma_acc (update self (ml->pdata [:dpcnt]) if szdp)
803+ nrn_pragma_acc (update self (ml->pdata [:dpcnt]) if ( szdp) )
805804 nrn_pragma_omp (target update from (ml->pdata [:dpcnt]) if (szdp))
806805
807806 auto nrb = tml->ml ->_net_receive_buffer ;
808807
809808 nrn_pragma_acc (update self (
810- & nrb->_cnt ,
811- & nrb->_size ,
812- & nrb->_pnt_offset ,
813- & nrb->_displ_cnt ,
809+ nrb->_cnt ,
810+ nrb->_size ,
811+ nrb->_pnt_offset ,
812+ nrb->_displ_cnt ,
814813
815814 nrb->_pnt_index [:nrb->_size ],
816815 nrb->_weight_index [:nrb->_size ],
817816 nrb->_displ [:nrb->_size + 1 ],
818817 nrb->_nrb_index [:nrb->_size ])
819- if nrb)
818+ if ( nrb != nullptr ) )
820819 nrn_pragma_omp (target update from (
821820 nrb->_cnt ,
822821 nrb->_size ,
@@ -835,28 +834,28 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) {
835834 /* copy shadow_d to host */
836835 nrn_pragma_acc (update self (nt->_shadow_rhs [:pcnt],
837836 nt->_shadow_d [:pcnt])
838- if nt->shadow_rhs_cnt )
837+ if ( nt->shadow_rhs_cnt ) )
839838 nrn_pragma_omp (target update from (nt->_shadow_rhs [:pcnt],
840839 nt->_shadow_d [:pcnt])
841840 if (nt->shadow_rhs_cnt ))
842841
843842 nrn_pragma_acc (update self (nt->nrn_fast_imem ->nrn_sav_rhs [:nt->end ],
844843 nt->nrn_fast_imem ->nrn_sav_d [:nt->end ])
845- if nt->nrn_fast_imem )
844+ if ( nt->nrn_fast_imem != nullptr ) )
846845 nrn_pragma_omp (target update from (nt->nrn_fast_imem ->nrn_sav_rhs [:nt->end ],
847846 nt->nrn_fast_imem ->nrn_sav_d [:nt->end ])
848847 if (nt->nrn_fast_imem != nullptr ))
849848
850- nrn_pragma_acc (update self (nt->pntprocs [:nt->n_pntproc ]) if nt->n_pntproc )
849+ nrn_pragma_acc (update self (nt->pntprocs [:nt->n_pntproc ]) if ( nt->n_pntproc ) )
851850 nrn_pragma_omp (target update from (nt->pntprocs [:nt->n_pntproc ]) if (nt->n_pntproc ))
852851
853- nrn_pragma_acc (update self (nt->weights [:nt->n_weight ]) if nt->n_weight )
852+ nrn_pragma_acc (update self (nt->weights [:nt->n_weight ]) if ( nt->n_weight ) )
854853 nrn_pragma_omp (target update from (nt->weights [:nt->n_weight ]) if (nt->n_weight ))
855854
856855 nrn_pragma_acc (update self (
857856 nt->presyns_helper [:nt->n_presyn ],
858857 nt->presyns [:nt->n_presyn ])
859- if nt->n_presyn )
858+ if ( nt->n_presyn ) )
860859 nrn_pragma_omp (target update from (
861860 nt->presyns_helper [:nt->n_presyn ],
862861 nt->presyns [:nt->n_presyn ])
@@ -914,7 +913,7 @@ void update_nrnthreads_on_device(NrnThread* threads, int nthreads) {
914913 nt->_actual_v [:ne],
915914 nt->_actual_area [:ne]))
916915
917- nrn_pragma_acc (update device (nt->_actual_diam [:ne]) if nt->_actual_diam )
916+ nrn_pragma_acc (update device (nt->_actual_diam [:ne]) if ( nt->_actual_diam != nullptr ) )
918917 nrn_pragma_omp (target update to (nt->_actual_diam [:ne]) if (nt->_actual_diam != nullptr ))
919918
920919 /* @todo: nt._ml_list[tml->index] = tml->ml; */
@@ -937,19 +936,19 @@ void update_nrnthreads_on_device(NrnThread* threads, int nthreads) {
937936 nrn_pragma_omp (target update to (ml->nodeindices [:n])
938937 if (!corenrn.get_is_artificial ()[type]))
939938 int dpcnt = nrn_soa_padded_size (n, SOA_LAYOUT) * szdp;
940- nrn_pragma_acc (update device (ml->pdata [:dpcnt]) if szdp)
939+ nrn_pragma_acc (update device (ml->pdata [:dpcnt]) if ( szdp) )
941940 nrn_pragma_omp (target update to (ml->pdata [:dpcnt]) if (szdp))
942941
943942 auto nrb = tml->ml ->_net_receive_buffer ;
944- nrn_pragma_acc (update device (& nrb->_cnt ,
945- & nrb->_size ,
946- & nrb->_pnt_offset ,
947- & nrb->_displ_cnt ,
943+ nrn_pragma_acc (update device (nrb->_cnt ,
944+ nrb->_size ,
945+ nrb->_pnt_offset ,
946+ nrb->_displ_cnt ,
948947 nrb->_pnt_index [:nrb->_size ],
949948 nrb->_weight_index [:nrb->_size ],
950949 nrb->_displ [:nrb->_size ],
951950 nrb->_nrb_index [:nrb->_size ])
952- if nrb)
951+ if ( nrb != nullptr ) )
953952 nrn_pragma_omp (target update to (nrb->_cnt ,
954953 nrb->_size ,
955954 nrb->_pnt_offset ,
@@ -965,7 +964,7 @@ void update_nrnthreads_on_device(NrnThread* threads, int nthreads) {
965964 nrn_pragma_acc (update device (nt->_shadow_rhs [:pcnt],
966965 /* copy shadow_d to host */
967966 nt->_shadow_d [:pcnt])
968- if nt->shadow_rhs_cnt )
967+ if ( nt->shadow_rhs_cnt ) )
969968 nrn_pragma_omp (target update to (nt->_shadow_rhs [:pcnt],
970969 /* copy shadow_d to host */
971970 nt->_shadow_d [:pcnt])
@@ -974,22 +973,22 @@ void update_nrnthreads_on_device(NrnThread* threads, int nthreads) {
974973
975974 nrn_pragma_acc (update device (nt->nrn_fast_imem ->nrn_sav_rhs [:nt->end ],
976975 nt->nrn_fast_imem ->nrn_sav_d [:nt->end ])
977- if nt->nrn_fast_imem )
976+ if ( nt->nrn_fast_imem != nullptr ) )
978977 nrn_pragma_omp (target update to (nt->nrn_fast_imem ->nrn_sav_rhs [:nt->end ],
979978 nt->nrn_fast_imem ->nrn_sav_d [:nt->end ])
980979 if (nt->nrn_fast_imem != nullptr ))
981980
982981 nrn_pragma_acc (update device (nt->pntprocs [:nt->n_pntproc ])
983- if nt->n_pntproc )
982+ if ( nt->n_pntproc ) )
984983 nrn_pragma_omp (target update to (nt->pntprocs [:nt->n_pntproc ])
985984 if (nt->n_pntproc ))
986985
987- nrn_pragma_acc (update device (nt->weights [:nt->n_weight ]) if nt->n_weight )
986+ nrn_pragma_acc (update device (nt->weights [:nt->n_weight ]) if ( nt->n_weight ) )
988987 nrn_pragma_omp (target update to (nt->weights [:nt->n_weight ]) if (nt->n_weight ))
989988
990989 nrn_pragma_acc (update device (nt->presyns_helper [:nt->n_presyn ],
991990 nt->presyns [:nt->n_presyn ])
992- if nt->n_presyn )
991+ if ( nt->n_presyn ) )
993992 nrn_pragma_omp (target update to (nt->presyns_helper [:nt->n_presyn ],
994993 nt->presyns [:nt->n_presyn ])
995994 if (nt->n_presyn ))
0 commit comments