| 512 | |
| 513 | template <typename TYPE> |
| 514 | inline 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 | |
| 522 | struct NonZeroCounter { |
| 523 | explicit NonZeroCounter(const Tensor& tensor) : tensor_(tensor) {} |
nothing calls this directly
no test coverage detected