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

Function ggml_view_impl

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

Source from the content-addressed store, hash-verified

3604}
3605
3606static struct ggml_tensor * ggml_view_impl(
3607 struct ggml_context * ctx,
3608 struct ggml_tensor * a,
3609 int n_dims,
3610 const int64_t * ne,
3611 size_t offset) {
3612 struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, n_dims, ne, a, offset);
3613 ggml_format_name(result, "%s (view)", a->name);
3614
3615 ggml_set_op_params(result, &offset, sizeof(offset));
3616
3617 result->op = GGML_OP_VIEW;
3618 result->src[0] = a;
3619
3620 return result;
3621}
3622
3623// ggml_view_1d
3624

Callers 4

ggml_view_1dFunction · 0.85
ggml_view_2dFunction · 0.85
ggml_view_3dFunction · 0.85
ggml_view_4dFunction · 0.85

Calls 3

ggml_new_tensor_implFunction · 0.85
ggml_format_nameFunction · 0.85
ggml_set_op_paramsFunction · 0.85

Tested by

no test coverage detected