diff options
author | Determinant <[email protected]> | 2015-05-22 10:26:12 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-22 10:26:12 +0800 |
commit | 8f18aaba322cf717b8805ebfcacb5a3108d3dda8 (patch) | |
tree | 366b86e2be668da0cf0a7ae430d5d161145b4c16 /matrix/generic/matrix.c | |
parent | 7503135d355275a17128f8a4c897739669fcd646 (diff) |
add base class CuMatrix for CuMatrixFloat and CuMatrixDouble
Diffstat (limited to 'matrix/generic/matrix.c')
-rw-r--r-- | matrix/generic/matrix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/matrix/generic/matrix.c b/matrix/generic/matrix.c index f0f81a9..b06ed89 100644 --- a/matrix/generic/matrix.c +++ b/matrix/generic/matrix.c @@ -2,8 +2,8 @@ #include "../../common.h" #include "matrix.h" -extern const char *nerv_matrix_tname; extern const char *nerv_matrix_(tname); +extern const char *MATRIX_BASE_TNAME; void nerv_matrix_(data_free)(Matrix *self) { if (--(*self->data_ref) == 0) @@ -29,7 +29,7 @@ Matrix *nerv_matrix_(new_)(long nrow, long ncol) { int nerv_matrix_(new)(lua_State *L) { luaT_pushudata(L, nerv_matrix_(new_)(luaL_checkinteger(L, 1), - luaL_checkinteger(L, 2)), + luaL_checkinteger(L, 2)), nerv_matrix_(tname)); return 1; } @@ -132,7 +132,7 @@ static const luaL_Reg nerv_matrix_(methods)[] = { }; void nerv_matrix_(init)(lua_State *L) { - luaT_newmetatable(L, nerv_matrix_(tname), nerv_matrix_tname, + luaT_newmetatable(L, nerv_matrix_(tname), MATRIX_BASE_TNAME, nerv_matrix_(new), nerv_matrix_(destroy), NULL); luaL_register(L, NULL, nerv_matrix_(methods)); #ifdef MATRIX_INIT |