| 1467 | } |
| 1468 | |
| 1469 | bool 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 | |
| 1479 | bool 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"); |
no outgoing calls
no test coverage detected