Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/codegen/target-spec.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/codegen/target-spec.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3864, Mon May 16 13:23:38 2016 UTC revision 3923, Wed Jun 1 17:18:20 2016 UTC
# Line 62  Line 62 
62              scalar = #scalar tgt,              scalar = #scalar tgt,
63              debug = #debug tgt,              debug = #debug tgt,
64              bsp = #bsp tgt,              bsp = #bsp tgt,
65              hasGlobals = TargetOptions.hasProp TargetOptions.HasGlobals props,              hasGlobals = Properties.hasProp Properties.HasGlobals props,
66              hasInputs = TargetOptions.hasProp TargetOptions.HasInputs props,              hasInputs = Properties.hasProp Properties.HasInputs props,
67              isArray = TargetOptions.hasProp TargetOptions.StrandArray props,              isArray = Properties.hasProp Properties.StrandArray props,
68              hasDynSeq = TargetOptions.hasProp TargetOptions.DynamicSeq props,              hasDynSeq = Properties.hasProp Properties.DynamicSeq props,
69              hasStabilize = TargetOptions.hasProp TargetOptions.HasStabilizeMethod props,              hasStabilize = Properties.hasProp Properties.HasStabilizeMethod props,
70              hasDie = TargetOptions.hasProp TargetOptions.StrandsMayDie props,              hasDie = Properties.hasProp Properties.StrandsMayDie props,
71              hasNew = TargetOptions.hasProp TargetOptions.NewStrands props,              hasNew = Properties.hasProp Properties.NewStrands props,
72              hasCom = TargetOptions.hasProp TargetOptions.StrandCommunication props,              hasCom = Properties.hasProp Properties.StrandCommunication props,
73              hasReduce = TargetOptions.hasProp TargetOptions.GlobalReduce props              hasReduce = Properties.hasProp Properties.GlobalReduce props
74            }            }
75    
76      (* return true if the target is parallel *)
77        fun isParallel (p : t) = (case #platform p of PARALLEL => true | _ => false)
78    
79    (* returns false if BSP style execution should always be used;    (* returns false if BSP style execution should always be used;
80     * this property can be set on the command line, but     * this property can be set on the command line, but
81     * also holds when the program has communication, etc.     * also holds when the program has communication, etc.
# Line 82  Line 85 
85    (* returns true if the program does not use inter-strand communication *)    (* returns true if the program does not use inter-strand communication *)
86      fun noComm (p : t) = not(#hasCom p)      fun noComm (p : t) = not(#hasCom p)
87    
88    (* return true if we need to keep two copies of the state: in and out. *)    (* return true if we need to keep two copies of the state: in and out.
89       * NOTE: this function should agree with Properties.dualState in common/properties.sml
90       *)
91      fun dualState (p : t) = (#hasCom p)      fun dualState (p : t) = (#hasCom p)
92    
93    (* convert a target specification to the name of the runtime library *)    (* convert a target specification to the name of the runtime library *)
94      fun runtimeName (spec : t) = let      fun runtimeLibName (spec : t) = let
95            val l = if #debug spec then ["-debug.o"] else [".o"]            val l = if #debug spec then ["-debug.o"] else [".o"]
96            val t = (case #platform spec            val t = (case #platform spec
97                   of SEQUENTIAL => "-seq"                   of SEQUENTIAL => "-seq"
# Line 97  Line 102 
102            in            in
103              OS.Path.concat(              OS.Path.concat(
104                Paths.diderotLib(),                Paths.diderotLib(),
105                String.concat("diderot-rt" :: t :: p :: l))                String.concat("diderot-rt" :: t :: l))
106            end            end
107    
108    (* return the CPP floating-point precision definition for the target *)    (* return the CPP floating-point precision definition for the target *)
# Line 113  Line 118 
118    (* return the CPP target definition for the target *)    (* return the CPP target definition for the target *)
119      fun targetDef (p : t) = "DIDEROT_TARGET_" ^ TargetOptions.platformToString (#platform p)      fun targetDef (p : t) = "DIDEROT_TARGET_" ^ TargetOptions.platformToString (#platform p)
120    
121      (* qualify a C function or type name by the target namespace *)
122        fun qualifyCId name (spec : t) = #namespace spec ^ name
123        fun qualifyCId' base (spec : t, name) = concat[#namespace spec, base, "_", name]
124    
125    end    end

Legend:
Removed from v.3864  
changed lines
  Added in v.3923

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0