diff options
author | Ted Yin <Determinant@users.noreply.github.com> | 2016-03-12 13:17:38 +0800 |
---|---|---|
committer | Ted Yin <Determinant@users.noreply.github.com> | 2016-03-12 13:17:38 +0800 |
commit | 2b03555ea53a47e87d03a79feb866c868d424f01 (patch) | |
tree | 63cd01ee70d056d3a159a1e7d9aa4ea6f414d213 /nerv/lib/matrix/generic/cumatrix.c | |
parent | e8b1007d99691c08dd1b71f5733eb3cd2827dc64 (diff) | |
parent | 2660af7f6a9ac243a8ad38bf3375ef0fd292bf52 (diff) |
Merge pull request #31 from liuq901/master
modfiy param generate & rewrite LSTM layer
Diffstat (limited to 'nerv/lib/matrix/generic/cumatrix.c')
-rw-r--r-- | nerv/lib/matrix/generic/cumatrix.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nerv/lib/matrix/generic/cumatrix.c b/nerv/lib/matrix/generic/cumatrix.c index 6342d90..6d84663 100644 --- a/nerv/lib/matrix/generic/cumatrix.c +++ b/nerv/lib/matrix/generic/cumatrix.c @@ -515,6 +515,15 @@ void nerv_matrix_(prefixsum_row)(Matrix *a, const Matrix *b, NERV_SET_STATUS(status, NERV_NORMAL, 0); } +void nerv_matrix_(diagonalize)(Matrix *a, CuContext * context, Status *status) { + if (a->nrow != a->ncol) + NERV_EXIT_STATUS(status, MAT_MISMATCH_DIM, 0); + PROFILE_START + cudak_(cuda_diagonalize)(a); + PROFILE_STOP + NERV_SET_STATUS(status, NERV_NORMAL, 0); +} + static void cuda_matrix_(free)(MATRIX_ELEM *ptr, CuContext *context, Status *status) { CUDA_SAFE_SYNC_CALL(cudaFree(ptr), status); NERV_SET_STATUS(status, NERV_NORMAL, 0); |