summaryrefslogtreecommitdiff
path: root/R/src
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2023-02-09 09:36:19 +1100
committerJustin Bedo <cu@cua0.org>2023-02-09 10:09:47 +1100
commit42edc4f3b5dcd460aef75af536ee541c975b0e8b (patch)
tree39e6ac6058359de876d19830664fc91ed3cd8878 /R/src
parent12d46be8c70205662d96fc26aee19fba06fd7ddf (diff)
allow setting number of iterations for optimiser
Diffstat (limited to 'R/src')
-rw-r--r--R/src/wrapper.c4
1 files changed, 2 insertions, 2 deletions
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);