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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/mid-to-low/evalImg.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/mid-to-low/evalImg.sml

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

revision 3066, Sat Mar 14 16:34:25 2015 UTC revision 3067, Sat Mar 14 17:24:52 2015 UTC
# Line 125  Line 125 
125          fun getImgAddr (imgType,vPosAddr) =(case imgType          fun getImgAddr (imgType,vPosAddr) =(case imgType
126              of [] => mkAddPtr([vBase,vPosAddr],ptyTy)              of [] => mkAddPtr([vBase,vPosAddr],ptyTy)
127              | [0] => mkAddPtr([vBase,vPosAddr],ptyTy)              | [0] => mkAddPtr([vBase,vPosAddr],ptyTy)
128              | alpha => let              | [_] => let
129                  val (vA,A)= mkAddPtr([vBase,vPosAddr],ptyTy)                  val (vA,A)= mkAddPtr([vBase,vPosAddr],ptyTy)
130                  val (vB,B)= mkInt (asize alpha)                  val (vB,B)= mkInt (asize imgType)
131                    val (vC,C)= mkAddPtr([vB, vA],ptyTy)
132                    in (vC,A@B@C)end
133                | [i,j] => let
134                    val [a,b]=ImageInfo.voxelShape v
135                    (*val _=print(String.concat[Int.toString i,"-",Int.toString j,"\nvoxel",Int.toString a,"-",Int.toString b])*)
136                    val (vA,A)= mkAddPtr([vBase,vPosAddr],ptyTy)
137                    val (vB,B)= mkInt ((b*j)+i)
138                  val (vC,C)= mkAddPtr([vB, vA],ptyTy)                  val (vC,C)= mkAddPtr([vB, vA],ptyTy)
139                  in (vC,A@B@C)end                  in (vC,A@B@C)end
140              (*end case*))              (*end case*))

Legend:
Removed from v.3066  
changed lines
  Added in v.3067

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