| 2033 | } |
| 2034 | |
| 2035 | std::vector<operation> optimize_shape_transforms(const std::vector<std::size_t>& dims, |
| 2036 | const std::vector<operation>& ops) |
| 2037 | { |
| 2038 | auto sd = shape_transform_descriptor::create(dims, ops); |
| 2039 | if(sd.empty()) |
| 2040 | return ops; |
| 2041 | return sd.generate(); |
| 2042 | } |
| 2043 | |
| 2044 | // Replace broadcasted dimensions with size 1, and set the stride to the previous stride |
| 2045 | static shape unbroadcast(const shape& s) |
no test coverage detected