aboutsummaryrefslogtreecommitdiff
path: root/matrix/init.c
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-19 15:01:38 +0800
committerDeterminant <[email protected]>2015-05-19 15:01:38 +0800
commite9b8855c894daa4e6749acfe891f68b3ed8ed481 (patch)
tree5a3ea5e89bd475dc4312d379ffc7bf9121862dbb /matrix/init.c
parent9b6606504241f27a9d42b96f535bf5f2c2918161 (diff)
add double precision matrix implementation
Diffstat (limited to 'matrix/init.c')
-rw-r--r--matrix/init.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/matrix/init.c b/matrix/init.c
index e723f55..fb1c287 100644
--- a/matrix/init.c
+++ b/matrix/init.c
@@ -2,8 +2,11 @@
#include "generic/matrix.h"
const char *nerv_matrix_tname = "nerv.Matrix";
-void nerv_float_matrix_host_init(lua_State *L);
-void nerv_float_matrix_cuda_init(lua_State *L);
+void nerv_matrix_float_host_init(lua_State *L);
+void nerv_matrix_float_cuda_init(lua_State *L);
+void nerv_matrix_double_host_init(lua_State *L);
+void nerv_matrix_double_cuda_init(lua_State *L);
+
static const luaL_Reg matrix_methods[] = {
{"__tostring__", nerv_error_method_not_implemented },
{"__add__", nerv_error_method_not_implemented },
@@ -17,6 +20,8 @@ void nerv_matrix_init(lua_State *L) {
luaT_newmetatable(L, nerv_matrix_tname, NULL, NULL, NULL, NULL);
luaL_register(L, NULL, matrix_methods);
lua_pop(L, 1);
- nerv_float_matrix_host_init(L);
- nerv_float_matrix_cuda_init(L);
+ nerv_matrix_float_host_init(L);
+ nerv_matrix_float_cuda_init(L);
+/* nerv_matrix_double_host_init(L); */
+ nerv_matrix_double_cuda_init(L);
}