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

Function ggml_is_empty

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

Source from the content-addressed store, hash-verified

1467}
1468
1469bool ggml_is_empty(const struct ggml_tensor * tensor) {
1470 for (int i = 0; i < GGML_MAX_DIMS; ++i) {
1471 if (tensor->ne[i] == 0) {
1472 // empty if any dimension has no elements
1473 return true;
1474 }
1475 }
1476 return false;
1477}
1478
1479bool ggml_are_same_shape(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
1480 static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");

Callers 15

ggml_can_repeatFunction · 0.85
ggml_repeat_4dFunction · 0.85
ggml_set_zeroFunction · 0.85
ggml_vk_set_rowsFunction · 0.85
ggml_vk_build_graphFunction · 0.85
ggml_vk_is_emptyFunction · 0.85
ggml_webgpu_set_rowsFunction · 0.85
ggml_webgpu_encode_nodeFunction · 0.85
ggml_metal_opMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected