Skip to content

Commit 20aa499

Browse files
committed
docs: add documentation for ggml_trunc and ggml_trunc_inplace in ggml.h
1 parent 51040ed commit 20aa499

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ggml/include/ggml.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,12 @@ extern "C" {
11771177
struct ggml_context * ctx,
11781178
struct ggml_tensor * a);
11791179

1180+
/**
1181+
* Truncates the fractional part of each element in the tensor (towards zero).
1182+
* For example: trunc(3.7) = 3.0, trunc(-2.9) = -2.0
1183+
* Similar to std::trunc in C/C++.
1184+
*/
1185+
11801186
GGML_API struct ggml_tensor * ggml_trunc(
11811187
struct ggml_context * ctx,
11821188
struct ggml_tensor * a);

0 commit comments

Comments
 (0)