MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / remove

Method remove

arm_compute/core/Dimensions.h:201–214  ·  view source on GitHub ↗

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 */

Source from the content-addressed store, hash-verified

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 *

Callers 2

run_opMethod · 0.80
gather_sourcesFunction · 0.80

Calls 4

fillFunction · 0.85
copyFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected