diff options
Diffstat (limited to 'src/include/cctk_Loop.h.pl')
-rwxr-xr-x | src/include/cctk_Loop.h.pl | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/include/cctk_Loop.h.pl b/src/include/cctk_Loop.h.pl index dd7b9b51..6e74094c 100755 --- a/src/include/cctk_Loop.h.pl +++ b/src/include/cctk_Loop.h.pl @@ -253,21 +253,21 @@ for $dim (1,2,3,4) { (bsnl ' imin,imax, cctki0_istr_)'), (bsnl ' do {'), (bsnl ' typedef int cctki0_loop[DIM]_normal_##name;'), - (rpt (bsnl ' int const cctki0_[C]dir = (cctki0_[C]dir_);')), - (rpt (bsnl ' int const cctki0_[C]min = (cctki0_[C]min_);')), - (rpt (bsnl ' int const cctki0_[C]max = (cctki0_[C]max_);')), - (rpt (bsnl ' int const cctki0_[C]ash CCTK_ATTRIBUTE_UNUSED = (cctki0_[C]ash_);')), - (bsnl ' int const cctki0_istr = (cctki0_istr_);'), + (rpt (bsnl ' const int cctki0_[C]dir = (cctki0_[C]dir_);')), + (rpt (bsnl ' const int cctki0_[C]min = (cctki0_[C]min_);')), + (rpt (bsnl ' const int cctki0_[C]max = (cctki0_[C]max_);')), + (rpt (bsnl ' const int cctki0_[C]ash CCTK_ATTRIBUTE_UNUSED = (cctki0_[C]ash_);')), + (bsnl ' const int cctki0_istr = (cctki0_istr_);'), # Export loop bounds in the i direction - (bsnl ' int const imin CCTK_ATTRIBUTE_UNUSED = cctki0_imin;'), - (bsnl ' int const imax CCTK_ATTRIBUTE_UNUSED = cctki0_imax;'), + (bsnl ' const int imin CCTK_ATTRIBUTE_UNUSED = cctki0_imin;'), + (bsnl ' const int imax CCTK_ATTRIBUTE_UNUSED = cctki0_imax;'), (bsnl ' [DIM==1?:CCTK_PRAGMA_OMP_FOR_COLLAPSE_[DIM-1]]'), (reverse (rpt (bsnl ' [I==1?:for (int [C]=cctki0_[C]min; [C]<cctki0_[C]max; ++[C]) {]'))), # Align i-loop to vector size - (bsnl (' int const cctki0_ioff = ' . (sep '', rpt '[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' % cctki0_istr;')), + (bsnl (' const int cctki0_ioff = ' . (sep '', rpt '[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' % cctki0_istr;')), (bsnl ' [DIM==1?_Pragma("omp for"):]'), (bsnl ' for (int i=cctki0_imin-cctki0_ioff; i<cctki0_imax; i+=cctki0_istr) {'), - (rpt (bsnl ' int const n[C] CCTK_ATTRIBUTE_UNUSED = cctki0_[C]dir<0 ? [C]+1 : cctki0_[C]dir==0 ? 0 : cctki0_[C]max-[C];')), + (rpt (bsnl ' const int n[C] CCTK_ATTRIBUTE_UNUSED = cctki0_[C]dir<0 ? [C]+1 : cctki0_[C]dir==0 ? 0 : cctki0_[C]max-[C];')), (bsnl ' {'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]STR_NORMAL(name)'), @@ -392,20 +392,20 @@ for $dim (1,2,3,4) { (bsnl ' CCTK_WARN(CCTK_WARN_ABORT,'), (bsnl ' "The macro CCTK_LOOP[DIM]_BOUNDARIES can only be used in [DIM] dimensions");'), (bsnl ' }'), - (bsnl ' int const cctki2_blo[] = { '.(crpt '(cctki2_[C]blo_)').' };'), - (bsnl ' int const cctki2_bhi[] = { '.(crpt '(cctki2_[C]bhi_)').' };'), - (bsnl ' int const cctki2_bbox[] = { '.(crpt '(cctki2_[C]bboxlo_), (cctki2_[C]bboxhi_)').' };'), - (bsnl ' int const cctki2_lsh[] = { '.(crpt 'cctki2_cctkGH->cctk_lsh[[I]]').' };'), - (bsnl ' int const cctki2_istr CCTK_ATTRIBUTE_UNUSED = (cctki2_istr_);'), + (bsnl ' const int cctki2_blo[] = { '.(crpt '(cctki2_[C]blo_)').' };'), + (bsnl ' const int cctki2_bhi[] = { '.(crpt '(cctki2_[C]bhi_)').' };'), + (bsnl ' const int cctki2_bbox[] = { '.(crpt '(cctki2_[C]bboxlo_), (cctki2_[C]bboxhi_)').' };'), + (bsnl ' const int cctki2_lsh[] = { '.(crpt 'cctki2_cctkGH->cctk_lsh[[I]]').' };'), + (bsnl ' const int cctki2_istr CCTK_ATTRIBUTE_UNUSED = (cctki2_istr_);'), # Loop over all faces, edges, and corners (reverse (rpt (bsnl ' for (int cctki2_[C]dir=-1; cctki2_[C]dir<=+1; ++cctki2_[C]dir) {'))), - (bsnl ' int const cctki2_any_bbox ='), + (bsnl ' const int cctki2_any_bbox ='), (bsnlsep [rpt ' (cctki2_[C]dir<0 ? cctki2_bbox[[2*I]] : 0) || (cctki2_[C]dir>0 ? cctki2_bbox[[2*I+1]] : 0)'], ' ||', ';'), (bsnl ' if (cctki2_any_bbox) {'), - (bsnl ' int const cctki2_bmin[] = {'), + (bsnl ' const int cctki2_bmin[] = {'), (rpt (bsnl ' cctki2_[C]dir<0 ? 0 : cctki2_[C]dir==0 ? cctki2_blo[[I]] : cctki2_lsh[[I]] - cctki2_bhi[[I]],')), (bsnl ' };'), - (bsnl ' int const cctki2_bmax[] = {'), + (bsnl ' const int cctki2_bmax[] = {'), (rpt (bsnl ' cctki2_[C]dir<0 ? cctki2_blo[[I]] : cctki2_[C]dir==0 ? cctki2_lsh[[I]] - cctki2_bhi[[I]] : cctki2_lsh[[I]],')), (bsnl ' };'), (bsnl ' CCTK_LOOP[DIM]STR_NORMAL(name##_boundaries,'), @@ -463,22 +463,22 @@ for $dim (1,2,3,4) { (bsnl ' CCTK_WARN(CCTK_WARN_ABORT,'), (bsnl ' "The macro CCTK_LOOP[DIM]_INTBOUNDARIES can only be used in [DIM] dimensions");'), (bsnl ' }'), - (bsnl ' int const cctki2_blo[] = { '.(crpt '(cctki2_[C]blo_)').' };'), - (bsnl ' int const cctki2_bhi[] = { '.(crpt '(cctki2_[C]bhi_)').' };'), - (bsnl ' int const cctki2_bbox[] = { '.(crpt '(cctki2_[C]bboxlo_), (cctki2_[C]bboxhi_)').' };'), - (bsnl ' int const cctki2_lsh[] = { '.(crpt 'cctki2_cctkGH->cctk_lsh[[I]]').' };'), - (bsnl ' int const cctki2_istr CCTK_ATTRIBUTE_UNUSED = (cctki2_istr_);'), + (bsnl ' const int cctki2_blo[] = { '.(crpt '(cctki2_[C]blo_)').' };'), + (bsnl ' const int cctki2_bhi[] = { '.(crpt '(cctki2_[C]bhi_)').' };'), + (bsnl ' const int cctki2_bbox[] = { '.(crpt '(cctki2_[C]bboxlo_), (cctki2_[C]bboxhi_)').' };'), + (bsnl ' const int cctki2_lsh[] = { '.(crpt 'cctki2_cctkGH->cctk_lsh[[I]]').' };'), + (bsnl ' const int cctki2_istr CCTK_ATTRIBUTE_UNUSED = (cctki2_istr_);'), # Loop over all faces, edges, and corners (reverse (rpt (bsnl ' for (int cctki2_[C]dir=-1; cctki2_[C]dir<=+1; ++cctki2_[C]dir) {'))), - (bsnl ' int const cctki2_any_bbox ='), + (bsnl ' const int cctki2_any_bbox ='), (bsnlsep [rpt ' (cctki2_[C]dir<0 ? cctki2_bbox[[2*I]] : 0) || (cctki2_[C]dir>0 ? cctki2_bbox[[2*I+1]] : 0)'], ' ||', ';'), - (bsnl ' int const cctki2_all_bbox ='), + (bsnl ' const int cctki2_all_bbox ='), (bsnlsep [rpt ' (cctki2_[C]dir<0 ? cctki2_bbox[[2*I]] : 1) && (cctki2_[C]dir>0 ? cctki2_bbox[[2*I+1]] : 1)'], ' &&', ';'), (bsnl ' if (cctki2_all_bbox && cctki2_any_bbox) {'), - (bsnl ' int const cctki2_bmin[] = {'), + (bsnl ' const int cctki2_bmin[] = {'), (rpt (bsnl ' cctki2_[C]dir<0 ? 0 : cctki2_[C]dir==0 ? cctki2_blo[[I]] : cctki2_lsh[[I]] - cctki2_bhi[[I]],')), (bsnl ' };'), - (bsnl ' int const cctki2_bmax[] = {'), + (bsnl ' const int cctki2_bmax[] = {'), (rpt (bsnl ' cctki2_[C]dir<0 ? cctki2_blo[[I]] : cctki2_[C]dir==0 ? cctki2_lsh[[I]] - cctki2_bhi[[I]] : cctki2_lsh[[I]],')), (bsnl ' };'), (bsnl ' CCTK_LOOP[DIM]STR_NORMAL(name##_intboundaries,'), |