summaryrefslogtreecommitdiff
path: root/matrix/generic/mmatrix.c
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-05 10:58:57 +0800
committerDeterminant <[email protected]>2015-06-05 10:58:57 +0800
commitdf737041e4a9f3f55978cc74db9a9cea27fa9fa0 (patch)
treed656820be286550bc548f7c5ed4b1dcfecf3691c /matrix/generic/mmatrix.c
parentea6f2990f99dd9ded6a0e74d75a3ec84900a2518 (diff)
add profiling; add ce accurarcy; several other changes
Diffstat (limited to 'matrix/generic/mmatrix.c')
-rw-r--r--matrix/generic/mmatrix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/matrix/generic/mmatrix.c b/matrix/generic/mmatrix.c
index 4b722f3..75d1eb1 100644
--- a/matrix/generic/mmatrix.c
+++ b/matrix/generic/mmatrix.c
@@ -43,6 +43,9 @@ int nerv_matrix_(set_elem)(lua_State *L) {
static const luaL_Reg nerv_matrix_(extra_methods)[];
static void host_matrix_(init)(lua_State *L) {
luaN_append_methods(L, nerv_matrix_(extra_methods));
+#ifdef MMATRIX_INIT
+ MMATRIX_INIT(L);
+#endif
}
#include "matrix.c"
@@ -114,6 +117,7 @@ static int nerv_matrix_(copy_from)(lua_State *L) {
sizeof(MATRIX_ELEM) * b->ncol * (b_end - b_begin));
return 0;
}
+
static const luaL_Reg nerv_matrix_(extra_methods)[] = {
{"load", nerv_matrix_(load)},
{"save", nerv_matrix_(save)},