The D_DECL(a,b,c) macro expands to a comma-separated list of 1, 2, or all 3 of the arguments of the call, depending on the value of CH_SPACEDIM. This can be used to write portable function calls that depend on 1, 2, or 3 arguments, corresponding to the value of CH_SPACEDIM.For example:
return IntVect(D_DECL(p[0] + s, p[1] + s, p[2] + s));
More explicitly, this macro evaluates to one of
a
a,b
a,b,c
corresponding to CH_SPACEDIM values of 1, 2, or 3.
This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.
It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.
This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.