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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/c-util/tree-to-c-fn.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/c-util/tree-to-c-fn.sml

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

revision 1793, Thu Apr 5 09:53:28 2012 UTC revision 1797, Thu Apr 5 12:35:04 2012 UTC
# Line 415  Line 415 
415                  in                  in
416                    doRows (0, trExps(env, args))                    doRows (0, trExps(env, args))
417                  end                  end
418                | IL.E_Cons(Ty.TensorTy[n,m,l], args) => let
419                  (* 3rd-order tensors are represented as 2D arrays of union<d><ty>_t vectors *)
420                    fun lp1 (i, [], code) = code
421                      | lp1 (i, e::es, code) = let
422                          val lhs_i = CL.mkSubscript(lhs, intExp i)
423                          fun lp2 j = if (j < m)
424                                then CL.mkAssign(
425                                    CL.mkSelect(CL.mkSubscript(lhs_i, intExp j), "v"),
426                                    CL.mkSelect(CL.mkSubscript (e, intExp j), "v")
427                                  ) :: lp2(j+1)
428                                else code
429                          in
430                            lp1 (i+1, es, lp2 0)
431                          end
432                    in
433                      lp1 (0, trExps(env, args), [])
434                    end
435              | IL.E_Cons(Ty.SeqTy(ty, n), args) => let              | IL.E_Cons(Ty.SeqTy(ty, n), args) => let
436                  fun doAssign (_, []) = []                  fun doAssign (_, []) = []
437                    | doAssign (i, arg::args) =                    | doAssign (i, arg::args) =

Legend:
Removed from v.1793  
changed lines
  Added in v.1797

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