ZoneInfo¶
-
public final class
ZoneInfo¶ Memory zone information.
Fields¶
accessIndexes¶
accessTree¶
ambiguousWithoutIndices¶
-
public boolean
ambiguousWithoutIndices¶ When true, a single variable name is not enough to designate this ZoneInfo, and therefore the name must be shown with indices.
description¶
from¶
index¶
-
public int
index¶ for PARAMETER: index of the parameter (from 1 up), for RESULT: 0 for GLOBAL: index of the (declared) zone Otherwise undefined.
isAllocatable¶
-
public boolean
isAllocatable¶ True iff this ZoneInfo is a pointer to a location built with allocate, and therefore a pointer which cannot be redirected elsewhere (except by a deallocate() followed by a new allocate()).
isChannelOrIO¶
-
public boolean
isChannelOrIO¶ True when this is either an MPI channel or an IO stream zone
multiple¶
-
public boolean
multiple¶ When true, this zone represents several zones, and therefore an access to it is never total
ownerSymbolDecl¶
-
public SymbolDecl
ownerSymbolDecl¶ One of the SymbolDecl’s that owns this zone.
rebased¶
-
public boolean
rebased¶ Will become true as soon as there exists a pointer that may point to this zone and that may be restored by a call to poppointer() while this zone has beed relocated, therefore requiring a call to ADMM_rebase. In that case, then this zone must be registered at the time when it is allocated/declared by a call to ADMM_register and unregistered when it is deallocated/out-of-scope by a call to ADMM_unregister.
rebasedDiff¶
-
public boolean
rebasedDiff¶ Same as rebased, but concerning the adjoint differentiated zone of this zone.
relocated¶
-
public boolean
relocated¶ Will become true if at some point in execution of the adjoint code, this zone is deallocated or falls out of scope, and this execution point is not immediately followed by its reverse sweep (i.e. deallocation is diff-live). In that case this zone’s memory chunk will be effectively deallocated then re-allocated later to a different memory location, and therefore every TBR push/poppointer pair possibly pointing to this location must be rebased by a call to ADMM_rebase, and also (independently of push/pops) every allocation of this zone must be ADMM_register’ed so that size information are available for the re-allocation.
relocatedDiff¶
-
public boolean
relocatedDiff¶ Same as relocated, but concerning the adjoint differentiated zone of this zone.
rootAccessType¶
-
public WrapperTypeSpec
rootAccessType¶ The type of the root of the accessTree.
startOffset¶
-
public int
startOffset¶ When this zone is in a COMMON, its memory offset inside this COMMON.
targetZoneOf¶
targetZonesTree¶
type¶
-
public WrapperTypeSpec
type¶ The type of this zone. This can be a (modified) primitive type or pointer type.
Methods¶
comesFromAllocate¶
-
public boolean
comesFromAllocate()¶ - Returns
True when this is a zone created by an allocate (aka malloc) instruction. Testing is done by checking that the access tree contains op_allocate.
crossLanguageAccessTree¶
dump¶
-
public void
dump()¶ Prints in detail the contents of this ZoneInfo, onto TapEnv.curOutputStream().
isRemanentLocal¶
-
public boolean
isRemanentLocal()¶ - Returns
true if this zone, although declared locally (i.e. not a PARAMETER, RESULT, nor an official GLOBAL), is remanent i.e. SAVE, or DATA or initialized in declaration (which imply SAVE).
kind¶
-
public int
kind()¶ - Returns
kind of ZoneInfo, in {PARAMETER, LOCAL, RESULT, GLOBAL (for language C)}.
kindZoneNb¶
-
public int
kindZoneNb(int whichKind)¶ - Parameters
whichKind – kind of ZoneInfo.
- Returns
reduced zone number.
knownSize¶
-
public int
knownSize(SymbolTable symbolTable)¶ When it is possible to find it (statically).
- Returns
the integer number of bytes occupied by this zone. Otherwise returns -1.
listAllZones¶
-
public static TapIntList
listAllZones(TapList<?> zonesTree, boolean throughPointers)¶ Lists all zones in zonesTree, excluding zones 0 and 1 (i.e. NULL and Undef pointer destinations)
listAllZonesWithNU¶
-
public static TapIntList
listAllZonesWithNU(TapList<?> zonesTree, boolean throughPointers)¶ Lists all zones in zonesTree, possibly including zones 0 and 1 (NULL and Undef) if they are in zonesTree.
- Parameters
zonesTree – The Tree to be explored: a tree of TapIntList of (extended) zones numbers.
throughPointers – when true, exploration of “zoneTree” goes into pointer derefs.
- Returns
the list of all zones from “zonesTree”, with no duplicates.
pointerDestType¶
-
public WrapperTypeSpec
pointerDestType()¶