MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_add1_impl

Function ggml_add1_impl

subprojects/llama.cpp/ggml/src/ggml.c:2041–2056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2039// ggml_add1
2040
2041static struct ggml_tensor * ggml_add1_impl(
2042 struct ggml_context * ctx,
2043 struct ggml_tensor * a,
2044 struct ggml_tensor * b,
2045 bool inplace) {
2046 GGML_ASSERT(ggml_is_scalar(b));
2047 GGML_ASSERT(ggml_is_padded_1d(a));
2048
2049 struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
2050
2051 result->op = GGML_OP_ADD1;
2052 result->src[0] = a;
2053 result->src[1] = b;
2054
2055 return result;
2056}
2057
2058struct ggml_tensor * ggml_add1(
2059 struct ggml_context * ctx,

Callers 3

ggml_add1Function · 0.85
ggml_add1_inplaceFunction · 0.85
ggml_add1_or_setFunction · 0.85

Calls 4

ggml_is_scalarFunction · 0.85
ggml_is_padded_1dFunction · 0.85
ggml_view_tensorFunction · 0.85
ggml_dup_tensorFunction · 0.85

Tested by

no test coverage detected