diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2019-09-17 08:59:09 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-09-30 15:33:01 +0000 |
commit | cecb0a75a9de0a12d30f8fabbe16a656c722afa1 (patch) | |
tree | 9517b7fd1fa31126c5fbd3e66f4fb9c7e0b9af1b /arm_compute/core/utils/misc/Utility.h | |
parent | 879d1313ba69d9ced8424f54ffeea6a3c60496f0 (diff) | |
download | ComputeLibrary-cecb0a75a9de0a12d30f8fabbe16a656c722afa1.tar.gz |
COMPMID-2637 [CL] fix broadcast pixel-wise multiplication with 5D tensors
Broadcast pixel-wise multiplication with 5D tensors is fixed
by adding information whether a dimension has been broadcasted
to compute correct start offset when adding 3D tensor argument.
The testcase that failed is added to the validation test suite.
Change-Id: I320876f507012c27b39daae1316f9b69138ed204
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1994
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/utils/misc/Utility.h')
-rw-r--r-- | arm_compute/core/utils/misc/Utility.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arm_compute/core/utils/misc/Utility.h b/arm_compute/core/utils/misc/Utility.h index 8dd9afd5cd..2325644e72 100644 --- a/arm_compute/core/utils/misc/Utility.h +++ b/arm_compute/core/utils/misc/Utility.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -53,6 +53,20 @@ struct index_sequence_generator<0u, S...> : index_sequence<S...> template <std::size_t N> using index_sequence_t = typename index_sequence_generator<N>::type; + +template <typename T, std::size_t N, T val, T... vals> +struct generate_array : generate_array < T, N - 1, val, val, vals... > +{ +}; + +template <typename T, T val, T... vals> +struct generate_array<T, 0, val, vals...> +{ + static constexpr std::array<T, sizeof...(vals)> value{ vals... }; +}; + +template <typename T, T val, T... vals> +constexpr std::array<T, sizeof...(vals)> generate_array<T, 0, val, vals...>::value; /** @endcond */ namespace detail |