Update lua binding code according to interface change.
This commit is contained in:
Родитель
39e71c9e0c
Коммит
6f8d3f5fed
|
@ -24,7 +24,7 @@ ffi.cdef[[
|
||||||
void MV_GetMatrixTableAll(TableHandler handler, float* data, int size);
|
void MV_GetMatrixTableAll(TableHandler handler, float* data, int size);
|
||||||
void MV_AddMatrixTableAll(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_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
|
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 = util.array2cdata(row_ids, #row_ids, "int[?]")
|
||||||
crow_ids_n = ffi.new("int", #row_ids)
|
crow_ids_n = ffi.new("int", #row_ids)
|
||||||
cdata = util.matrix2cdata(data, #row_ids, tonumber(self._num_col))
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче