Skip to content

Commit

Permalink
add matmul benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Dibyendu Majumdar committed May 25, 2015
1 parent 79242f1 commit c22e685
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ravi-tests/matmul1.ravi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ function cast(n, to)
return n
end

local slice = table.slice

matrix = {}
function matrix.new(m, n)
local t = {m, n, table.numarray(m*n, 0)}
Expand All @@ -15,7 +17,7 @@ function matrix.getrow(m, row)
local cols = m[2]
local data = m[3]
assert(row > 0 and row <= rows)
return table.slice(data, (row-1)*cols+1, cols)
return slice(data, (row-1)*cols+1, cols)
end

function matrix.getdata(m)
Expand Down

0 comments on commit c22e685

Please sign in to comment.