| 17 | { |
| 18 | |
| 19 | bool NextIndex(const unsigned int numDims, const armnn::TensorShape& dims, std::vector<unsigned int>& current) |
| 20 | { |
| 21 | unsigned int carry = 1; |
| 22 | |
| 23 | for (unsigned int idx = numDims; idx-- > 0; ) |
| 24 | { |
| 25 | unsigned int current_val = current[idx] + carry; |
| 26 | if (dims[idx] == current_val) |
| 27 | { |
| 28 | current[idx] = 0; |
| 29 | } |
| 30 | else |
| 31 | { |
| 32 | current[idx] = current_val; |
| 33 | carry = 0; |
| 34 | break; |
| 35 | } |
| 36 | } |
| 37 | return (carry == 0); |
| 38 | } |
| 39 | |
| 40 | unsigned int ReducedOutputOffset(const unsigned int numDims, |
| 41 | const armnn::TensorShape& dims, |