diff options
Diffstat (limited to 'nerv/lib/matrix/generic/matrix.c')
-rw-r--r-- | nerv/lib/matrix/generic/matrix.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/nerv/lib/matrix/generic/matrix.c b/nerv/lib/matrix/generic/matrix.c index 004d9aa..998d107 100644 --- a/nerv/lib/matrix/generic/matrix.c +++ b/nerv/lib/matrix/generic/matrix.c @@ -9,8 +9,6 @@ void nerv_matrix_(data_free)(Matrix *self, Status *status) { { /* free matrix data */ MATRIX_DATA_FREE(MATRIX_ELEM_PTR_BASE(self), status); - curandDestroyGenerator(*(self->curand_gen)); - free(self->curand_gen); free(self->data_ref); free(self); } @@ -40,11 +38,6 @@ Matrix *nerv_matrix_(create)(long nrow, long ncol, Status *status) { } self->data_ref = (long *)malloc(sizeof(long)); *self->data_ref = 0; - - self->curand_gen = (curandGenerator_t*)malloc(sizeof(curandGenerator_t)); - curandCreateGenerator(self->curand_gen, CURAND_RNG_PSEUDO_DEFAULT); - curandSetPseudoRandomGeneratorSeed(*(self->curand_gen), time(NULL)); - self->offset = 0; nerv_matrix_(data_retain)(self); NERV_SET_STATUS(status, NERV_NORMAL, 0); @@ -64,7 +57,6 @@ Matrix *nerv_matrix_(getrow)(Matrix *self, int row) { prow->nmax = prow->ncol; prow->data = self->data; prow->data_ref = self->data_ref; - prow->curand_gen = self->curand_gen; prow->offset = row * self->stride; nerv_matrix_(data_retain)(prow); return prow; |