|
MOM6
|
Memory macros.
This is a header file to define macros for static and dynamic memory allocation. Define STATIC_MEMORY_ in MOM_memory.h for static memory allocation. Otherwise dynamic memory allocation will be assumed. For explanation of symmetric and non-symmetric memory modes see Horizontal indexing and memory.
Definition in file MOM_memory_macros.h.
Go to the source code of this file.
Macros | |
| #define | DEALLOC_(x) deallocate(x) |
| #define | ALLOC_(x) allocate(x) |
| #define | ALLOCABLE_ ,allocatable |
| #define | PTR_ ,pointer |
| #define | TO_NULL_ =>NULL() |
| #define | NIMEM_ : |
| #define | NJMEM_ : |
| #define | NIMEMB_PTR_ : |
| #define | NJMEMB_PTR_ : |
| #define | NIMEMB_ : |
| #define | NJMEMB_ : |
| #define | NIMEMB_SYM_ 0: |
| #define | NJMEMB_SYM_ 0: |
| #define | NKMEM_ : |
| #define | NKMEM0_ 0: |
| #define | NK_INTERFACE_ : |
| #define | C1_ : |
| #define | C2_ : |
| #define | C3_ : |
| #define | SZI_(G) G%isd:G%ied |
| #define | SZJ_(G) G%jsd:G%jed |
| #define | SZK_(G) G%ke |
| #define | SZK0_(G) 0:G%ke |
| #define | SZIB_(G) G%IsdB:G%IedB |
| #define | SZJB_(G) G%JsdB:G%JedB |
| #define | SZIBS_(G) G%isd-1:G%ied |
| #define | SZJBS_(G) G%jsd-1:G%jed |
| #define | SZDI_(G) G%isd:G%ied |
| #define | SZDIB_(G) G%IsdB:G%IedB |
| #define | SZDJ_(G) G%jsd:G%jed |
| #define | SZDJB_(G) G%JsdB:G%JedB |
| #define ALLOC_ | ( | x | ) | allocate(x) |
Allocates array x when using dynamic memory mode. Does nothing in static memory mode.
Definition at line 57 of file MOM_memory_macros.h.
| #define ALLOCABLE_ ,allocatable |
Attaches the ALLOCATABLE attribute to an array in dynamic memory mode. Does nothing in static memory mode.
Definition at line 59 of file MOM_memory_macros.h.
| #define C1_ : |
Expands to : or 1. UNKNOWN PURPOSE!
Definition at line 95 of file MOM_memory_macros.h.
| #define C2_ : |
Expands to : or 2. UNKNOWN PURPOSE!
Definition at line 97 of file MOM_memory_macros.h.
| #define C3_ : |
Expands to : or 3. UNKNOWN PURPOSE!
Definition at line 99 of file MOM_memory_macros.h.
| #define DEALLOC_ | ( | x | ) | deallocate(x) |
Deallocates array x when using dynamic memory mode. Does nothing in static memory mode.
Definition at line 55 of file MOM_memory_macros.h.
| #define NIMEM_ : |
Expands to : in dynamic memory mode, or is the i-shape of a tile in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or v- points.
Definition at line 68 of file MOM_memory_macros.h.
| #define NIMEMB_ : |
Definition at line 81 of file MOM_memory_macros.h.
| #define NIMEMB_PTR_ : |
Expands to : in dynamic memory mode, or to NIMEMB_ in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or v- points.
Definition at line 72 of file MOM_memory_macros.h.
| #define NIMEMB_SYM_ 0: |
Expands to 0: in dynamic memory mode, or is the staggered i-shape of a tile in static memory mode. Use for always-symmetric heap (ALLOCABLE_ or PTR_) variables at q- or u- points.
Definition at line 85 of file MOM_memory_macros.h.
| #define NJMEM_ : |
Expands to : in dynamic memory mode, or is the j-shape of a tile in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or u- points.
Definition at line 70 of file MOM_memory_macros.h.
| #define NJMEMB_ : |
Definition at line 82 of file MOM_memory_macros.h.
| #define NJMEMB_PTR_ : |
Expands to : in dynamic memory mode, or to NJMEMB_ in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or u- points.
Definition at line 74 of file MOM_memory_macros.h.
| #define NJMEMB_SYM_ 0: |
Expands to 0: in dynamic memory mode, or is the staggered j-shape of a tile in static memory mode. Use for always-symmetric heap (ALLOCABLE_ or PTR_) variables at q- or v- points.
Definition at line 87 of file MOM_memory_macros.h.
| #define NK_INTERFACE_ : |
Expands to : in dynamic memory mode or to NK_+1 in static memory mode. Use for heap (ALLOCABLE_ or PTR_) interface variables.
Definition at line 93 of file MOM_memory_macros.h.
| #define NKMEM0_ 0: |
Expands to 0: in dynamic memory mode or to 0:NK_ in static memory mode. Use for heap (ALLOCABLE_ or PTR_) interface variables.
Definition at line 91 of file MOM_memory_macros.h.
| #define NKMEM_ : |
Expands to : in dynamic memory mode or is to the number of layers in static memory mode. Use for heap (ALLOCABLE_ or PTR_) layer variables.
Definition at line 89 of file MOM_memory_macros.h.
| #define PTR_ ,pointer |
Attaches the POINTER attribute to an array in dynamic memory mode. Does nothing in static memory mode.
Definition at line 61 of file MOM_memory_macros.h.
| #define SZDI_ | ( | G | ) | G%isd:G%ied |
The i-shape of a dynamic dummy argument staggered at h- or v-points.
Definition at line 127 of file MOM_memory_macros.h.
| #define SZDIB_ | ( | G | ) | G%IsdB:G%IedB |
The i-shape of a dynamic dummy argument staggered at q- or u-points.
Definition at line 129 of file MOM_memory_macros.h.
| #define SZDJ_ | ( | G | ) | G%jsd:G%jed |
The j-shape of a dynamic dummy argument staggered at h- or u-points.
Definition at line 131 of file MOM_memory_macros.h.
| #define SZDJB_ | ( | G | ) | G%JsdB:G%JedB |
The j-shape of a dynamic dummy argument staggered at q- or v-points.
Definition at line 133 of file MOM_memory_macros.h.
| #define SZI_ | ( | G | ) | G%isd:G%ied |
The i-shape of a dummy argument staggered at h- or v-points.
Definition at line 106 of file MOM_memory_macros.h.
| #define SZIB_ | ( | G | ) | G%IsdB:G%IedB |
The i-shape of a dummy argument staggered at q- or u-points.
Definition at line 114 of file MOM_memory_macros.h.
| #define SZIBS_ | ( | G | ) | G%isd-1:G%ied |
The i-shape of a symmetric dummy argument staggered at q- or u-points.
Definition at line 118 of file MOM_memory_macros.h.
| #define SZJ_ | ( | G | ) | G%jsd:G%jed |
The j-shape of a dummy argument staggered at h- or u-points.
Definition at line 108 of file MOM_memory_macros.h.
| #define SZJB_ | ( | G | ) | G%JsdB:G%JedB |
The j-shape of a dummy argument staggered at q- or v-points.
Definition at line 116 of file MOM_memory_macros.h.
| #define SZJBS_ | ( | G | ) | G%jsd-1:G%jed |
The j-shape of a symmetric dummy argument staggered at q- or v-points.
Definition at line 120 of file MOM_memory_macros.h.
| #define SZK0_ | ( | G | ) | 0:G%ke |
The k-shape of an interface dummy argument.
Definition at line 112 of file MOM_memory_macros.h.
| #define SZK_ | ( | G | ) | G%ke |
The k-shape of a layer dummy argument.
Definition at line 110 of file MOM_memory_macros.h.
| #define TO_NULL_ =>NULL() |
Nullify a pointer in dynamic memory mode. Does nothing in static memory mode.
Definition at line 63 of file MOM_memory_macros.h.