#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.