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) |
Deallocates array x when using dynamic memory mode. Does nothing in static memory mode. More... | |
#define | ALLOC_(x) allocate(x) |
Allocates array x when using dynamic memory mode. Does nothing in static memory mode. More... | |
#define | ALLOCABLE_ ,allocatable |
Attaches the ALLOCATABLE attribute to an array in dynamic memory mode. Does nothing in static memory mode. More... | |
#define | PTR_ ,pointer |
Attaches the POINTER attribute to an array in dynamic memory mode. Does nothing in static memory mode. More... | |
#define | TO_NULL_ =>NULL() |
Nullify a pointer in dynamic memory mode. Does nothing in static memory mode. More... | |
#define | NIMEM_ : |
Expands to : in dynamic memory mode, or is the i-shape of a tile in static memory mode. More... | |
#define | NJMEM_ : |
Expands to : in dynamic memory mode, or is the j-shape of a tile in static memory mode. More... | |
#define | NIMEMB_PTR_ : |
Expands to : in dynamic memory mode, or to NIMEMB_ in static memory mode. More... | |
#define | NJMEMB_PTR_ : |
Expands to : in dynamic memory mode, or to NJMEMB_ in static memory mode. More... | |
#define | NIMEMB_ : |
Expands to : or 0: in dynamic memory mode, or is the staggered i-shape of a tile in static memory mode. More... | |
#define | NJMEMB_ : |
Expands to : or 0: in dynamic memory mode, or is the staggered j-shape of a tile in static memory mode. More... | |
#define | NIMEMB_SYM_ 0: |
Expands to 0: in dynamic memory mode, or is the staggered i-shape of a tile in static memory mode. More... | |
#define | NJMEMB_SYM_ 0: |
Expands to 0: in dynamic memory mode, or is the staggered j-shape of a tile in static memory mode. More... | |
#define | NKMEM_ : |
Expands to : in dynamic memory mode or is to the number of layers in static memory mode. More... | |
#define | NKMEM0_ 0: |
Expands to 0: in dynamic memory mode or to 0:NK_ in static memory mode. More... | |
#define | NK_INTERFACE_ : |
Expands to : in dynamic memory mode or to NK_+1 in static memory mode. More... | |
#define | C1_ : |
Expands to : or 1. UNKNOWN PURPOSE! More... | |
#define | C2_ : |
Expands to : or 2. UNKNOWN PURPOSE! More... | |
#define | C3_ : |
Expands to : or 3. UNKNOWN PURPOSE! More... | |
#define | SZI_(G) G%isd:G%ied |
The i-shape of a dummy argument staggered at h- or v-points. More... | |
#define | SZJ_(G) G%jsd:G%jed |
The j-shape of a dummy argument staggered at h- or u-points. More... | |
#define | SZK_(G) G%ke |
The k-shape of a layer dummy argument. More... | |
#define | SZK0_(G) 0:G%ke |
The k-shape of an interface dummy argument. More... | |
#define | SZIB_(G) G%IsdB:G%IedB |
The i-shape of a dummy argument staggered at q- or u-points. More... | |
#define | SZJB_(G) G%JsdB:G%JedB |
The j-shape of a dummy argument staggered at q- or v-points. More... | |
#define | SZIBS_(G) G%isd-1:G%ied |
The i-shape of a symmetric dummy argument staggered at q- or u-points. More... | |
#define | SZJBS_(G) G%jsd-1:G%jed |
The j-shape of a symmetric dummy argument staggered at q- or v-points. More... | |
#define | SZDI_(G) G%isd:G%ied |
The i-shape of a dynamic dummy argument staggered at h- or v-points. More... | |
#define | SZDIB_(G) G%IsdB:G%IedB |
The i-shape of a dynamic dummy argument staggered at q- or u-points. More... | |
#define | SZDJ_(G) G%jsd:G%jed |
The j-shape of a dynamic dummy argument staggered at h- or u-points. More... | |
#define | SZDJB_(G) G%JsdB:G%JedB |
The j-shape of a dynamic dummy argument staggered at q- or v-points. More... | |
#define ALLOC_ | ( | x | ) | allocate(x) |
Allocates array x when using dynamic memory mode. Does nothing in static memory mode.
Definition at line 100 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 102 of file MOM_memory_macros.h.
#define C1_ : |
Expands to : or 1. UNKNOWN PURPOSE!
Definition at line 153 of file MOM_memory_macros.h.
#define C2_ : |
Expands to : or 2. UNKNOWN PURPOSE!
Definition at line 155 of file MOM_memory_macros.h.
#define C3_ : |
Expands to : or 3. UNKNOWN PURPOSE!
Definition at line 157 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 98 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 112 of file MOM_memory_macros.h.
#define NIMEMB_ : |
Expands to : or 0: in dynamic memory mode, or is the staggered i-shape of a tile in static memory mode.
Use for heap (ALLOCABLE_ or PTR_) variables at q- or u- points.
Definition at line 132 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 118 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 139 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 115 of file MOM_memory_macros.h.
#define NJMEMB_ : |
Expands to : or 0: in dynamic memory mode, or is the staggered j-shape of a tile in static memory mode.
Use for heap (ALLOCABLE_ or PTR_) variables at q- or v- points.
Definition at line 135 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 121 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 142 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 151 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 148 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 145 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 104 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 185 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 187 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 189 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 191 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 164 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 172 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 176 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 166 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 174 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 178 of file MOM_memory_macros.h.
#define SZK0_ | ( | G | ) | 0:G%ke |
The k-shape of an interface dummy argument.
Definition at line 170 of file MOM_memory_macros.h.
#define SZK_ | ( | G | ) | G%ke |
The k-shape of a layer dummy argument.
Definition at line 168 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 106 of file MOM_memory_macros.h.