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

Function ggml_add_impl

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

Source from the content-addressed store, hash-verified

1953// ggml_add
1954
1955static struct ggml_tensor * ggml_add_impl(
1956 struct ggml_context * ctx,
1957 struct ggml_tensor * a,
1958 struct ggml_tensor * b,
1959 bool inplace) {
1960 GGML_ASSERT(ggml_can_repeat(b, a));
1961
1962 struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
1963
1964 result->op = GGML_OP_ADD;
1965 result->src[0] = a;
1966 result->src[1] = b;
1967
1968 return result;
1969}
1970
1971struct ggml_tensor * ggml_add(
1972 struct ggml_context * ctx,

Callers 3

ggml_addFunction · 0.85
ggml_add_inplaceFunction · 0.85
ggml_add_or_setFunction · 0.85

Calls 3

ggml_can_repeatFunction · 0.85
ggml_view_tensorFunction · 0.85
ggml_dup_tensorFunction · 0.85

Tested by

no test coverage detected