| 519 | } |
| 520 | |
| 521 | int64_t Tensor::size() const { |
| 522 | return std::accumulate(shape_.begin(), shape_.end(), 1LL, std::multiplies<int64_t>()); |
| 523 | } |
| 524 | |
| 525 | bool Tensor::is_contiguous() const { |
| 526 | return internal::IsTensorStridesContiguous(type_, shape_, strides_); |