| 459 | } |
| 460 | |
| 461 | int64_t Tensor::size() const { |
| 462 | return std::accumulate(shape_.begin(), shape_.end(), 1LL, std::multiplies<int64_t>()); |
| 463 | } |
| 464 | |
| 465 | bool Tensor::is_contiguous() const { |
| 466 | return internal::IsTensorStridesContiguous(type_, shape_, strides_); |