.. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils ToObject .. java:import:: fr.inria.tapenade.utils Tree .. java:import:: java.util StringTokenizer .. java:import:: java.util.regex Pattern Directive ========= .. java:package:: fr.inria.tapenade.representation :noindex: .. java:type:: public class Directive Tapenade directives, mostly about AD. Fields ------ BINOMIALCKP ^^^^^^^^^^^ .. java:field:: public static final int BINOMIALCKP :outertype: Directive Time-stepping loops to be adjoined with binomial checkpointing. CHECKPOINT ^^^^^^^^^^ .. java:field:: public static final int CHECKPOINT :outertype: Directive Subroutine to be checkpointed. CHECKPOINTEND ^^^^^^^^^^^^^ .. java:field:: public static final int CHECKPOINTEND :outertype: Directive End of a piece of code to be checkpointed. CHECKPOINTSTART ^^^^^^^^^^^^^^^ .. java:field:: public static final int CHECKPOINTSTART :outertype: Directive Start of a piece of code to be checkpointed. DEBUGCALL ^^^^^^^^^ .. java:field:: public static final int DEBUGCALL :outertype: Directive Trigger debug AD of the current call. DEBUGHERE ^^^^^^^^^ .. java:field:: public static final int DEBUGHERE :outertype: Directive Trigger debug AD at the current point. FIXEDPOINTLOOP ^^^^^^^^^^^^^^ .. java:field:: public static final int FIXEDPOINTLOOP :outertype: Directive Piece of code containing a Fixed Point loop. IILOOP ^^^^^^ .. java:field:: public static final int IILOOP :outertype: Directive Independent-Iterations parallel loops. LABEL_END ^^^^^^^^^ .. java:field:: public static final int LABEL_END :outertype: Directive End of a piece of code identified with a label LABEL_START ^^^^^^^^^^^ .. java:field:: public static final int LABEL_START :outertype: Directive Start of a piece of code identified with a label MULTITHREAD_ADJ ^^^^^^^^^^^^^^^ .. java:field:: public static final int MULTITHREAD_ADJ :outertype: Directive Directive that overrides multithread memory layout decision for adjoint differentiated variables MULTITHREAD_TGT ^^^^^^^^^^^^^^^ .. java:field:: public static final int MULTITHREAD_TGT :outertype: Directive Directive that overrides multithread memory layout decision for tangent differentiated variables NOCHECKPOINT ^^^^^^^^^^^^ .. java:field:: public static final int NOCHECKPOINT :outertype: Directive Subroutine NOT to be checkpointed. NODIFFEND ^^^^^^^^^ .. java:field:: public static final int NODIFFEND :outertype: Directive End of a piece of code NOT to be differentiated. NODIFFSTART ^^^^^^^^^^^ .. java:field:: public static final int NODIFFSTART :outertype: Directive Start of a piece of code NOT to be differentiated. SPECIALIZEACTIVITY ^^^^^^^^^^^^^^^^^^ .. java:field:: public static final int SPECIALIZEACTIVITY :outertype: Directive Subroutine for which there may be specialized differentiations for each activity pattern. adjReduction ^^^^^^^^^^^^ .. java:field:: public Float adjReduction :outertype: Directive adjResidual ^^^^^^^^^^^ .. java:field:: public Float adjResidual :outertype: Directive For stopping criterion of adjoint fixed-point loops arguments ^^^^^^^^^ .. java:field:: public Tree[] arguments :outertype: Directive Arguments linked to a directive. label ^^^^^ .. java:field:: public String label :outertype: Directive name of a part, procedure. type ^^^^ .. java:field:: public int type :outertype: Directive Type of Directive. Constructors ------------ Directive ^^^^^^^^^ .. java:constructor:: public Directive(int directiveType) :outertype: Directive Constructor. :param directiveType: Directive Type. Methods ------- analyzeInstructionDirectives ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static void analyzeInstructionDirectives(Instruction instruction, Tree instructionComments) :outertype: Directive Analyze the comments attached to the "instruction", to find the AD directives. analyzeMultithreadScopings ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void analyzeMultithreadScopings(Tree scopingsStringTree, boolean caseSensitive, TapList toClausesGivenScoping, TapList toForcedAtomicScopingNames, TapList toForcedOtherScopingNames) :outertype: Directive Called by BlockDifferentiator to analyze the contents of an "$AD MULTITHREAD TGT_or_ADJ" directive. Current syntax is: .. * global(variables) : diff of variables must be OMP shared or Cuda globals * noconflict(variables) : same as global(variables) * shared(variables) : same as global(variables), but deprecated because "shared" meaning is different in Cuda * atomic(variables) : diff of variables must be OMP shared or Cuda globals with all usages atomic * private(variables) : diff of variables must be OMP private or Cuda registers (non-global) * firstprivate(variables) : diff of variables must be OMP firstprivate * lastprivate(variables) : diff of variables must be OMP lastprivate * reduction(op:variables) : diff of variables must be OMP reduction with given op :param scopingsStringTree: A tree of given scopings e.g. "atomic(X,Y) reduction(+:Z,R) global(V)" :param caseSensitive: false for Fortran. :param toClausesGivenScoping: will contain the corresponding future new scoping clauses. :param toForcedAtomicScopingNames: will contain the names of variables that are forced to (global)ATOMIC. :param toForcedOtherScopingNames: will contain the names of variables that are forced to another scoping. analyzeUnitDirectives ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static void analyzeUnitDirectives(Unit unit, Tree unitComments) :outertype: Directive Analyze the comments attached to the header of "unit", to find the AD directives. containDirectives ^^^^^^^^^^^^^^^^^ .. java:method:: protected static boolean containDirectives(TapList commentsList) :outertype: Directive :return: true if some of the given comments trees are indeed directives. containDirectives ^^^^^^^^^^^^^^^^^ .. java:method:: protected static boolean containDirectives(Tree commentTree) :outertype: Directive :return: true if some contents of the given commentTree are indeed directives. getDirectiveText ^^^^^^^^^^^^^^^^ .. java:method:: protected static String getDirectiveText(Tree comment) :outertype: Directive When "comment" is an AD directive, returns the directive text after the "AD_DIRECTIVE_HEAD". Otherwise returns null. :param comment: A comment. :return: The text of the directive hasDirective ^^^^^^^^^^^^ .. java:method:: public static Directive hasDirective(TapList directives, int kind) :outertype: Directive :return: a "kind" directive in a list of Directive's. hasDirective ^^^^^^^^^^^^ .. java:method:: public static Directive hasDirective(TapList directives, int kind, String label) :outertype: Directive :return: a "kind" directive with the given "label" in a list of Directive's. isEndOfRegionDirective ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static boolean isEndOfRegionDirective(Tree comment) :outertype: Directive isIILoopDirective ^^^^^^^^^^^^^^^^^ .. java:method:: protected static boolean isIILoopDirective(Tree comment) :outertype: Directive rebuildFullDirective ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public String rebuildFullDirective() :outertype: Directive startKind ^^^^^^^^^ .. java:method:: public static int startKind(int endKind) :outertype: Directive toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: Directive