Ignore:
Timestamp:
2020-01-29T17:15:37+01:00 (13 months ago)
Author:
acc
Message:

Branch 2019/dev_r11943_MERGE_2019. Additions to the do loop macro implementation: converted a few loops previously missed because they used jpi-1 instead of jpim1 etc.; changed internal macro names in do_loop_substitute.h90 to strings that are much more unlikely to appear in any future code elsewhere and removed the key_vectopt_loop option (and all related code) since the do loop macros have suppressed this option. These changes have been fully SETTE-tested and this branch should now be ready to go back to the trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/do_loop_substitute.h90

    r12341 r12353  
    1 #ifdef show_comments 
     1#if defined show_comments 
    22! These comments are not intended to be retained during preprocessing; i.e. do not define "show_comments" 
    33!!---------------------------------------------------------------------- 
     
    5050! includes the possibility of strides for which an extra set of DO_3DS macros are defined. 
    5151! 
    52 ! In the definitions below the inner PE domain is defined by start indices of (kIs, kJs) and end indices of (kIe, KJe) 
     52! In the following definitions the inner PE domain is defined by start indices of (___kIs_, __kJs_) and end indices of (__kIe_, __kJe_) 
     53! The following macros are defined just below: ___kIs_, __kJs_, ___kIsm1_, __kJsm1_, ___kIe_, __kJe_, ___kIep1_, __kJep1_.  
     54! These names are chosen to, hopefully, avoid any future, unintended matches elsewhere in the code. 
    5355! 
    5456#endif 
    55 #define kIs     2 
    56 #define kJs     2 
    57 #define kIsm1   1 
    58 #define kJsm1   1 
     57#define __kIs_     2 
     58#define __kJs_     2 
     59#define __kIsm1_   1 
     60#define __kJsm1_   1 
    5961 
    60 #define kIe     jpim1 
    61 #define kJe     jpjm1 
    62 #define kIep1   jpi 
    63 #define kJep1   jpj 
     62#define __kIe_     jpim1 
     63#define __kJe_     jpjm1 
     64#define __kIep1_   jpi 
     65#define __kJep1_   jpj 
    6466 
    65 #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 
     67#define DO_2D_00_00   DO jj = __kJs_, __kJe_   ;   DO ji = __kIs_, __kIe_ 
     68#define DO_2D_00_01   DO jj = __kJs_, __kJe_   ;   DO ji = __kIs_, __kIep1_ 
     69#define DO_2D_00_10   DO jj = __kJs_, __kJe_   ;   DO ji = __kIsm1_, __kIe_ 
     70#define DO_2D_00_11   DO jj = __kJs_, __kJe_   ;   DO ji = __kIsm1_, __kIep1_ 
    6971  
    70 #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 
     72#define DO_2D_01_00   DO jj = __kJs_, __kJep1_   ;   DO ji = __kIs_, __kIe_ 
     73#define DO_2D_01_01   DO jj = __kJs_, __kJep1_   ;   DO ji = __kIs_, __kIep1_ 
     74#define DO_2D_01_10   DO jj = __kJs_, __kJep1_   ;   DO ji = __kIsm1_, __kIe_ 
     75#define DO_2D_01_11   DO jj = __kJs_, __kJep1_   ;   DO ji = __kIsm1_, __kIep1_ 
    7476  
    75 #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 
     77#define DO_2D_10_00   DO jj = __kJsm1_, __kJe_   ;   DO ji = __kIs_, __kIe_ 
     78#define DO_2D_10_10   DO jj = __kJsm1_, __kJe_   ;   DO ji = __kIsm1_, __kIe_ 
     79#define DO_2D_10_11   DO jj = __kJsm1_, __kJe_   ;   DO ji = __kIsm1_, __kIep1_ 
    7880  
    79 #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 
    83  
     81#define DO_2D_11_00   DO jj = __kJsm1_, __kJep1_   ;   DO ji = __kIs_, __kIe_ 
     82#define DO_2D_11_01   DO jj = __kJsm1_, __kJep1_   ;   DO ji = __kIs_, __kIep1_ 
     83#define DO_2D_11_10   DO jj = __kJsm1_, __kJep1_   ;   DO ji = __kIsm1_, __kIe_ 
     84#define DO_2D_11_11   DO jj = __kJsm1_, __kJep1_   ;   DO ji = __kIsm1_, __kIep1_ 
    8485 
    8586#define DO_3D_00_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_00 
Note: See TracChangeset for help on using the changeset viewer.