[ET Trac] [Einstein Toolkit] #1791: Allow aligning the interior of grid functions in looping macros
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Sun Aug 9 11:16:36 CDT 2015
#1791: Allow aligning the interior of grid functions in looping macros
--------------------------+-------------------------------------------------
Reporter: eschnett | Owner:
Type: enhancement | Status: review
Priority: minor | Milestone:
Component: Cactus | Version: development version
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment (by rhaas):
Looks fine to me. In fact I like the new way of making sure the final
offset is smaller than the stride
{{{#!diff
- (bsnl (' const int cctki0_ioff = ' . (sep '', rpt
'[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' &
(cctki0_istr-1);')),
+ (bsnl (' const int cctki0_ioff0 = ' . (sep '', rpt
'[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' +
cctki0_imod;')),
+ # TODO: Omit this when grid arrays are aligned
+ (bsnl ' const int cctki0_ioff = cctki0_ioff0 % cctki0_istr;'),
}}}
better than the previous one since it allows for strides that are not
powers of 2 (though I doubt we'll ever encounter those).
One thing that had a me a bit confused is the name "_mod" used to
designate the offset argument (and not a modulus).
Please apply.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1791#comment:2>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list