(a: &BufferDescriptor, b: &BufferDescriptor)
| 1147 | } |
| 1148 | |
| 1149 | fn is_equiv_shape(a: &BufferDescriptor, b: &BufferDescriptor) -> bool { |
| 1150 | if a.ndim() != b.ndim() { |
| 1151 | return false; |
| 1152 | } |
| 1153 | |
| 1154 | let a_iter = a.dim_desc.iter().map(|x| x.0); |
| 1155 | let b_iter = b.dim_desc.iter().map(|x| x.0); |
| 1156 | for (a_shape, b_shape) in a_iter.zip(b_iter) { |
| 1157 | if a_shape != b_shape { |
| 1158 | return false; |
| 1159 | } |
| 1160 | // if both shape is 0, ignore the rest |
| 1161 | if a_shape == 0 { |
| 1162 | break; |
| 1163 | } |
| 1164 | } |
| 1165 | true |
| 1166 | } |
| 1167 | |
| 1168 | fn is_equiv_format(a: &BufferDescriptor, b: &BufferDescriptor) -> bool { |
| 1169 | // TODO: skip @ |
no test coverage detected