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

Function TensorCountNonZero

cpp/src/arrow/tensor.cc:514–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512
513template <typename TYPE>
514inline int64_t TensorCountNonZero(const Tensor& tensor) {
515 if (tensor.is_contiguous()) {
516 return ContiguousTensorCountNonZero<TYPE>(tensor);
517 } else {
518 return StridedTensorCountNonZero<TYPE>(0, 0, tensor);
519 }
520}
521
522struct NonZeroCounter {
523 explicit NonZeroCounter(const Tensor& tensor) : tensor_(tensor) {}

Callers

nothing calls this directly

Calls 1

is_contiguousMethod · 0.80

Tested by

no test coverage detected