| 551 | } |
| 552 | |
| 553 | int64_t Tensor::size() const { |
| 554 | return std::accumulate(shape_.begin(), shape_.end(), 1LL, std::multiplies<int64_t>()); |
| 555 | } |
| 556 | |
| 557 | bool Tensor::is_contiguous() const { |
| 558 | return internal::IsTensorStridesContiguous(type_, shape_, strides_); |