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

Function ggml_view_tensor

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

Source from the content-addressed store, hash-verified

1858}
1859
1860struct ggml_tensor * ggml_view_tensor(
1861 struct ggml_context * ctx,
1862 struct ggml_tensor * src) {
1863 struct ggml_tensor * result = ggml_new_tensor_impl(ctx, src->type, GGML_MAX_DIMS, src->ne, src, 0);
1864 ggml_format_name(result, "%s (view)", src->name);
1865
1866 for (int i = 0; i < GGML_MAX_DIMS; i++) {
1867 result->nb[i] = src->nb[i];
1868 }
1869
1870 return result;
1871}
1872
1873struct ggml_tensor * ggml_get_first_tensor(const struct ggml_context * ctx) {
1874 struct ggml_object * obj = ctx->objects_begin;

Callers 15

ggml_dup_implFunction · 0.85
ggml_add_implFunction · 0.85
ggml_add1_implFunction · 0.85
ggml_acc_implFunction · 0.85
ggml_sub_implFunction · 0.85
ggml_mul_implFunction · 0.85
ggml_div_implFunction · 0.85
ggml_sqr_implFunction · 0.85
ggml_sqrt_implFunction · 0.85
ggml_log_implFunction · 0.85
ggml_sin_implFunction · 0.85
ggml_cos_implFunction · 0.85

Calls 2

ggml_new_tensor_implFunction · 0.85
ggml_format_nameFunction · 0.85

Tested by

no test coverage detected