| 604 | |
| 605 | template <typename TYPE> |
| 606 | inline 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 | |
| 614 | struct NonZeroCounter { |
| 615 | explicit NonZeroCounter(const Tensor& tensor) : tensor_(tensor) {} |
nothing calls this directly
no test coverage detected