aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/Permute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/reference/Permute.cpp')
-rw-r--r--tests/validation/reference/Permute.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/validation/reference/Permute.cpp b/tests/validation/reference/Permute.cpp
index 29c3c5cda8..619a787a05 100644
--- a/tests/validation/reference/Permute.cpp
+++ b/tests/validation/reference/Permute.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -47,11 +47,11 @@ SimpleTensor<T> permute(const SimpleTensor<T> &src, PermutationVector perm)
// Compute reference
for(int i = 0; i < src.num_elements(); ++i)
{
- Coordinates coord = index2coord(src.shape(), i);
- permute(coord, perm);
- const size_t dst_index = coord2index(dst.shape(), coord);
+ const Coordinates src_coords = index2coord(src.shape(), i);
+ Coordinates dst_coords = src_coords;
+ permute(dst_coords, perm);
- dst[dst_index] = src[i];
+ std::copy_n(static_cast<const T *>(src(src_coords)), src.num_channels(), static_cast<T *>(dst(dst_coords)));
}
return dst;