summaryrefslogtreecommitdiff
path: root/matrix/cumatrix.c
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-15 03:13:31 +0800
committerDeterminant <[email protected]>2015-05-15 03:13:31 +0800
commit902faa66e3da52a1a4cf7b1dc7da6e6bf0d47d34 (patch)
treed3c5bad9e01ecc13a510fd552b97b080e70c38ad /matrix/cumatrix.c
parentd77baabfd42d169c2cf7318b770c1f2547ebe17d (diff)
add cumatrix
Diffstat (limited to 'matrix/cumatrix.c')
-rw-r--r--matrix/cumatrix.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/matrix/cumatrix.c b/matrix/cumatrix.c
new file mode 100644
index 0000000..87ad57b
--- /dev/null
+++ b/matrix/cumatrix.c
@@ -0,0 +1,15 @@
+#define MATRIX_DATA_FREE(ptr) free(ptr)
+#define MATRIX_DATA_ALLOC(size) malloc(size)
+#define MATRIX_DATA_STRIDE(ncol) (sizeof(float) * (ncol))
+#define MATRIX_GENERIC
+#define nerv_float_matrix_(NAME) nerv_float_matrix_cuda_ ## NAME
+#include "generic/matrix.c"
+
+const char *nerv_float_matrix_(tname) = "nerv.FloatCuMatrix";
+int nerv_float_matrix_(get_elem)(lua_State *L) {
+ return nerv_error_method_not_implemented(L);
+}
+
+int nerv_float_matrix_(set_elem)(lua_State *L) {
+ return nerv_error_method_not_implemented(L);
+}