| 551 | } |
| 552 | |
| 553 | bool shape::scalar() const |
| 554 | { |
| 555 | if(this->dynamic()) |
| 556 | { |
| 557 | return false; |
| 558 | } |
| 559 | assert(this->lens().size() == this->strides().size()); |
| 560 | // if any stride > 0, then accumulate will return false |
| 561 | return this->sub_shapes().empty() and |
| 562 | std::accumulate(this->strides().begin(), this->strides().end(), std::size_t(0)) == 0; |
| 563 | } |
| 564 | |
| 565 | bool shape::standard() const { return impl->m_standard; } |
| 566 |