aboutsummaryrefslogtreecommitdiff
path: root/nerv/lib/matrix/cukernel.h
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2015-06-24 22:48:24 +0800
committerDeterminant <ted.sybil@gmail.com>2015-06-24 22:48:24 +0800
commit5e407d74130accfbbf94d2cabcb03fc126a89410 (patch)
tree6d8998e904a31a95f85a6e64ac7f3940fb61af80 /nerv/lib/matrix/cukernel.h
parent8f13607cba9d6cf4fc4a213ba5ae4bcd46f7e18d (diff)
separate non-Lua part of matrix code to a dedicated dir
Diffstat (limited to 'nerv/lib/matrix/cukernel.h')
-rw-r--r--nerv/lib/matrix/cukernel.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/nerv/lib/matrix/cukernel.h b/nerv/lib/matrix/cukernel.h
new file mode 100644
index 0000000..8a1494f
--- /dev/null
+++ b/nerv/lib/matrix/cukernel.h
@@ -0,0 +1,20 @@
+#ifdef NERV_GENERIC_CUKERNEL
+void cudak_(cuda_mul_elem)(const Matrix *a, const Matrix *b, Matrix *c);
+void cudak_(cuda_log_elem)(const Matrix *a, Matrix *b);
+void cudak_(cuda_sigmoid)(const Matrix *a, Matrix *b);
+void cudak_(cuda_sigmoid_grad)(const Matrix *output, const Matrix *err, Matrix *nerr);
+void cudak_(cuda_rowsum)(const Matrix *a, Matrix *b);
+void cudak_(cuda_rowmax)(const Matrix *a, Matrix *b);
+void cudak_(cuda_rowmax_idx)(const Matrix *a, Matrix *b, Matrix *idx);
+void cudak_(cuda_colsum)(const Matrix *a, Matrix *b);
+void cudak_(cuda_colsame)(const Matrix *a, const Matrix *ref, Matrix *b);
+void cudak_(cuda_softmax_denominator)(const Matrix *a, const Matrix *max, Matrix *b);
+void cudak_(cuda_softmax_final)(const Matrix *a, const Matrix *max, const Matrix *deno, Matrix *b);
+void cudak_(cuda_add_row)(const Matrix *a, Matrix *b, double beta);
+void cudak_(cuda_fill)(Matrix *a, double val);
+void cudak_(cuda_expand_frm)(const Matrix *a, Matrix *b, int context);
+void cudak_(cuda_rearrange_frm)(const Matrix *a, Matrix *b, int step);
+void cudak_(cuda_scale_rows_by_row)(const Matrix *a, Matrix *b);
+void cudak_(cuda_scale_rows_by_col)(const Matrix *a, Matrix *b);
+void cudak_(cuda_decompress)(const Matrix *a, Matrix *b);
+#endif