| 572 | |
| 573 | template <typename TYPE> |
| 574 | inline 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 | |
| 582 | struct NonZeroCounter { |
| 583 | explicit NonZeroCounter(const Tensor& tensor) : tensor_(tensor) {} |
nothing calls this directly
no test coverage detected