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/cumatrix.c | |
parent | 7503135d355275a17128f8a4c897739669fcd646 (diff) |
add base class CuMatrix for CuMatrixFloat and CuMatrixDouble
Diffstat (limited to 'matrix/cumatrix.c')
-rw-r--r-- | matrix/cumatrix.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/matrix/cumatrix.c b/matrix/cumatrix.c index 90a6703..838183a 100644 --- a/matrix/cumatrix.c +++ b/matrix/cumatrix.c @@ -1,11 +1,11 @@ #define NERV_GENERIC_CUMATRIX #define MATRIX_USE_FLOAT -#define cuda_matrix_(NAME) cuda_matrix_float_ ## NAME -#define nerv_matrix_(NAME) nerv_matrix_float_cuda_ ## NAME +#define cuda_matrix_(NAME) cuda_matrix_float_##NAME +#define nerv_matrix_(NAME) nerv_matrix_cuda_float_##NAME #define cudak_(NAME) cudak_float_ ## NAME #define NERV_CUBLAS_(NAME) cublasS##NAME -const char *nerv_matrix_(tname) = "nerv.FloatCuMatrix"; +const char *nerv_matrix_(tname) = "nerv.CuMatrixFloat"; #include "generic/cumatrix.c" #undef NERV_CUBLAS_ #undef cudak_ @@ -16,9 +16,9 @@ const char *nerv_matrix_(tname) = "nerv.FloatCuMatrix"; #undef MATRIX_ELEM_PTR #define MATRIX_USE_DOUBLE -#define cuda_matrix_(NAME) cuda_matrix_double_ ## NAME -#define nerv_matrix_(NAME) nerv_matrix_double_cuda_ ## NAME +#define cuda_matrix_(NAME) cuda_matrix_double_##NAME +#define nerv_matrix_(NAME) nerv_matrix_cuda_double_##NAME #define cudak_(NAME) cudak_double_ ## NAME #define NERV_CUBLAS_(NAME) cublasD##NAME -const char *nerv_matrix_(tname) = "nerv.DoubleCuMatrix"; +const char *nerv_matrix_(tname) = "nerv.CuMatrixDouble"; #include "generic/cumatrix.c" |