aboutsummaryrefslogtreecommitdiff
path: root/liblangdet/model_internal.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-09-29 13:11:00 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-09-29 13:11:00 +0200
commit37cbaef9ceb828c667da8f398027ba5415ee7475 (patch)
tree6103e92a9030766e78a35df00f7a1155d0d0ecf5 /liblangdet/model_internal.h
parentcf7d8169ec12cb3adf90d4ff78b3257e74985302 (diff)
downloadlangdet-37cbaef9ceb828c667da8f398027ba5415ee7475.tar.gz
langdet-37cbaef9ceb828c667da8f398027ba5415ee7475.zip
Rename CPU library API and sources to langdet
Diffstat (limited to 'liblangdet/model_internal.h')
-rw-r--r--liblangdet/model_internal.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/liblangdet/model_internal.h b/liblangdet/model_internal.h
new file mode 100644
index 0000000..73a7851
--- /dev/null
+++ b/liblangdet/model_internal.h
@@ -0,0 +1,17 @@
+#ifndef LANGDET_MODEL_INTERNAL_H
+#define LANGDET_MODEL_INTERNAL_H
+
+#include "model_types.h"
+#include "alloc.h"
+
+/* Validate F32 dtype, exact dimensions, byte count, and mapped-file bounds. */
+int tensor_has_supported_shape(const safetensors_file_t *sf,
+ const safetensor_t *t,
+ const char *name,
+ const int64_t *shape,
+ int ndim);
+
+int ensure_buffers(langdet_workspace_t *ws, const langdet_config_t *cfg, int seq);
+void ensure_attention_scores(langdet_workspace_t *ws, const int *offsets, int batch);
+
+#endif /* LANGDET_MODEL_INTERNAL_H */