MCPcopy Create free account
hub / github.com/apache/arrow / TensorCountNonZero

Function TensorCountNonZero

cpp/src/arrow/tensor.cc:574–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572
573template <typename TYPE>
574inline int64_t TensorCountNonZero(const Tensor& tensor) {
575 if (tensor.is_contiguous()) {
576 return ContiguousTensorCountNonZero<TYPE>(tensor);
577 } else {
578 return StridedTensorCountNonZero<TYPE>(0, 0, tensor);
579 }
580}
581
582struct NonZeroCounter {
583 explicit NonZeroCounter(const Tensor& tensor) : tensor_(tensor) {}

Callers

nothing calls this directly

Calls 1

is_contiguousMethod · 0.80

Tested by

no test coverage detected