aboutsummaryrefslogtreecommitdiff
path: root/libffwd/cuda.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-25 17:58:46 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-25 17:58:46 +0200
commitf7ef995ff54da671f9d7665b3d92ff25934c1e8b (patch)
tree1401d04c0f464b32bffd63f787a63a82c6959e97 /libffwd/cuda.h
parent417f861f3661c2253258b5683a627d961e81fc68 (diff)
downloadffwd-f7ef995ff54da671f9d7665b3d92ff25934c1e8b.tar.gz
ffwd-f7ef995ff54da671f9d7665b3d92ff25934c1e8b.zip
chore: run clang-format
Diffstat (limited to 'libffwd/cuda.h')
-rw-r--r--libffwd/cuda.h41
1 files changed, 18 insertions, 23 deletions
diff --git a/libffwd/cuda.h b/libffwd/cuda.h
index 7fc3515..851e412 100644
--- a/libffwd/cuda.h
+++ b/libffwd/cuda.h
@@ -40,11 +40,8 @@ FFWD_API const ffwd_config_t *ffwd_cuda_late_config(const ffwd_cuda_late_ctx_t *
FFWD_API int ffwd_cuda_late_token_dim(const ffwd_cuda_late_ctx_t *ctx);
/* Encode token_ids into out_vectors[n_tokens, token_dim] (host). */
-FFWD_API int ffwd_cuda_late_encode_tokens(ffwd_cuda_late_ctx_t *ctx,
- const int *token_ids,
- int n_tokens,
- int normalize,
- float *out_vectors);
+FFWD_API int ffwd_cuda_late_encode_tokens(
+ ffwd_cuda_late_ctx_t *ctx, const int *token_ids, int n_tokens, int normalize, float *out_vectors);
/*
* Encode n_docs documents in one packed forward and pack each document's kept
@@ -53,29 +50,27 @@ FFWD_API int ffwd_cuda_late_encode_tokens(ffwd_cuda_late_ctx_t *ctx,
* (the layout ffwd_late_maxsim_batch consumes). Returns 0 on success.
*/
FFWD_API int ffwd_cuda_late_encode_docs(ffwd_cuda_late_ctx_t *ctx,
- const int *const *doc_ids,
- const int *n_tokens,
- const int *const *keep,
- const int *n_keep,
- int n_docs,
- int normalize,
- float *out_vectors,
- int *out_offsets);
+ const int *const *doc_ids,
+ const int *n_tokens,
+ const int *const *keep,
+ const int *n_keep,
+ int n_docs,
+ int normalize,
+ float *out_vectors,
+ int *out_offsets);
FFWD_API const ffwd_config_t *ffwd_cuda_config(const ffwd_cuda_ctx_t *ctx);
-FFWD_API int ffwd_cuda_encode_into(ffwd_cuda_ctx_t *ctx,
- const int *token_ids,
- int n_tokens,
- float *out_embedding);
+FFWD_API int
+ffwd_cuda_encode_into(ffwd_cuda_ctx_t *ctx, const int *token_ids, int n_tokens, float *out_embedding);
FFWD_API float *ffwd_cuda_encode(ffwd_cuda_ctx_t *ctx, const int *token_ids, int n_tokens);
FFWD_API int ffwd_cuda_encode_batch(ffwd_cuda_ctx_t *ctx,
- const ffwd_input_t *inputs,
- int batch,
- float *out_embeddings);
+ const ffwd_input_t *inputs,
+ int batch,
+ float *out_embeddings);
FFWD_API int ffwd_cuda_encode_spans_batch(ffwd_cuda_ctx_t *ctx,
- const ffwd_context_input_t *inputs,
- int batch,
- float *out_embeddings);
+ const ffwd_context_input_t *inputs,
+ int batch,
+ float *out_embeddings);
#endif /* FFWD_CUDA_H */