diff options
author | Justin Bedo <cu@cua0.org> | 2023-02-07 15:27:42 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2023-02-07 17:08:50 +1100 |
commit | a0b5f58d8d2040306006a8b9deded629692ed8f3 (patch) | |
tree | 9c04ed6efabf67e9bb6b1f8f7ae9029c3b46587a /pca.h |
init
Diffstat (limited to 'pca.h')
-rw-r--r-- | pca.h | 65 |
1 files changed, 65 insertions, 0 deletions
@@ -0,0 +1,65 @@ +// Generated by Futhark 0.24.0 (prerelease - include info below when reporting bugs) +#pragma once + + +// Headers +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include <stdio.h> +#include <float.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// Initialisation +struct futhark_context_config; +struct futhark_context_config *futhark_context_config_new(void); +void futhark_context_config_free(struct futhark_context_config *cfg); +int futhark_context_config_set_tuning_param(struct futhark_context_config *cfg, const char *param_name, size_t new_value); +struct futhark_context; +struct futhark_context *futhark_context_new(struct futhark_context_config *cfg); +void futhark_context_free(struct futhark_context *cfg); +void futhark_context_config_set_debugging(struct futhark_context_config *cfg, int flag); +void futhark_context_config_set_profiling(struct futhark_context_config *cfg, int flag); +void futhark_context_config_set_logging(struct futhark_context_config *cfg, int flag); +int futhark_get_tuning_param_count(void); +const char *futhark_get_tuning_param_name(int); +const char *futhark_get_tuning_param_class(int); + +// Arrays +struct futhark_f64_2d; +struct futhark_f64_2d *futhark_new_f64_2d(struct futhark_context *ctx, const double *data, int64_t dim0, int64_t dim1); +struct futhark_f64_2d *futhark_new_raw_f64_2d(struct futhark_context *ctx, const unsigned char *data, int64_t offset, int64_t dim0, int64_t dim1); +int futhark_free_f64_2d(struct futhark_context *ctx, struct futhark_f64_2d *arr); +int futhark_values_f64_2d(struct futhark_context *ctx, struct futhark_f64_2d *arr, double *data); +unsigned char *futhark_values_raw_f64_2d(struct futhark_context *ctx, struct futhark_f64_2d *arr); +const int64_t *futhark_shape_f64_2d(struct futhark_context *ctx, struct futhark_f64_2d *arr); + +// Opaque values + + + +// Entry points +int futhark_entry_dloss(struct futhark_context *ctx, struct futhark_f64_2d **out0, struct futhark_f64_2d **out1, const struct futhark_f64_2d *in0, const struct futhark_f64_2d *in1, const struct futhark_f64_2d *in2); +int futhark_entry_loss(struct futhark_context *ctx, double *out0, const struct futhark_f64_2d *in0, const struct futhark_f64_2d *in1, const struct futhark_f64_2d *in2); +int futhark_entry_pcaWithQuantile(struct futhark_context *ctx, struct futhark_f64_2d **out0, struct futhark_f64_2d **out1, struct futhark_f64_2d **out2, double *out3, const double in0, const int64_t in1, const struct futhark_f64_2d *in2); + +// Miscellaneous +int futhark_context_sync(struct futhark_context *ctx); +void futhark_context_config_set_cache_file(struct futhark_context_config *cfg, const char *f); +char *futhark_context_report(struct futhark_context *ctx); +char *futhark_context_get_error(struct futhark_context *ctx); +void futhark_context_set_logging_file(struct futhark_context *ctx, FILE *f); +void futhark_context_pause_profiling(struct futhark_context *ctx); +void futhark_context_unpause_profiling(struct futhark_context *ctx); +int futhark_context_clear_caches(struct futhark_context *ctx); +#define FUTHARK_BACKEND_c +#define FUTHARK_SUCCESS 0 +#define FUTHARK_PROGRAM_ERROR 2 +#define FUTHARK_OUT_OF_MEMORY 3 + +#ifdef __cplusplus +} +#endif |