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

SCM Repository

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

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

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

revision 2610, Fri May 2 18:31:56 2014 UTC revision 2611, Mon May 5 21:21:12 2014 UTC
# Line 388  Line 388 
388                  [Ty.T_Tensor(Ty.ShapeVar s1), Ty.T_Tensor(Ty.ShapeVar s2)]                  [Ty.T_Tensor(Ty.ShapeVar s1), Ty.T_Tensor(Ty.ShapeVar s2)]
389                    --> Ty.T_Tensor(Ty.ShapeVar s3)))                    --> Ty.T_Tensor(Ty.ShapeVar s3)))
390    
   
391      val op_innerField = polyVar (N.op_dot, all([DK, SK,NK, SK,SK],      val op_innerField = polyVar (N.op_dot, all([DK, SK,NK, SK,SK],
392          fn [Ty.DIFF k,Ty.SHAPE dd1, Ty.DIM d, Ty.SHAPE dd2,Ty.SHAPE dd3] => let          fn [Ty.DIFF k,Ty.SHAPE dd1, Ty.DIM d, Ty.SHAPE dd2,Ty.SHAPE dd3] => let
   
393              val k0=Ty.DiffVar(k, 0)              val k0=Ty.DiffVar(k, 0)
394              val d' = Ty.DimVar d              val d' = Ty.DimVar d
395                val t1 = Ty.T_Field{diff = k0, dim = d', shape = Ty.ShapeVar dd1}
396                val t2 = Ty.T_Field{diff = k0, dim = d', shape = Ty.ShapeVar dd2}
397              val _ = print(String.concat["\n Basis Var Inner product Field. "])              val t3 = Ty.T_Field{diff = k0, dim = d', shape = Ty.ShapeVar dd3}
   
             val t1 = Ty.T_Field{diff = k0, dim = Ty.DimVar d, shape = Ty.ShapeVar dd1}  
             val t2 = Ty.T_Field{diff = k0, dim = Ty.DimVar d, shape = Ty.ShapeVar dd2}  
             val t3 = Ty.T_Field{diff = k0, dim = Ty.DimVar d, shape =     Ty.ShapeVar dd3}  
   
 (*  
             val f = field(k0, d',  Ty.Shape[ Ty.DimConst 2])  
   
             val h = field(Ty.DiffConst(1), Ty.DimConst 2 ,  Ty.Shape[])  
   
             val t = Ty.T_Field{diff = Ty.DiffVar(k, 0), dim = Ty.DimVar d, shape = Ty.Shape []}*)  
398              in              in
399    
400                  [t1,t2] --> t3                  [t1,t2] --> t3
401              end))              end))
402    
   
   
   
   
403    (* the colon (or double-dot) product operator is treated as a special case in the    (* the colon (or double-dot) product operator is treated as a special case in the
404     * typechecker.  It is not included in the basis environment, but we define its type     * typechecker.  It is not included in the basis environment, but we define its type
405     * schemehere.  There is an implicit constraint on its type to have the following scheme:     * schemehere.  There is an implicit constraint on its type to have the following scheme:
# Line 429  Line 412 
412                  [Ty.T_Tensor(Ty.ShapeVar s1), Ty.T_Tensor(Ty.ShapeVar s2)]                  [Ty.T_Tensor(Ty.ShapeVar s1), Ty.T_Tensor(Ty.ShapeVar s2)]
413                    --> Ty.T_Tensor(Ty.ShapeVar s3)))                    --> Ty.T_Tensor(Ty.ShapeVar s3)))
414    
415        val op_colonField = polyVar (N.op_colon, all([DK, SK,NK,SK,SK],
416            fn [Ty.DIFF k,Ty.SHAPE dd1, Ty.DIM d, Ty.SHAPE dd2,Ty.SHAPE dd3] =>let
417            val k0=Ty.DiffVar(k, 0)
418            val d' = Ty.DimVar d
419            val t1 = Ty.T_Field{diff = k0, dim = d', shape = Ty.ShapeVar dd1}
420            val t2 = Ty.T_Field{diff = k0, dim = d', shape = Ty.ShapeVar dd2}
421            val t3 = Ty.T_Field{diff = k0, dim = d', shape = Ty.ShapeVar dd3}
422            in
423                [t1,t2] --> t3
424            end))
425    
426    
427    (* load image from nrrd *)    (* load image from nrrd *)
428      val fn_image = polyVar (N.fn_image, all([NK, SK],      val fn_image = polyVar (N.fn_image, all([NK, SK],
429              fn [Ty.DIM d, Ty.SHAPE dd] => let              fn [Ty.DIM d, Ty.SHAPE dd] => let

Legend:
Removed from v.2610  
changed lines
  Added in v.2611

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