[ET Trac] [Einstein Toolkit] #875: Cactus should define 'restrict', with a value dependent on autoconf information
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Mon May 7 09:04:41 CDT 2012
#875: Cactus should define 'restrict', with a value dependent on autoconf
information
-------------------------+--------------------------------------------------
Reporter: knarf | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Cactus | Version: development version
Keywords: |
-------------------------+--------------------------------------------------
The Kranc ticket https://github.com/ianhinder/Kranc/issues/62 mentions
arguments why to do this: to make certain optimizations possible. While
'restrict' is not a C keyword, many compilers support it, leading to
measurable speedup in cases. At the moment Cactus only defines
CCTK_RESTRICT, but it has been commented that using this leads to ugly
code. Defining 'restrict' would beautify this, as well as make it easier
to directly use code which relies on 'restrict' being present (when this
isn't actually the case, or is called differently).
A counter argument would be that this would effectively introduce a
keyword 'restrict' to Cactus. Code using this name already for something
else would need to be changed. Given the positive effects of this change I
would say that this outweights this potential problem.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/875>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list