.. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils TapIntList .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils Tree .. java:import:: fr.inria.tapenade.utils ToBool ZoneInfo ======== .. java:package:: fr.inria.tapenade.representation :noindex: .. java:type:: public final class ZoneInfo Memory zone information. Fields ------ accessIndexes ^^^^^^^^^^^^^ .. java:field:: public TapList> accessIndexes :outertype: ZoneInfo When this zone contains arrays, contains the list of their dimensions expressions. accessTree ^^^^^^^^^^ .. java:field:: public Tree accessTree :outertype: ZoneInfo The typical expression that accesses this zone, starting from some visible variable (or common, or global...) name. Having an access tree does not mean the zone is accessible: it may still be Hidden! ambiguousWithoutIndices ^^^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public boolean ambiguousWithoutIndices :outertype: ZoneInfo When true, a single variable name is not enough to designate this ZoneInfo, and therefore the name must be shown with indices. commonName ^^^^^^^^^^ .. java:field:: public String commonName :outertype: ZoneInfo When in a COMMON, name of the common. declarationUnit ^^^^^^^^^^^^^^^ .. java:field:: public Unit declarationUnit :outertype: ZoneInfo description ^^^^^^^^^^^ .. java:field:: public String description :outertype: ZoneInfo A textual description of this zone, used e.g. in messages, comments, and logs and that should have an acceptable meaning even if the zone is Hidden. endOffset ^^^^^^^^^ .. java:field:: public int endOffset :outertype: ZoneInfo from ^^^^ .. java:field:: public ZoneInfo from :outertype: ZoneInfo When this ZoneInfo is a copy of an original ZoneInfo, this holds the original ZoneInfo. This happens e.g. when a ZoneInfo is a copy built while copying a SymbolTable. index ^^^^^ .. java:field:: public int index :outertype: ZoneInfo for PARAMETER: index of the parameter (from 1 up), for RESULT: 0 for GLOBAL: index of the (declared) zone Otherwise undefined. infiniteEndOffset ^^^^^^^^^^^^^^^^^ .. java:field:: public boolean infiniteEndOffset :outertype: ZoneInfo intZoneNb ^^^^^^^^^ .. java:field:: public int intZoneNb :outertype: ZoneInfo The reduced zone number of this int-type zoneInfo. isAllocatable ^^^^^^^^^^^^^ .. java:field:: public boolean isAllocatable :outertype: ZoneInfo 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 ^^^^^^^^^^^^^ .. java:field:: public boolean isChannelOrIO :outertype: ZoneInfo True when this is either an MPI channel or an IO stream zone isHidden ^^^^^^^^ .. java:field:: public boolean isHidden :outertype: ZoneInfo True when this ZoneInfo is about a memory location that cannot be accessed from the current scope, i.e. the SymbolTable from where this ZoneInfo was searched for, given its rank. This can be the case for zones stored at the root SymbolTables or stored in the zone arrays of the importsSymbolTable's. multiple ^^^^^^^^ .. java:field:: public boolean multiple :outertype: ZoneInfo When true, this zone represents several zones, and therefore an access to it is never total ownerSymbolDecl ^^^^^^^^^^^^^^^ .. java:field:: public SymbolDecl ownerSymbolDecl :outertype: ZoneInfo One of the SymbolDecl's that owns this zone. ptrZoneNb ^^^^^^^^^ .. java:field:: public int ptrZoneNb :outertype: ZoneInfo The reduced zone number of this pointer-type zoneInfo. realZoneNb ^^^^^^^^^^ .. java:field:: public int realZoneNb :outertype: ZoneInfo The reduced zone number of this real-type zoneInfo. rebased ^^^^^^^ .. java:field:: public boolean rebased :outertype: ZoneInfo 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 ^^^^^^^^^^^ .. java:field:: public boolean rebasedDiff :outertype: ZoneInfo Same as rebased, but concerning the adjoint differentiated zone of this zone. relocated ^^^^^^^^^ .. java:field:: public boolean relocated :outertype: ZoneInfo 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 ^^^^^^^^^^^^^ .. java:field:: public boolean relocatedDiff :outertype: ZoneInfo Same as relocated, but concerning the adjoint differentiated zone of this zone. rootAccessType ^^^^^^^^^^^^^^ .. java:field:: public WrapperTypeSpec rootAccessType :outertype: ZoneInfo The type of the root of the accessTree. startOffset ^^^^^^^^^^^ .. java:field:: public int startOffset :outertype: ZoneInfo When this zone is in a COMMON, its memory offset inside this COMMON. targetZoneOf ^^^^^^^^^^^^ .. java:field:: public ZoneInfo targetZoneOf :outertype: ZoneInfo Reverse info of "targetZonesTree". If the current ZoneInfo represents a part of the (initial) destination of a pointer, this holds the ZoneInfo of this pointer. targetZonesTree ^^^^^^^^^^^^^^^ .. java:field:: public TapList targetZonesTree :outertype: ZoneInfo If this zoneInfo is for a pointer, contains a tree of (extended declared) zone numbers which will be used to represent the (initial) destination of this pointer. type ^^^^ .. java:field:: public WrapperTypeSpec type :outertype: ZoneInfo The type of this zone. This can be a (modified) primitive type or pointer type. typeSizeModifier ^^^^^^^^^^^^^^^^ .. java:field:: public int typeSizeModifier :outertype: ZoneInfo The size modifier that applies to the type. zoneNb ^^^^^^ .. java:field:: public int zoneNb :outertype: ZoneInfo The zone number of this zoneInfo. Constructors ------------ ZoneInfo ^^^^^^^^ .. java:constructor:: public ZoneInfo(int startOffset, int endOffset, boolean infiniteEndOffset) :outertype: ZoneInfo Methods ------- accessTreePrint ^^^^^^^^^^^^^^^ .. java:method:: public String accessTreePrint(int language) :outertype: ZoneInfo addVariableName ^^^^^^^^^^^^^^^ .. java:method:: protected void addVariableName(String varName) :outertype: ZoneInfo bestVarName ^^^^^^^^^^^ .. java:method:: public String bestVarName() :outertype: ZoneInfo comesFromAllocate ^^^^^^^^^^^^^^^^^ .. java:method:: public boolean comesFromAllocate() :outertype: ZoneInfo :return: 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. containsOffset ^^^^^^^^^^^^^^ .. java:method:: public boolean containsOffset(int testedOffset) :outertype: ZoneInfo copy ^^^^ .. java:method:: public ZoneInfo copy() :outertype: ZoneInfo dump ^^^^ .. java:method:: public void dump() throws java.io.IOException :outertype: ZoneInfo Prints in detail the contents of this ZoneInfo, onto TapEnv.curOutputStream(). eqOrCopyOfEq ^^^^^^^^^^^^ .. java:method:: public static boolean eqOrCopyOfEq(ZoneInfo z1, ZoneInfo z2) :outertype: ZoneInfo isCommon ^^^^^^^^ .. java:method:: public boolean isCommon() :outertype: ZoneInfo isConstant ^^^^^^^^^^ .. java:method:: public boolean isConstant() :outertype: ZoneInfo isControl ^^^^^^^^^ .. java:method:: public boolean isControl() :outertype: ZoneInfo isGlobal ^^^^^^^^ .. java:method:: public boolean isGlobal() :outertype: ZoneInfo isOnceActive ^^^^^^^^^^^^ .. java:method:: public boolean isOnceActive() :outertype: ZoneInfo isParameter ^^^^^^^^^^^ .. java:method:: public boolean isParameter() :outertype: ZoneInfo isRemanentLocal ^^^^^^^^^^^^^^^ .. java:method:: public boolean isRemanentLocal() :outertype: ZoneInfo :return: 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). isResult ^^^^^^^^ .. java:method:: public boolean isResult() :outertype: ZoneInfo kind ^^^^ .. java:method:: public int kind() :outertype: ZoneInfo :return: kind of ZoneInfo, in {PARAMETER, LOCAL, RESULT, GLOBAL (for language C)}. kindZoneNb ^^^^^^^^^^ .. java:method:: public int kindZoneNb(int whichKind) :outertype: ZoneInfo :param whichKind: kind of ZoneInfo. :return: reduced zone number. knownSize ^^^^^^^^^ .. java:method:: public int knownSize(SymbolTable symbolTable) :outertype: ZoneInfo When it is possible to find it (statically). :return: the integer number of bytes occupied by this zone. Otherwise returns -1. listAllZones ^^^^^^^^^^^^ .. java:method:: public static TapIntList listAllZones(TapList zonesTree, boolean throughPointers) :outertype: ZoneInfo :param zonesTree: The Tree to be explored: a tree of TapIntList of (extended) zones numbers. :param throughPointers: when true, exploration of "zoneTree" goes into pointer derefs. :return: the list of all zones from "zonesTree", with no duplicates. passesByValue ^^^^^^^^^^^^^ .. java:method:: public boolean passesByValue(Unit inUnit, int callerLanguage) :outertype: ZoneInfo pointerDestType ^^^^^^^^^^^^^^^ .. java:method:: public WrapperTypeSpec pointerDestType() :outertype: ZoneInfo publicName ^^^^^^^^^^ .. java:method:: public String publicName() :outertype: ZoneInfo same ^^^^ .. java:method:: public static boolean same(ZoneInfo zi1, ZoneInfo zi2) :outertype: ZoneInfo setAmbiguousWithoutIndices ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public void setAmbiguousWithoutIndices() :outertype: ZoneInfo setKind ^^^^^^^ .. java:method:: public void setKind(int kind) :outertype: ZoneInfo setMultiple ^^^^^^^^^^^ .. java:method:: public void setMultiple() :outertype: ZoneInfo setOnceActive ^^^^^^^^^^^^^ .. java:method:: public void setOnceActive() :outertype: ZoneInfo Declare this ZoneInfo as differentiated (once-active). setVariableNames ^^^^^^^^^^^^^^^^ .. java:method:: protected void setVariableNames(TapList varNames) :outertype: ZoneInfo shareActivity ^^^^^^^^^^^^^ .. java:method:: public void shareActivity(ZoneInfo model) :outertype: ZoneInfo toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: ZoneInfo variableNames ^^^^^^^^^^^^^ .. java:method:: public TapList variableNames() :outertype: ZoneInfo