MOM6
MOM_memory_macros.h File Reference

Detailed Description

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.

This graph shows which files directly or indirectly include this file:

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.
 
#define ALLOC_(x)   allocate(x)
 Allocates array x when using dynamic memory mode. Does nothing in static memory mode.
 
#define ALLOCABLE_   ,allocatable
 Attaches the ALLOCATABLE attribute to an array in dynamic memory mode. Does nothing in static memory mode.
 
#define PTR_   ,pointer
 Attaches the POINTER attribute to an array in dynamic memory mode. Does nothing in static memory mode.
 
#define TO_NULL_   =>NULL()
 Nullify a pointer in dynamic memory mode. Does nothing in static memory mode.
 
#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!
 
#define C2_   :
 Expands to : or 2. UNKNOWN PURPOSE!
 
#define C3_   :
 Expands to : or 3. UNKNOWN PURPOSE!
 
#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.
 
#define SZK_(G)   G%ke
 The k-shape of a layer dummy argument.
 
#define SZK0_(G)   0:G%ke
 The k-shape of an interface dummy argument.
 
#define SZIB_(G)   G%IsdB:G%IedB
 The i-shape of a dummy argument staggered at q- or u-points.
 
#define SZJB_(G)   G%JsdB:G%JedB
 The j-shape of a dummy argument staggered at q- or v-points.
 
#define SZIBS_(G)   G%isd-1:G%ied
 The i-shape of a symmetric dummy argument staggered at q- or u-points.
 
#define SZJBS_(G)   G%jsd-1:G%jed
 The j-shape of a symmetric dummy argument staggered at q- or v-points.
 
#define SZDI_(G)   G%isd:G%ied
 The i-shape of a dynamic dummy argument staggered at h- or v-points.
 
#define SZDIB_(G)   G%IsdB:G%IedB
 The i-shape of a dynamic dummy argument staggered at q- or u-points.
 
#define SZDJ_(G)   G%jsd:G%jed
 The j-shape of a dynamic dummy argument staggered at h- or u-points.
 
#define SZDJB_(G)   G%JsdB:G%JedB
 The j-shape of a dynamic dummy argument staggered at q- or v-points.
 

Macro Definition Documentation

◆ NIMEM_

#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.

◆ NIMEMB_

#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.

◆ NIMEMB_PTR_

#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.

◆ NIMEMB_SYM_

#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.

◆ NJMEM_

#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.

◆ NJMEMB_

#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.

◆ NJMEMB_PTR_

#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.

◆ NJMEMB_SYM_

#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.

◆ NK_INTERFACE_

#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.

◆ NKMEM0_

#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.

◆ NKMEM_

#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.

◆ SZI_

#define SZI_ (   G)    G%isd:G%ied

The i-shape of a dummy argument staggered at h- or v-points.

Todo:
Explain or remove C1_, C2_ and C3_

Definition at line 164 of file MOM_memory_macros.h.