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 3483, Sat Dec 5 15:02:33 2015 UTC revision 3484, Sat Dec 5 15:33:56 2015 UTC
# Line 217  Line 217 
217                [f, s] --> f                [f, s] --> f
218              end))              end))
219    
   (* vector distance function *)  
     local  
       val vec2Ty = let  
             val t = tensor[N2]  
             in  
               [t, t] --> Ty.realTy  
             end  
       val vec3Ty = let  
             val t = tensor[N3]  
             in  
               [t, t] --> Ty.realTy  
             end  
     in  
     val dist2_t  = monoVar (N.fn_dist, vec2Ty)  
     val dist3_t  = monoVar (N.fn_dist, vec3Ty)  
     end (* local *)  
   
220    (* power; we distinguish between integer and real exponents to allow x^2 to be compiled    (* power; we distinguish between integer and real exponents to allow x^2 to be compiled
221     * as x*x.  The power operation of fields is restricted by the typechecker to constant     * as x*x.  The power operation of fields is restricted by the typechecker to constant
222     * integer arguments.     * integer arguments.
# Line 789  Line 772 
772      val fn_sphere3_t = polyVar (N.fn_sphere, all([TK], vec3Ty))      val fn_sphere3_t = polyVar (N.fn_sphere, all([TK], vec3Ty))
773      end (* local *)      end (* local *)
774    
775      (* vector distance function *)
776        local
777          val vec2Ty = let
778                val t = tensor[N2]
779                in
780                  [t, t] --> Ty.realTy
781                end
782          val vec3Ty = let
783                val t = tensor[N3]
784                in
785                  [t, t] --> Ty.realTy
786                end
787        in
788        val dist2_t  = monoVar (N.fn_dist, vec2Ty)
789        val dist3_t  = monoVar (N.fn_dist, vec3Ty)
790        end (* local *)
791    
792    (* Sets of strands *)    (* Sets of strands *)
793      local      local
794        fun mkSetFn name = polyVar (name, all([TK], fn [Ty.TYPE tv] => [] --> dynSeq(Ty.T_Var tv)))        fun mkSetFn name = polyVar (name, all([TK], fn [Ty.TYPE tv] => [] --> dynSeq(Ty.T_Var tv)))

Legend:
Removed from v.3483  
changed lines
  Added in v.3484

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