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

Function permute

arm_compute/core/Helpers.h:148–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146 */
147template <typename T>
148inline void permute(Dimensions<T> &dimensions, const PermutationVector &perm)
149{
150 auto dimensions_copy = utility::make_array<Dimensions<T>::num_max_dimensions>(dimensions.begin(), dimensions.end());
151 for (unsigned int i = 0; i < perm.num_dimensions(); ++i)
152 {
153 T dimension_val = (perm[i] < dimensions.num_dimensions()) ? dimensions_copy[perm[i]] : 0;
154 dimensions.set(i, dimension_val);
155 }
156}
157
158/** Permutes given TensorShape according to a permutation vector
159 *

Callers 10

fill_tensorMethod · 0.50
permute_shapeFunction · 0.50
get_dst_shapeFunction · 0.50
validateMethod · 0.50
validateMethod · 0.50
validateMethod · 0.50
validateMethod · 0.50
configure_outputMethod · 0.50

Calls 4

beginMethod · 0.45
endMethod · 0.45
num_dimensionsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected