New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13540 for NEMO/branches/2020/r12377_ticket2386/src/OCE/do_loop_substitute.h90 – NEMO

Ignore:
Timestamp:
2020-09-29T12:41:06+02:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2386: update to latest trunk

Location:
NEMO/branches/2020/r12377_ticket2386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r12377_ticket2386

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@13507        sette 
  • NEMO/branches/2020/r12377_ticket2386/src/OCE/do_loop_substitute.h90

    r12377 r13540  
    88! between version 4.0 and 4.2. The primary aim of these macros is to assist in future applications of tiling 
    99! to improve performance. This is expected to be achieved by alternative versions of these macros in selected 
    10 ! locations. The initial introduction of these macros simply replaces all identifiable nested 2D- and 3D-loops 
    11 ! with single line statements (and adjusts indenting accordingly). Do loops are identifiable if they comform 
     10! locations. The initial introduction of these macros simply replaced all identifiable nested 2D- and 3D-loops 
     11! with single line statements (and adjusts indenting accordingly). Do loops were identifiable if they comformed 
    1212! to either: 
    1313!                                       DO jk = .... 
     
    2121! and white-space variants thereof. 
    2222! 
    23 ! Additionally, only loops with recognised jj and ji loops limits are treated; these are: 
     23! Additionally, only loops with recognised jj and ji loops limits were treated; these were: 
    2424! Lower limits of 1, 2 or fs_2 
    2525! Upper limits of jpi, jpim1 or fs_jpim1 (for ji) or jpj, jpjm1 or fs_jpjm1 (for jj) 
    2626! 
    27 ! The macro naming convention takes the form: DO_2D_BT_LR where:  
     27! The macro naming convention takes the form: DO_2D( B, T, L, R) where:  
    2828!   B is the Bottom offset from the PE's inner domain; 
    2929!   T is the Top    offset from the PE's inner domain; 
     
    4242! with: 
    4343! 
    44 !   DO_2D_01_10 
     44!   DO_2D( 0, 1, 1, 0 ) 
    4545!      . 
    4646!      . 
    4747!   END_2D 
    4848!  
    49 ! similar conventions apply to the 3D loops macros. jk loop limits are retained through macro arguments and are not restricted. This 
    50 ! includes the possibility of strides for which an extra set of DO_3DS macros are defined. 
     49! similar conventions apply to the 3D loops macros. jk loop limits are retained through macro arguments  
     50! and are not restricted. This includes the possibility of strides for which an extra set of DO_3DS  
     51! macros are defined. 
    5152! 
    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. 
     53! In the following definitions the inner PE domain is defined by start indices of (Nis0, Njs0) and end  
     54! indices of (Nie0, Nje0) where: 
    5555! 
     56! Nis0 =   1 + nn_hls     Njs0 =   1 + nn_hls 
     57! Nie0 = jpi - nn_hls     Nje0 = jpj - nn_hls 
     58!  
    5659#endif 
    57 #define __kIs_     2 
    58 #define __kJs_     2 
    59 #define __kIsm1_   1 
    60 #define __kJsm1_   1 
    6160 
    62 #define __kIe_     jpim1 
    63 #define __kJe_     jpjm1 
    64 #define __kIep1_   jpi 
    65 #define __kJep1_   jpj 
     61#define DO_2D(B, T, L, R) DO jj = Njs0-(B), Nje0+(T)   ;   DO ji = Nis0-(L), Nie0+(R) 
    6662 
    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_ 
    71   
    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_ 
    76   
    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_ 
    80   
    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_ 
     63#define DO_3D(B, T, L, R, ks, ke) DO jk = ks, ke   ;   DO_2D(B, T, L, R) 
    8564 
    86 #define DO_3D_00_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_00 
    87 #define DO_3D_00_10(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_10 
    88   
    89 #define DO_3D_01_01(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_01 
    90   
    91 #define DO_3D_10_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_00 
    92 #define DO_3D_10_10(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_10 
    93 #define DO_3D_10_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_11 
    94   
    95 #define DO_3D_11_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_11 
    96  
    97 #define DO_3DS_00_00(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_00 
    98 #define DO_3DS_01_01(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_01 
    99 #define DO_3DS_10_10(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_10 
    100 #define DO_3DS_11_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_11 
     65#define DO_3DS(B, T, L, R, ks, ke, ki) DO jk = ks, ke, ki   ;   DO_2D(B, T, L, R) 
    10166 
    10267#define END_2D   END DO   ;   END DO 
Note: See TracChangeset for help on using the changeset viewer.