MCPcopy Create free account
hub / github.com/evilsocket/cake / tensor_count

Method tensor_count

cake-core/src/utils/tensor_storage.rs:88–90  ·  view source on GitHub ↗

Number of tensors in this storage (O(1), avoids tensor_names() clone).

(&self)

Source from the content-addressed store, hash-verified

86 fn tensor_names(&self) -> Vec<String>;
87 /// Number of tensors in this storage (O(1), avoids tensor_names() clone).
88 fn tensor_count(&self) -> usize {
89 self.tensor_names().len()
90 }
91 /// Get a borrowed slice of tensor bytes without copying (if supported).
92 /// Returns None if the implementation doesn't support zero-copy access.
93 /// When available, this is faster than `read_tensor()` since it avoids allocation.

Callers

nothing calls this directly

Implementers 3

tensor_storage.rscake-core/src/utils/tensor_storage.rs
disk_expert_provider.rscake-core/src/models/common/disk_exper
disk_provider_via_mockcake-core/tests/unit_tests/test_expert

Calls 1

tensor_namesMethod · 0.45

Tested by

no test coverage detected