Changeset 12341
- Timestamp:
- 2020-01-27T18:26:28+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/do_loop_substitute.h90
r12340 r12341 1 1 #ifdef show_comments 2 2 ! These comments are not intended to be retained during preprocessing; i.e. do not define "show_comments" 3 !!---------------------------------------------------------------------- 4 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 5 !! Software governed by the CeCILL license (see ./LICENSE) 6 !!---------------------------------------------------------------------- 3 7 ! This header file contains preprocessor definitions and macros used in the do-loop substitutions introduced 4 8 ! between version 4.0 and 4.2. The primary aim of these macros is to assist in future applications of tiling … … 10 14 ! DO jj = .... DO jj = ... 11 15 ! DO ji = .... DO ji = ... 12 ! . OR .13 ! . .16 ! . OR . 17 ! . . 14 18 ! END DO END DO 15 19 ! END DO END DO … … 31 35 ! DO jj = 2, jpj 32 36 ! DO ji = 1, jpim1 33 ! .34 ! .35 ! END DO37 ! . 38 ! . 39 ! END DO 36 40 ! END DO 37 41 ! … … 39 43 ! 40 44 ! DO_2D_01_10 41 ! .42 ! .45 ! . 46 ! . 43 47 ! END_2D 44 48 ! 45 ! similar conventions apply to the 3D loops macros althoughjk loop limits are retained through macro arguments and are not restricted. This49 ! similar conventions apply to the 3D loops macros. jk loop limits are retained through macro arguments and are not restricted. This 46 50 ! includes the possibility of strides for which an extra set of DO_3DS macros are defined. 47 51 ! … … 49 53 ! 50 54 #endif 51 #define kIs 252 #define kJs 253 #define kIsm1 154 #define kJsm1 155 #define kIs 2 56 #define kJs 2 57 #define kIsm1 1 58 #define kJsm1 1 55 59 56 #define kIe jpim157 #define kJe jpjm158 #define kIep1 jpi59 #define kJep1 jpj60 #define kIe jpim1 61 #define kJe jpjm1 62 #define kIep1 jpi 63 #define kJep1 jpj 60 64 61 #define DO_2D_00_00 DO jj = kJs, kJe ;DO ji = kIs, kIe62 #define DO_2D_00_01 DO jj = kJs, kJe ;DO ji = kIs, kIep163 #define DO_2D_00_10 DO jj = kJs, kJe ;DO ji = kIsm1, kIe64 #define DO_2D_00_11 DO jj = kJs, kJe ;DO ji = kIsm1, kIep165 #define DO_2D_00_00 DO jj = kJs, kJe ; DO ji = kIs, kIe 66 #define DO_2D_00_01 DO jj = kJs, kJe ; DO ji = kIs, kIep1 67 #define DO_2D_00_10 DO jj = kJs, kJe ; DO ji = kIsm1, kIe 68 #define DO_2D_00_11 DO jj = kJs, kJe ; DO ji = kIsm1, kIep1 65 69 66 #define DO_2D_01_00 DO jj = kJs, kJep1 ;DO ji = kIs, kIe67 #define DO_2D_01_01 DO jj = kJs, kJep1 ;DO ji = kIs, kIep168 #define DO_2D_01_10 DO jj = kJs, kJep1 ;DO ji = kIsm1, kIe69 #define DO_2D_01_11 DO jj = kJs, kJep1 ;DO ji = kIsm1, kIep170 #define DO_2D_01_00 DO jj = kJs, kJep1 ; DO ji = kIs, kIe 71 #define DO_2D_01_01 DO jj = kJs, kJep1 ; DO ji = kIs, kIep1 72 #define DO_2D_01_10 DO jj = kJs, kJep1 ; DO ji = kIsm1, kIe 73 #define DO_2D_01_11 DO jj = kJs, kJep1 ; DO ji = kIsm1, kIep1 70 74 71 #define DO_2D_10_00 DO jj = kJsm1, kJe ;DO ji = kIs, kIe72 #define DO_2D_10_10 DO jj = kJsm1, kJe ;DO ji = kIsm1, kIe73 #define DO_2D_10_11 DO jj = kJsm1, kJe ;DO ji = kIsm1, kIep175 #define DO_2D_10_00 DO jj = kJsm1, kJe ; DO ji = kIs, kIe 76 #define DO_2D_10_10 DO jj = kJsm1, kJe ; DO ji = kIsm1, kIe 77 #define DO_2D_10_11 DO jj = kJsm1, kJe ; DO ji = kIsm1, kIep1 74 78 75 #define DO_2D_11_00 DO jj = kJsm1, kJep1 ;DO ji = kIs, kIe76 #define DO_2D_11_01 DO jj = kJsm1, kJep1 ;DO ji = kIs, kIep177 #define DO_2D_11_10 DO jj = kJsm1, kJep1 ;DO ji = kIsm1, kIe78 #define DO_2D_11_11 DO jj = kJsm1, kJep1 ;DO ji = kIsm1, kIep179 #define DO_2D_11_00 DO jj = kJsm1, kJep1 ; DO ji = kIs, kIe 80 #define DO_2D_11_01 DO jj = kJsm1, kJep1 ; DO ji = kIs, kIep1 81 #define DO_2D_11_10 DO jj = kJsm1, kJep1 ; DO ji = kIsm1, kIe 82 #define DO_2D_11_11 DO jj = kJsm1, kJep1 ; DO ji = kIsm1, kIep1 79 83 80 84 81 #define DO_3D_00_00(ks,ke) DO jk = ks, ke ;DO_2D_00_0082 #define DO_3D_00_10(ks,ke) DO jk = ks, ke ;DO_2D_00_1085 #define DO_3D_00_00(ks,ke) DO jk = ks, ke ; DO_2D_00_00 86 #define DO_3D_00_10(ks,ke) DO jk = ks, ke ; DO_2D_00_10 83 87 84 #define DO_3D_01_01(ks,ke) DO jk = ks, ke ;DO_2D_01_0188 #define DO_3D_01_01(ks,ke) DO jk = ks, ke ; DO_2D_01_01 85 89 86 #define DO_3D_10_00(ks,ke) DO jk = ks, ke ;DO_2D_10_0087 #define DO_3D_10_10(ks,ke) DO jk = ks, ke ;DO_2D_10_1088 #define DO_3D_10_11(ks,ke) DO jk = ks, ke ;DO_2D_10_1190 #define DO_3D_10_00(ks,ke) DO jk = ks, ke ; DO_2D_10_00 91 #define DO_3D_10_10(ks,ke) DO jk = ks, ke ; DO_2D_10_10 92 #define DO_3D_10_11(ks,ke) DO jk = ks, ke ; DO_2D_10_11 89 93 90 #define DO_3D_11_11(ks,ke) DO jk = ks, ke ;DO_2D_11_1194 #define DO_3D_11_11(ks,ke) DO jk = ks, ke ; DO_2D_11_11 91 95 92 #define DO_3DS_00_00(ks,ke,ki) DO jk = ks, ke, ki ;DO_2D_00_0093 #define DO_3DS_01_01(ks,ke,ki) DO jk = ks, ke, ki ;DO_2D_01_0194 #define DO_3DS_10_10(ks,ke,ki) DO jk = ks, ke, ki ;DO_2D_10_1095 #define DO_3DS_11_11(ks,ke,ki) DO jk = ks, ke, ki ;DO_2D_11_1196 #define DO_3DS_00_00(ks,ke,ki) DO jk = ks, ke, ki ; DO_2D_00_00 97 #define DO_3DS_01_01(ks,ke,ki) DO jk = ks, ke, ki ; DO_2D_01_01 98 #define DO_3DS_10_10(ks,ke,ki) DO jk = ks, ke, ki ; DO_2D_10_10 99 #define DO_3DS_11_11(ks,ke,ki) DO jk = ks, ke, ki ; DO_2D_11_11 96 100 97 #define END_2D END DO ;END DO98 #define END_3D END DO ; END DO ;END DO101 #define END_2D END DO ; END DO 102 #define END_3D END DO ; END DO ; END DO
Note: See TracChangeset
for help on using the changeset viewer.