From 6f8d3f5fed9c7e7e99e7244f9923dc8d965ad231 Mon Sep 17 00:00:00 2001 From: huxuan Date: Mon, 23 May 2016 22:02:27 +0900 Subject: [PATCH] Update lua binding code according to interface change. --- binding/lua/multiverso.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/binding/lua/multiverso.lua b/binding/lua/multiverso.lua index e39b1fd..8535062 100644 --- a/binding/lua/multiverso.lua +++ b/binding/lua/multiverso.lua @@ -24,7 +24,7 @@ ffi.cdef[[ void MV_GetMatrixTableAll(TableHandler handler, float* data, int size); void MV_AddMatrixTableAll(TableHandler handler, float* data, int size); void MV_GetMatrixTableByRows(TableHandler handler, int row_ids[], int row_ids_n, int num_col, float** data); - void MV_AddMatrixTableByRows(TableHandler handler, int row_ids[], int row_ids_n, int num_col, float* data[]); + void MV_AddMatrixTableByRows(TableHandler handler, float* data, int num_col, int row_ids[], int row_ids_n); ]] package.cpath = "../../build/src/?.so;" .. package.cpath @@ -134,7 +134,8 @@ function mv.MatrixTableHandler:add(data, row_ids) crow_ids = util.array2cdata(row_ids, #row_ids, "int[?]") crow_ids_n = ffi.new("int", #row_ids) cdata = util.matrix2cdata(data, #row_ids, tonumber(self._num_col)) - libmv.MV_AddMatrixTableByRows(self._handler[0], crow_ids, crow_ids_n, self._num_col, cdata) + libmv.MV_AddMatrixTableByRows(self._handler[0], cdata, self._num_col, + crow_ids, crow_ids_n) end end