|
1 | 1 | /* |
2 | | - * Copyright (c) 2016-2021, 2023-2025 Arm Limited. |
| 2 | + * Copyright (c) 2016-2021, 2023-2026 Arm Limited. |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: MIT |
5 | 5 | * |
|
38 | 38 | #include "arm_compute/core/Window.h" |
39 | 39 |
|
40 | 40 | #include <algorithm> |
| 41 | +#include <array> |
| 42 | +#include <type_traits> |
| 43 | +#include <utility> |
41 | 44 |
|
42 | 45 | namespace arm_compute |
43 | 46 | { |
@@ -778,7 +781,7 @@ void error_on_format_not_in( |
778 | 781 |
|
779 | 782 | ARM_COMPUTE_ERROR_ON_LOC(object_format == Format::UNKNOWN, function, file, line); |
780 | 783 |
|
781 | | - const std::array<F, sizeof...(Fs)> formats_array{{std::forward<Fs>(formats)...}}; |
| 784 | + const std::array<std::decay_t<F>, sizeof...(Fs)> formats_array{{std::forward<Fs>(formats)...}}; |
782 | 785 | ARM_COMPUTE_UNUSED(formats_array); |
783 | 786 |
|
784 | 787 | ARM_COMPUTE_ERROR_ON_LOC_MSG( |
@@ -810,7 +813,7 @@ inline arm_compute::Status error_on_data_type_not_in( |
810 | 813 | const DataType &tensor_dt = tensor_info->data_type(); //NOLINT |
811 | 814 | ARM_COMPUTE_RETURN_ERROR_ON_LOC(tensor_dt == DataType::UNKNOWN, function, file, line); |
812 | 815 |
|
813 | | - const std::array<T, sizeof...(Ts)> dts_array{{std::forward<Ts>(dts)...}}; |
| 816 | + const std::array<std::decay_t<T>, sizeof...(Ts)> dts_array{{std::forward<Ts>(dts)...}}; |
814 | 817 | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG_VAR( |
815 | 818 | tensor_dt != dt && std::none_of(dts_array.begin(), dts_array.end(), [&](const T &d) { return d == tensor_dt; }), |
816 | 819 | function, file, line, "ITensor data type %s not supported by this kernel", |
@@ -862,7 +865,7 @@ inline arm_compute::Status error_on_data_layout_not_in( |
862 | 865 | const DataLayout &tensor_dl = tensor_info->data_layout(); //NOLINT |
863 | 866 | ARM_COMPUTE_RETURN_ERROR_ON_LOC(tensor_dl == DataLayout::UNKNOWN, function, file, line); |
864 | 867 |
|
865 | | - const std::array<T, sizeof...(Ts)> dls_array{{std::forward<Ts>(dls)...}}; |
| 868 | + const std::array<std::decay_t<T>, sizeof...(Ts)> dls_array{{std::forward<Ts>(dls)...}}; |
866 | 869 | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG_VAR( |
867 | 870 | tensor_dl != dl && std::none_of(dls_array.begin(), dls_array.end(), [&](const T &l) { return l == tensor_dl; }), |
868 | 871 | function, file, line, "ITensor data layout %s not supported by this kernel", |
@@ -1041,7 +1044,7 @@ error_on_channel_not_in(const char *function, const char *file, const int line, |
1041 | 1044 | { |
1042 | 1045 | ARM_COMPUTE_RETURN_ERROR_ON_LOC(cn == Channel::UNKNOWN, function, file, line); |
1043 | 1046 |
|
1044 | | - const std::array<T, sizeof...(Ts)> channels_array{{std::forward<Ts>(channels)...}}; |
| 1047 | + const std::array<std::decay_t<T>, sizeof...(Ts)> channels_array{{std::forward<Ts>(channels)...}}; |
1045 | 1048 | ARM_COMPUTE_RETURN_ERROR_ON_LOC(channel != cn && std::none_of(channels_array.begin(), channels_array.end(), |
1046 | 1049 | [&](const T &f) { return f == cn; }), |
1047 | 1050 | function, file, line); |
|
0 commit comments