Provide macros for array looping and indexing for GridData. More...
#include "generic.h"
Go to the source code of this file.
Defines | |
#define | for_1(i, r, s) |
#define | BeginFastIndex1(a, b, d, type) |
#define | FastIndex1(a, i) name2(a,_D)[name2(a,_B)+((i)/name2(a,_s0))] |
#define | EndFastIndex1(a) } |
Provide macros for array looping and indexing for GridData.
Adaptation from LPARX developed by Scott Kohn (skohn-at-cs.ucsd.edu)
#define BeginFastIndex1 | ( | a, | |||
b, | |||||
d, | |||||
type | ) |
{ \ const int name2(a,_B) = b.bottom(); \ type *const name2(a,_D) = d; \ const int name2(a,_s0) = b.stepsize(0)
Referenced by Cluster_Prune(), Cluster_Slice(), GridData< Type, 1 >::lin_interp(), GridData< Type, 1 >::maxabs(), GridData< Type, 1 >::maxval(), GridData< Type, 1 >::minval(), GridData< Type, 1 >::moment1(), GridData< Type, 1 >::PackRegion(), GridData< Type, 1 >::product(), GridData< Type, 1 >::sum(), GridData< Type, 1 >::sumabs(), GridData< Type, 1 >::sumsqrd(), and GridData< Type, 1 >::UnPackRegion().
#define EndFastIndex1 | ( | a | ) | } |
Referenced by Cluster_Prune(), Cluster_Slice(), GridData< Type, 1 >::lin_interp(), GridData< Type, 1 >::maxabs(), GridData< Type, 1 >::maxval(), GridData< Type, 1 >::minval(), GridData< Type, 1 >::moment1(), GridData< Type, 1 >::PackRegion(), GridData< Type, 1 >::product(), GridData< Type, 1 >::sum(), GridData< Type, 1 >::sumabs(), GridData< Type, 1 >::sumsqrd(), and GridData< Type, 1 >::UnPackRegion().
#define FastIndex1 | ( | a, | |||
i | ) | name2(a,_D)[name2(a,_B)+((i)/name2(a,_s0))] |
Referenced by Cluster_Prune(), Cluster_Slice(), GridData< Type, 1 >::lin_interp(), GridData< Type, 1 >::maxabs(), GridData< Type, 1 >::maxval(), GridData< Type, 1 >::minval(), GridData< Type, 1 >::moment1(), GridData< Type, 1 >::PackRegion(), GridData< Type, 1 >::product(), GridData< Type, 1 >::sum(), GridData< Type, 1 >::sumabs(), GridData< Type, 1 >::sumsqrd(), and GridData< Type, 1 >::UnPackRegion().
#define for_1 | ( | i, | |||
r, | |||||
s | ) |
{ \ const int name2(i,_L) = (((r).lower(0)+((r).lower(0)<0?-s(0)+1:s(0)-1))/s(0))*s(0); \ const int name2(i,_U) = (r).upper(0); \ const int name2(si,_S) = (s(0)); \ for (register int i = name2(i,_L); i <= name2(i,_U); i+=name2(si,_S)) {
Referenced by Cluster(), GridHierarchy::DAGH_CreateGridUnitList(), DAGHCluster(), GridData< Type, 1 >::lin_interp(), GridData< Type, 1 >::maxabs(), GridData< Type, 1 >::maxval(), GridData< Type, 1 >::minval(), GridData< Type, 1 >::moment1(), GridData< Type, 1 >::PackRegion(), GridData< Type, 1 >::product(), GridData< Type, 1 >::sum(), GridData< Type, 1 >::sumabs(), GridData< Type, 1 >::sumsqrd(), and GridData< Type, 1 >::UnPackRegion().