| 402 | struct ToShapeFunc { |
| 403 | template <Layout T> |
| 404 | bool operator()() const { |
| 405 | for (int i = 0; i < StrongShape<L>::size(); ++i) { |
| 406 | int index = GetAxisIndex<T>(StrongShape<L>::axis(i)); |
| 407 | if (index < 0) return false; |
| 408 | shape->set(i, l.dimensions[index]); |
| 409 | } |
| 410 | return true; |
| 411 | } |
| 412 | |
| 413 | StrongShape<L>* shape; |
| 414 | const Shape& l; |