Differences From
Artifact [1f9397ac82]:
123 123 end
124 124 end
125 125 return t
126 126 end
127 127
128 128 m.ptr = terralib.memoize(function(ty) return mkptr(ty, true) end)
129 129 m.ref = terralib.memoize(function(ty) return mkptr(ty, false) end)
130 +m.lstptr = function(ty) return m.ptr(m.ptr(ty)) end -- make code more readable
130 131
131 132 m.vec = terralib.memoize(function(ty)
132 133 local v = terralib.types.newstruct(string.format('vec<%s>', ty.name))
133 134 v.entries = {
134 135 {field = 'storage', type = m.ptr(ty)};
135 136 {field = 'sz', type = intptr};
136 137 {field = 'run', type = intptr};