summaryrefslogtreecommitdiff
path: root/nerv
diff options
context:
space:
mode:
authorQi Liu <[email protected]>2016-03-11 21:41:37 +0800
committerQi Liu <[email protected]>2016-03-11 21:41:37 +0800
commit48e209f519e528c298e3471362451d6b0485abb8 (patch)
treef92f53bb421b7b5aa638fa5da8dc98f0febb5b2c /nerv
parent442e261a0f2cb8836e2859bd814a267cc8aa5db2 (diff)
fix bug
Diffstat (limited to 'nerv')
-rw-r--r--nerv/examples/network_debug/reader.lua2
-rw-r--r--nerv/lib/matrix/generic/mmatrix.c2
-rw-r--r--nerv/matrix/generic/matrix.c4
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;
}