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

Function get_slice_2d

subprojects/llama.cpp/src/models/qwen3next.cpp:92–95  ·  view source on GitHub ↗

utility to get one slice from the third dimension input dim: [x, y, c, b] output dim: [x, y, 1, b]

Source from the content-addressed store, hash-verified

90// input dim: [x, y, c, b]
91// output dim: [x, y, 1, b]
92static ggml_tensor * get_slice_2d(ggml_context * ctx0, ggml_tensor * t, int64_t c) {
93 return ggml_view_4d(ctx0, t, t->ne[0], t->ne[1], 1, t->ne[3],
94 t->nb[1], t->nb[2], t->nb[3], t->nb[2] * c);
95}
96
97std::pair<ggml_tensor *, ggml_tensor *> llm_build_qwen3next::build_delta_net_chunking(
98 ggml_tensor * q,

Callers 1

Calls 1

ggml_view_4dFunction · 0.85

Tested by

no test coverage detected