From 48e209f519e528c298e3471362451d6b0485abb8 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Fri, 11 Mar 2016 21:41:37 +0800 Subject: fix bug --- nerv/examples/network_debug/reader.lua | 2 +- nerv/lib/matrix/generic/mmatrix.c | 2 +- nerv/matrix/generic/matrix.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nerv/examples/network_debug/reader.lua b/nerv/examples/network_debug/reader.lua index d2624d3..b10baaf 100644 --- a/nerv/examples/network_debug/reader.lua +++ b/nerv/examples/network_debug/reader.lua @@ -59,7 +59,7 @@ function Reader:get_all_batch(global_conf) pos[i] = nil end while true do - --for i = 1, 100 do + -- for i = 1, 26 do local input = {} local output = {} for i = 1, global_conf.chunk_size do diff --git a/nerv/lib/matrix/generic/mmatrix.c b/nerv/lib/matrix/generic/mmatrix.c index 6272cbe..badddbd 100644 --- a/nerv/lib/matrix/generic/mmatrix.c +++ b/nerv/lib/matrix/generic/mmatrix.c @@ -274,7 +274,7 @@ void nerv_matrix_(fill)(Matrix *self, double val, NERV_SET_STATUS(status, NERV_NORMAL, 0); } -void nerv_matrix_(diagonalize)(Matrix *selfa, +void nerv_matrix_(diagonalize)(Matrix *self, MContext *context, Status *status) { if (self->nrow != self->ncol) NERV_EXIT_STATUS(status, MAT_MISMATCH_DIM, 0); diff --git a/nerv/matrix/generic/matrix.c b/nerv/matrix/generic/matrix.c index b544dd9..fe07585 100644 --- a/nerv/matrix/generic/matrix.c +++ b/nerv/matrix/generic/matrix.c @@ -387,8 +387,10 @@ static int nerv_matrix_(lua_scale_rows_by_row)(lua_State *L) { static int nerv_matrix_(lua_diagonalize)(lua_State *L) { Status status; + MATRIX_CONTEXT *context; + MATRIX_GET_CONTEXT(L, 2); Matrix *a = luaT_checkudata(L, 1, nerv_matrix_(tname)); - nerv_matrix_(diagonalize)(a, &status); + nerv_matrix_(diagonalize)(a, context, &status); NERV_LUA_CHECK_STATUS(L, status); return 0; } -- cgit v1.2.3-70-g09d2