diff options
author | Determinant <[email protected]> | 2015-08-04 14:41:22 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-08-04 14:41:22 +0800 |
commit | 462d1982f299c8be4ae9a746e6ae7d04c04faa33 (patch) | |
tree | d2230feda37d972989bb573fbe11f7ea6b4ac279 /nerv/lib | |
parent | 5b16335a903551ffef4fafa88d67146b9131a74e (diff) |
add embedding_example
Diffstat (limited to 'nerv/lib')
-rw-r--r-- | nerv/lib/matrix/generic/matrix.c | 4 | ||||
-rw-r--r-- | nerv/lib/matrix/generic/matrix.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nerv/lib/matrix/generic/matrix.c b/nerv/lib/matrix/generic/matrix.c index e4afa37..6cb3dc0 100644 --- a/nerv/lib/matrix/generic/matrix.c +++ b/nerv/lib/matrix/generic/matrix.c @@ -3,7 +3,7 @@ #include "matrix.h" /* FIXME: malloc failure detection */ -static void nerv_matrix_(data_free)(Matrix *self, Status *status) { +void nerv_matrix_(data_free)(Matrix *self, Status *status) { assert(*self->data_ref > 0); if (--(*self->data_ref) == 0) { @@ -18,7 +18,7 @@ static void nerv_matrix_(data_free)(Matrix *self, Status *status) { } } -static void nerv_matrix_(data_retain)(Matrix *self) { +void nerv_matrix_(data_retain)(Matrix *self) { (*self->data_ref)++; } diff --git a/nerv/lib/matrix/generic/matrix.h b/nerv/lib/matrix/generic/matrix.h index 9d44e6d..69b4e6d 100644 --- a/nerv/lib/matrix/generic/matrix.h +++ b/nerv/lib/matrix/generic/matrix.h @@ -2,3 +2,5 @@ Matrix *nerv_matrix_(create)(long nrow, long ncol, Status *status); void nerv_matrix_(destroy)(Matrix *self, Status *status); Matrix *nerv_matrix_(getrow)(Matrix *self, int row); +void nerv_matrix_(data_free)(Matrix *self, Status *status); +void nerv_matrix_(data_retain)(Matrix *self); |