HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
global.comploops.h
Go to the documentation of this file.
1 
10 
11 // below are each per-spatial-dimension loops used later to contruct a multi-dimensionan loop of any order
13 
14 
15 #define NDIMENNOT1(dimen) (NDIMEN(dimen)!=1)
16 #define COMPLOOPFDIMEN(dimen,ind) for( ind = 0 - NDIMENBND(dimen) + SHIFTDIR(DIR(dimen,-1)); \
17  ind <= NDIMEN(dimen) - 1 + NDIMENBND(dimen) + SHIFTDIR(DIR(dimen,+1)); \
18  ind++ )
19 
20 
22 //#define LOOPINFP13 for(k=INFULLP13;k<=OUTFULL3;k++) //SASMARK SECTIONMARK these three loops not used anywhere anymore?
23 //#define LOOPINFP12 for(j=INFULLP12;j<=OUTFULL2;j++)
24 //#define LOOPINFP11 for(i=INFULLP11;i<=OUTFULL1;i++)
25 
26 #define COMPLOOPINFP13 for(k=INFULLP13+SHIFTX3DN;k<=OUTFULL3+SHIFTX3UP;k++)
27 #define COMPLOOPINFP12 for(j=INFULLP12+SHIFTX2DN;j<=OUTFULL2+SHIFTX2UP;j++)
28 #define COMPLOOPINFP11 for(i=INFULLP11+SHIFTX1DN;i<=OUTFULL1+SHIFTX1UP;i++)
29 
30 //#define LOOPOUTFM13 for(k=INFULL3;k<=OUTFULLM13;k++)
31 //#define LOOPOUTFM12 for(j=INFULL2;j<=OUTFULLM12;j++)
32 //#define LOOPOUTFM11 for(i=INFULL1;i<=OUTFULLM11;i++)
33 
34 #define COMPLOOPOUTFM13 for(k=INFULL3+SHIFTX3DN;k<=OUTFULLM13+SHIFTX3UP;k++)
35 #define COMPLOOPOUTFM12 for(j=INFULL2+SHIFTX2DN;j<=OUTFULLM12+SHIFTX2UP;j++)
36 #define COMPLOOPOUTFM11 for(i=INFULL1+SHIFTX1DN;i<=OUTFULLM11+SHIFTX1UP;i++)
37 
38 
40 #define COMPLOOPF3 for(k=INFULL3+SHIFTX3DN;k<=OUTFULL3+SHIFTX3UP;k++)
41 #define COMPLOOPF2 for(j=INFULL2+SHIFTX2DN;j<=OUTFULL2+SHIFTX2UP;j++)
42 #define COMPLOOPF1 for(i=INFULL1+SHIFTX1DN;i<=OUTFULL1+SHIFTX1UP;i++)
43 
44 
45 #define COMPLOOPH3 for(k=INHALF3+SHIFTX3DN;k<=OUTHALF3+SHIFTX3UP;k++)
46 #define COMPLOOPH2 for(j=INHALF2+SHIFTX2DN;j<=OUTHALF2+SHIFTX2UP;j++)
47 #define COMPLOOPH1 for(i=INHALF1+SHIFTX1DN;i<=OUTHALF1+SHIFTX1UP;i++)
48 
49 #define COMPLOOPP13 for(k=INP13+SHIFTX3DN;k<=OUTP13+SHIFTX3UP;k++)
50 #define COMPLOOPP12 for(j=INP12+SHIFTX2DN;j<=OUTP12+SHIFTX2UP;j++)
51 #define COMPLOOPP11 for(i=INP11+SHIFTX1DN;i<=OUTP11+SHIFTX1UP;i++)
52 
53 #define COMPLOOPFMHP3 for(k=INFULL3+SHIFTX3DN;k<=OUTHALF3+SHIFTX3UP;k++)
54 #define COMPLOOPFMHP2 for(j=INFULL2+SHIFTX2DN;j<=OUTHALF2+SHIFTX2UP;j++)
55 #define COMPLOOPFMHP1 for(i=INFULL1+SHIFTX1DN;i<=OUTHALF1+SHIFTX1UP;i++)
56 
57 #define COMPLOOPHP3 for(k=0+SHIFTX3DN;k<=OUTHALF3+SHIFTX3UP;k++)
58 #define COMPLOOPHP2 for(j=0+SHIFTX2DN;j<=OUTHALF2+SHIFTX2UP;j++)
59 #define COMPLOOPHP1 for(i=0+SHIFTX1DN;i<=OUTHALF1+SHIFTX1UP;i++)
60 
61 #define COMPLOOPN3 for(k=0+SHIFTX3DN;k<=N3-1+SHIFTX3UP;k++)
62 #define COMPLOOPN2 for(j=0+SHIFTX2DN;j<=N2-1+SHIFTX2UP;j++)
63 #define COMPLOOPN1 for(i=0+SHIFTX1DN;i<=N1-1+SHIFTX1UP;i++)
64 
65 #define COMPLOOPF3 for(k=INFULL3+SHIFTX3DN;k<=OUTFULL3+SHIFTX3UP;k++)
66 #define COMPLOOPF2 for(j=INFULL2+SHIFTX2DN;j<=OUTFULL2+SHIFTX2UP;j++)
67 #define COMPLOOPF1 for(i=INFULL1+SHIFTX1DN;i<=OUTFULL1+SHIFTX1UP;i++)
68 
70 #define COMPLOOPFP13 for(k=INFULL3+SHIFTX3DN;k<=OUTFULLP13+SHIFTX3UP;k++)
71 #define COMPLOOPFP12 for(j=INFULL2+SHIFTX2DN;j<=OUTFULLP12+SHIFTX2UP;j++)
72 #define COMPLOOPFP11 for(i=INFULL1+SHIFTX1DN;i<=OUTFULLP11+SHIFTX1UP;i++)
73 
74 
75 
76 
77 
85 
86 
87 
89 #define COMPLOOPF LOOPORDER1(COMPLOOPF1,COMPLOOPF2,COMPLOOPF3) LOOPORDER2(COMPLOOPF1,COMPLOOPF2,COMPLOOPF3) LOOPORDER3(COMPLOOPF1,COMPLOOPF2,COMPLOOPF3)
90 #define COMPLOOPH LOOPORDER1(COMPLOOPH1,COMPLOOPH2,CPMPLOOPH3) LOOPORDER2(COMPLOOPH1,COMPLOOPH2,CPMPLOOPH3) LOOPORDER3(COMPLOOPH1,COMPLOOPH2,CPMPLOOPH3)
91 #define COMPLOOPP1 LOOPORDER1(COMPLOOPP11,COMPLOOPP12,COMPLOOPP13) LOOPORDER2(COMPLOOPP11,COMPLOOPP12,COMPLOOPP13) LOOPORDER3(COMPLOOPP11,COMPLOOPP12,COMPLOOPP13)
92 
93 #define COMPLOOPFMH LOOPORDER1(CMPLOOPFMH1,CMPLOOPFMH2,CMPLOOPFMH3) LOOPORDER2(CMPLOOPFMH1,CMPLOOPFMH2,CMPLOOPFMH3) LOOPORDER3(CMPLOOPFMH1,CMPLOOPFMH2,CMPLOOPFMH3)
94 #define COMPLOOPHMFP LOOPORDER1(CMPLOOPHMFP1,CMPLOOPHMFP2,CMPLOOPHMFP3) LOOPORDER2(CMPLOOPHMFP1,CMPLOOPHMFP2,CMPLOOPHMFP3) LOOPORDER3(CMPLOOPHMFP1,CMPLOOPHMFP2,CMPLOOPHMFP3)
95 #define COMPLOOPHP LOOPORDER1(CMPLOOPHP1,CMPLOOPHP2,CMPLOOPHP3) LOOPORDER2(CMPLOOPHP1,CMPLOOPHP2,CMPLOOPHP3) LOOPORDER3(CMPLOOPHP1,CMPLOOPHP2,CMPLOOPHP3)
96 
97 #define COMPLOOPN LOOPORDER1(COMPLOOPN1,COMPLOOPN2,COMPLOOPN3) LOOPORDER2(COMPLOOPN1,COMPLOOPN2,COMPLOOPN3) LOOPORDER3(COMPLOOPN1,COMPLOOPN2,COMPLOOPN3)
98 #define COMPFULLLOOP LOOPORDER1(COMPLOOPF1,COMPLOOPF2,COMPLOOPF3) LOOPORDER2(COMPLOOPF1,COMPLOOPF2,COMPLOOPF3) LOOPORDER3(COMPLOOPF1,COMPLOOPF2,COMPLOOPF3)
99 
101 //#define FULLLOOP LOOPORDER1(LOOPF1,LOOPF2,LOOPF3) LOOPORDER2(LOOPF1,LOOPF2,LOOPF3) LOOPORDER3(LOOPF1,LOOPF2,LOOPF3)
102 
106 #define COMPLOOPINFP1 LOOPORDER1(COMPLOOPINFP11,COMPLOOPINFP12,COMPLOOPINFP13) LOOPORDER2(COMPLOOPINFP11,COMPLOOPINFP12,COMPLOOPINFP13) LOOPORDER3(COMPLOOPINFP11,COMPLOOPINFP12,COMPLOOPINFP13)
107 
108 #define COMPLOOPINFP1dir1full LOOPORDER1(COMPLOOPF1,COMPLOOPINFP12,COMPLOOPINFP13) LOOPORDER2(COMPLOOPF1,COMPLOOPINFP12,COMPLOOPINFP13) LOOPORDER3(COMPLOOPF1,COMPLOOPINFP12,COMPLOOPINFP13)
109 
110 #define COMPLOOPINFP1dir2full LOOPORDER1(COMPLOOPINFP11,COMPLOOPF2,COMPLOOPINFP13) LOOPORDER2(COMPLOOPINFP11,COMPLOOPF2,COMPLOOPINFP13) LOOPORDER3(COMPLOOPINFP11,COMPLOOPF2,COMPLOOPINFP13)
111 
112 #define COMPLOOPINFP1dir3full LOOPORDER1(COMPLOOPINFP11,COMPLOOPINFP12,COMPLOOPF3) LOOPORDER2(COMPLOOPINFP11,COMPLOOPINFP12,COMPLOOPF3) LOOPORDER3(COMPLOOPINFP11,COMPLOOPINFP12,COMPLOOPF3)
113 
114 #define COMPLOOPINFP1dir23full LOOPORDER1(COMPLOOPINFP11,COMPLOOPF2,COMPLOOPF3) LOOPORDER2(COMPLOOPINFP11,COMPLOOPF2,COMPLOOPF3) LOOPORDER3(COMPLOOPINFP11,COMPLOOPF2,COMPLOOPF3)
115 
116 #define COMPLOOPINFP1dir13full LOOPORDER1(COMPLOOPF1,COMPLOOPINFP12,COMPLOOPF3) LOOPORDER2(COMPLOOPF1,COMPLOOPINFP12,COMPLOOPF3) LOOPORDER3(COMPLOOPF1,COMPLOOPINFP12,COMPLOOPF3)
117 
118 #define COMPLOOPINFP1dir12full LOOPORDER1(COMPLOOPF1,COMPLOOPF2,COMPLOOPINFP13) LOOPORDER2(COMPLOOPF1,COMPLOOPF2,COMPLOOPINFP13) LOOPORDER3(COMPLOOPF1,COMPLOOPF2,COMPLOOPINFP13)
119 
120 
122 #define COMPLOOPOUTFM1 LOOPORDER1(COMPLOOPOUTFM11,COMPLOOPOUTFM12,COMPLOOPOUTFM13) LOOPORDER2(COMPLOOPOUTFM11,COMPLOOPOUTFM12,COMPLOOPOUTFM13) LOOPORDER3(COMPLOOPOUTFM11,COMPLOOPOUTFM12,COMPLOOPOUTFM13)
123 
124 #define COMPLOOPOUTFM1dir1full LOOPORDER1(COMPLOOPF1,COMPLOOPOUTFM12,COMPLOOPOUTFM13) LOOPORDER2(COMPLOOPF1,COMPLOOPOUTFM12,COMPLOOPOUTFM13) LOOPORDER3(COMPLOOPF1,COMPLOOPOUTFM12,COMPLOOPOUTFM13)
125 
126 #define COMPLOOPOUTFM1dir2full LOOPORDER1(COMPLOOPOUTFM11,COMPLOOPF2,COMPLOOPOUTFM13) LOOPORDER2(COMPLOOPOUTFM11,COMPLOOPF2,COMPLOOPOUTFM13) LOOPORDER3(COMPLOOPOUTFM11,COMPLOOPF2,COMPLOOPOUTFM13)
127 
128 #define COMPLOOPOUTFM1dir3full LOOPORDER1(COMPLOOPOUTFM11,COMPLOOPOUTFM12,COMPLOOPF3) LOOPORDER2(COMPLOOPOUTFM11,COMPLOOPOUTFM12,COMPLOOPF3) LOOPORDER3(COMPLOOPOUTFM11,COMPLOOPOUTFM12,COMPLOOPF3)
129 
130 
132 //#define FULLLOOPP1 LOOPORDER1(LOOPFP11,LOOPFP12,LOOPFP13) LOOPORDER2(LOOPFP11,LOOPFP12,LOOPFP13) LOOPORDER3(LOOPFP11,LOOPFP12,LOOPFP13)
133 #define COMPFULLLOOPP1 LOOPORDER1(COMPLOOPFP11,COMPLOOPFP12,COMPLOOPFP13) LOOPORDER2(COMPLOOPFP11,COMPLOOPFP12,COMPLOOPFP13) LOOPORDER3(COMPLOOPFP11,COMPLOOPFP12,COMPLOOPFP13)
134 
135 #define COMPFULLLOOPP1_23 LOOPORDER1(,COMPLOOPFP12,COMPLOOPFP13) LOOPORDER2(,COMPLOOPFP12,COMPLOOPFP13) LOOPORDER3(,COMPLOOPFP12,COMPLOOPFP13)
136 
137 #define COMPFULLLOOPP1_13 LOOPORDER1(COMPLOOPFP11,,COMPLOOPFP13) LOOPORDER2(COMPLOOPFP11,,COMPLOOPFP13) LOOPORDER3(COMPLOOPFP11,,COMPLOOPFP13)
138 
139 
141 //#define LOOPDIVB LOOPORDER1(LOOPP11,LOOPP12,LOOPP13) LOOPORDER2(LOOPP11,LOOPP12,LOOPP13) LOOPORDER3(LOOPP11,LOOPP12,LOOPP13)
143 //#define LOOPDIVB LOOPORDER1(LOOPC1,LOOPC2,LOOPC3) LOOPORDER2(LOOPC1,LOOPC2,LOOPC3) LOOPORDER3(LOOPC1,LOOPC2,LOOPC3)
144 #define COMPLOOPDIVB LOOPORDER1(COMPLOOPN1,COMPLOOPN2,COMPLOOPN3) LOOPORDER2(COMPLOOPN1,COMPLOOPN2,COMPLOOPN3) LOOPORDER3(COMPLOOPN1,COMPLOOPN2,COMPLOOPN3)
145 
146 
147 
148 
149 
150 
151 
157 
158 
159 #if( SIMULBCCALC <= 0 ) //SASMARK not sure if need to require = -1 or <= 0
160 
166 
168 #define COMPZLOOP ZSLOOP(0+SHIFTX1DN,N1-1+SHIFTX1UP,0+SHIFTX2DN,N2-1+SHIFTX2UP,0+SHIFTX3DN,N3-1+SHIFTX3UP)
169 
172 #define COMPZSLOOP(istart,istop,jstart,jstop,kstart,kstop) ZSLOOP(istart+SHIFTX1DN,istop+SHIFTX1UP,jstart+SHIFTX2DN,jstop+SHIFTX2UP,kstart+SHIFTX3DN,kstop+SHIFTX3UP)
173 
174 
175 #define COMPFZLOOP(istart,jstart,kstart) COMPZSLOOP(istart,OUTM1,jstart,OUTM2,kstart,OUTM3) //not used anywhere for SIMULBCCALC == -1
176 #define COMPEMFZLOOP COMPZSLOOP(0,OUTM1,0,OUTM2,0,OUTM3) //not used anywhere at all (only in "//" comments)
177 #define COMPPREEMFZLOOP COMPZSLOOP(INM1,OUTM1,INM2,OUTM2,INM3,OUTM3) //not used anywhere at all (only in "//" comments)
178 #define COMPPREDQZLOOP COMPFULLLOOP //not used anywhere at all (only in "//" comments)
179 #define COMPDQZLOOP COMPZSLOOP(INM1,OUTM1,INM2,OUTM2,INM3,OUTM3)
180 
181 #define COMPF1CTZLOOP COMPZSLOOP(0,OUTM1,0,N2-1,0,N3-1) //not used anywhere at all (only in "//" comments)
182 #define COMPF2CTZLOOP COMPZSLOOP(0,N1-1,0,OUTM2,0,N3-1) //not used anywhere at all (only in "//" comments)
183 #define COMPF3CTZLOOP COMPZSLOOP(0,N1-1,0,N2-1,0,OUTM3) //not used anywhere at all (only in "//" comments)
184 
185 
186 #endif
187 
188 
189 
190 
191 
192 
193 
194 
195 
201 
202 
203 
204 //#define CZLOOP ZLOOP
206 //#define CZSLOOP(istart,istop,jstart,jstop,kstart,kstop) ZSLOOP(istart,istop,jstart,jstop,kstart,kstop)
209 //#define FZLOOP(istart,jstart,kstart) ZSLOOP(istart,OUTM1,jstart,OUTM2,kstart,OUTM3)
210 //#define EMFZLOOP ZSLOOP(0,OUTM1,0,OUTM2,0,OUTM3)
211 //#define PREEMFZLOOP ZSLOOP(INM1,OUTM1,INM2,OUTM2,INM3,OUTM3)
212 //#define COMPF1CTZLOOP ZSLOOP(0,OUTM1,0,N2-1,0,N3-1)
213 //#define COMPF2CTZLOOP ZSLOOP(0,N1-1,0,OUTM2,0,N3-1)
214 //#define COMPF3CTZLOOP ZSLOOP(0,N1-1,0,N2-1,0,OUTM3)
215 //#define COMPPREDQZLOOP FULLLOOP
216 //#define COMPDQZLOOP ZSLOOP(INM1,OUTM1,INM2,OUTM2,INM3,OUTM3)