Class FederatedPlannerUtils

  • public class FederatedPlannerUtils
    extends Object
    Utility class for federated planners.
    • Constructor Detail

      • FederatedPlannerUtils

        public FederatedPlannerUtils()
    • Method Detail

      • getTransientInputs

        public static ArrayList<Hop> getTransientInputs​(Hop currentHop,
                                                        Map<String,​Hop> paramMap,
                                                        Map<String,​Hop> transientWrites,
                                                        LocalVariableMap localVariableMap)
        Get transient inputs from either paramMap or transientWrites. Inputs from paramMap has higher priority than inputs from transientWrites.
        currentHop - hop for which inputs are read from maps
        paramMap - of local parameters
        transientWrites - map of transient writes
        localVariableMap - map of local variables
        inputs of currentHop
      • getParamMap

        public static Map<String,​Hop> getParamMap​(FunctionOp funcOp)
        Return parameter map containing the mapping from parameter name to input hop for all parameters of the function hop.
        funcOp - hop for which the mapping of parameter names to input hops are made
        parameter map or empty map if function has no parameters
      • mapFunctionOutputs

        public static void mapFunctionOutputs​(FunctionOp sbHop,
                                              FunctionStatement funcStatement,
                                              Map<String,​Hop> transientWrites)
        Saves the HOPs (TWrite) of the function return values for the variable name used when calling the function. Example: f = function() return (matrix[double] model) {a = rand(1, 1);} b = f(); This function saves the HOP writing to a for identifier b.
        sbHop - The FunctionOp for the call
        funcStatement - The FunctionStatement of the called function
        transientWrites - map of transient writes