From 42edc4f3b5dcd460aef75af536ee541c975b0e8b Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Thu, 9 Feb 2023 09:36:19 +1100 Subject: allow setting number of iterations for optimiser --- R/src/wrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'R/src') diff --git a/R/src/wrapper.c b/R/src/wrapper.c index dd7bce1..52c1192 100644 --- a/R/src/wrapper.c +++ b/R/src/wrapper.c @@ -1,7 +1,7 @@ #include "pca.h" void -pca_wrapper(int *n, int *d, double *q, int *k, double *X, double *B, double *U, double *l) { +pca_wrapper(int *n, int *d, int *iters, double *q, int *k, double *X, double *B, double *U, double *l) { struct futhark_context_config *cfg = futhark_context_config_new(); struct futhark_context *ctx = futhark_context_new(cfg); @@ -11,7 +11,7 @@ pca_wrapper(int *n, int *d, double *q, int *k, double *X, double *B, double *U, struct futhark_f64_2d *Bf; struct futhark_f64_2d *Uf; - futhark_entry_pcaWithQuantile(ctx, &Bf, &Uf, &Yf, l, *q, *k, Xf); + futhark_entry_pcaWithQuantile(ctx, &Bf, &Uf, &Yf, l, *iters, *q, *k, Xf); futhark_context_sync(ctx); futhark_values_f64_2d(ctx, Bf, B); futhark_values_f64_2d(ctx, Uf, U); -- cgit v1.2.3