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

SCM Repository

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

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

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

revision 2453, Mon Oct 7 04:32:27 2013 UTC revision 3272, Fri Oct 9 19:23:16 2015 UTC
# Line 361  Line 361 
361      end      end
362    
363    (* Query functions *)    (* Query functions *)
364      val fn_sphere = polyVar (N.fn_sphere, all([TK],    (* distance of tensors *)
365              fn [Ty.TYPE tv] => [Ty.realTy] --> Ty.T_DynSequence(Ty.T_Var tv)))      local
366          val implicit = fn [Ty.TYPE tv] => [Ty.realTy] --> Ty.T_DynSequence(Ty.T_Var tv)
367          val realTy = fn [Ty.TYPE tv] => [Ty.realTy, Ty.realTy] --> Ty.T_DynSequence(Ty.T_Var tv)
368          val vec2Ty = let
369                val t = tensor[N2]
370                in
371                  fn [Ty.TYPE tv] => [t, Ty.realTy] --> Ty.T_DynSequence(Ty.T_Var tv)
372                end
373           val vec3Ty = let
374                val t = tensor[N3]
375                in
376                  fn [Ty.TYPE tv] => [t, Ty.realTy] --> Ty.T_DynSequence(Ty.T_Var tv)
377                end
378        in
379        val fn_sphere_im  = polyVar (N.fn_sphere,all([TK], implicit))
380        val fn_sphere_r  = polyVar (N.fn_sphere,all([TK], realTy))
381        val fn_sphere_t2  = polyVar (N.fn_sphere,all([TK], vec2Ty))
382        val fn_sphere_t3 = polyVar (N.fn_sphere,all([TK], vec3Ty))
383        end
384    
385    
386    (* the inner product operator (including dot product) is treated as a special case in the    (* the inner product operator (including dot product) is treated as a special case in the
387     * typechecker.  It is not included in the basis environment, but we define its type scheme     * typechecker.  It is not included in the basis environment, but we define its type scheme
# Line 407  Line 426 
426                  end))                  end))
427    
428      (* Reduction Operations *)      (* Reduction Operations *)
429      val fn_mean = monoVar (N.fn_mean, [Ty.realTy,Ty.T_Strand(Atom.atom("")),Ty.T_String] --> Ty.realTy)      val fn_rMean = monoVar (N.fn_mean, [Ty.realTy] --> Ty.realTy)
430        val fn_rAll = monoVar (N.fn_all, [Ty.T_Bool] --> Ty.T_Bool)
431        val fn_rMax = monoVar (N.fn_max, [Ty.realTy] --> Ty.realTy)
432        val fn_rMin = monoVar (N.fn_min, [Ty.realTy] --> Ty.realTy)
433        val fn_rExists = monoVar (N.fn_exists, [Ty.T_Bool] --> Ty.T_Bool)
434        val fn_rProduct = monoVar (N.fn_product, [Ty.realTy] --> Ty.realTy)
435        val fn_rSum = monoVar (N.fn_sum, [Ty.realTy] --> Ty.realTy)
436        val fn_rVariance = monoVar (N.fn_variance, [Ty.realTy] --> Ty.realTy)
437    
438    
439    (* load dynamic sequence from nrrd *)    (* load dynamic sequence from nrrd *)
440      val fn_load = polyVar (N.fn_load, all([TK],      val fn_load = polyVar (N.fn_load, all([TK],

Legend:
Removed from v.2453  
changed lines
  Added in v.3272

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