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

Function TensorCountNonZero

cpp/src/arrow/tensor.cc:606–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604
605template <typename TYPE>
606inline int64_t TensorCountNonZero(const Tensor& tensor) {
607 if (tensor.is_contiguous()) {
608 return ContiguousTensorCountNonZero<TYPE>(tensor);
609 } else {
610 return StridedTensorCountNonZero<TYPE>(0, 0, tensor);
611 }
612}
613
614struct NonZeroCounter {
615 explicit NonZeroCounter(const Tensor& tensor) : tensor_(tensor) {}

Callers

nothing calls this directly

Calls 1

is_contiguousMethod · 0.80

Tested by

no test coverage detected