diff options
author | Determinant <[email protected]> | 2015-05-15 03:13:31 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-15 03:13:31 +0800 |
commit | 902faa66e3da52a1a4cf7b1dc7da6e6bf0d47d34 (patch) | |
tree | d3c5bad9e01ecc13a510fd552b97b080e70c38ad /matrix/cumatrix.c | |
parent | d77baabfd42d169c2cf7318b770c1f2547ebe17d (diff) |
add cumatrix
Diffstat (limited to 'matrix/cumatrix.c')
-rw-r--r-- | matrix/cumatrix.c | 15 |
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); +} |