Remove dimension of a given index * * @note If index is greater than the number of dimensions no operation is performed * * @param[in] idx Dimension index to remove */
| 199 | * @param[in] idx Dimension index to remove |
| 200 | */ |
| 201 | void remove(size_t idx) |
| 202 | { |
| 203 | ARM_COMPUTE_ERROR_ON(_num_dimensions < 1); |
| 204 | if (idx >= _num_dimensions) |
| 205 | { |
| 206 | return; |
| 207 | } |
| 208 | |
| 209 | std::copy(_id.begin() + idx + 1, _id.end(), _id.begin() + idx); |
| 210 | _num_dimensions--; |
| 211 | |
| 212 | // Make sure all empty dimensions are filled with 0 |
| 213 | std::fill(_id.begin() + _num_dimensions, _id.end(), 0); |
| 214 | } |
| 215 | |
| 216 | /** Returns a read/write iterator that points to the first element in the dimension array. |
| 217 | * |