MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_view_tensor

Function ggml_view_tensor

ggml.c:3045–3057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3043}
3044
3045struct ggml_tensor * ggml_view_tensor(
3046 struct ggml_context * ctx,
3047 struct ggml_tensor * src) {
3048 struct ggml_tensor * result = ggml_new_tensor_impl(ctx, src->type, src->n_dims, src->ne, src, 0);
3049 ggml_format_name(result, "%s (view)", src->name);
3050
3051 for (int i = 0; i < GGML_MAX_DIMS; i++) {
3052 result->nb[i] = src->nb[i];
3053 }
3054 result->op = GGML_OP_VIEW;
3055
3056 return result;
3057}
3058
3059struct ggml_tensor * ggml_get_first_tensor(struct ggml_context * ctx) {
3060 struct ggml_object * obj = ctx->objects_begin;

Callers 15

ggml_dup_implFunction · 0.70
ggml_add_implFunction · 0.70
ggml_add_idx_implFunction · 0.70
ggml_add1_implFunction · 0.70
ggml_acc_implFunction · 0.70
ggml_sub_implFunction · 0.70
ggml_mul_implFunction · 0.70
ggml_div_implFunction · 0.70
ggml_sqr_implFunction · 0.70
ggml_sqrt_implFunction · 0.70
ggml_log_implFunction · 0.70
ggml_norm_implFunction · 0.70

Calls 2

ggml_new_tensor_implFunction · 0.70
ggml_format_nameFunction · 0.70

Tested by

no test coverage detected