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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/basis/basis-vars.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/basis/basis-vars.sml

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

revision 3829, Thu May 5 21:05:37 2016 UTC revision 3830, Thu May 5 22:13:46 2016 UTC
# Line 295  Line 295 
295              [field(k, d, dd)] --> field(k, d, dd)              [field(k, d, dd)] --> field(k, d, dd)
296            end))            end))
297    
298    (* clamp is overloaded at scalars and vectors *)    (* clamp works on tensors, but there is also the boarder-control clamp function on images *)
299      val clamp_rrr = monoVar(N.fn_clamp, [Ty.realTy, Ty.realTy, Ty.realTy] --> Ty.realTy)      val clamp_trr = polyVar (N.fn_clamp, all([SK,NK], fn [Ty.SHAPE dd, Ty.DIM d] => let
300      val clamp_vvv = polyVar (N.fn_clamp, allNK(fn tv => let            val t = Ty.T_Tensor(Ty.ShapeExt(Ty.ShapeVar dd, Ty.DimVar d))
301            val t = tensor[Ty.DimVar tv]            in
302                [t, Ty.realTy, Ty.realTy] --> t
303              end))
304        val clamp_ttt = polyVar (N.fn_clamp, all([SK], fn [Ty.SHAPE dd] => let
305              val t = Ty.T_Tensor(Ty.ShapeVar dd)
306            in            in
307              [t, t, t] --> t              [t, t, t] --> t
308            end))            end))

Legend:
Removed from v.3829  
changed lines
  Added in v.3830

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