diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2022-03-03 10:09:01 +0000 |
---|---|---|
committer | Giorgio Arena <giorgio.arena@arm.com> | 2022-03-08 10:41:03 +0000 |
commit | 232c45253a84c16fc70eae6406cac5f4048efaca (patch) | |
tree | 32aa46ed0cb2bdc9877709d0573f45778894fefe /tests/AssetsLibrary.h | |
parent | 4cbcb840caca1346de5f2271b67e4ede17b72734 (diff) | |
download | ComputeLibrary-232c45253a84c16fc70eae6406cac5f4048efaca.tar.gz |
Merge kernel prototype patch
Resolves: COMPMID-5151
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Change-Id: Ic4024d5cd4819fe917a1d49621f1866ae2e90a37
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7260
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/AssetsLibrary.h')
-rw-r--r-- | tests/AssetsLibrary.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h index f465577372..80b9ecbd92 100644 --- a/tests/AssetsLibrary.h +++ b/tests/AssetsLibrary.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 Arm Limited. + * Copyright (c) 2017-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -406,6 +406,17 @@ public: template <typename T, typename DataType> void fill_static_values(T &&tensor, const std::vector<DataType> &values) const; + // Function type to generate a number to fill tensors. + template <typename ResultType> + using GeneratorFunctionType = std::function<ResultType(void)>; + /** Fill a tensor with a value generator function. + * + * @param[in, out] tensor To be filled tensor. + * @param[in] generate_value A function that generates values. + */ + template <typename T, typename ResultType> + void fill_with_generator(T &&tensor, const GeneratorFunctionType<ResultType> &generate_value) const; + private: // Function prototype to convert between image formats. using Converter = void (*)(const RawTensor &src, RawTensor &dst); @@ -413,9 +424,6 @@ private: using Extractor = void (*)(const RawTensor &src, RawTensor &dst); // Function prototype to load an image file. using Loader = RawTensor (*)(const std::string &path); - // Function type to generate a number to fill tensors. - template <typename ResultType> - using GeneratorFunctionType = std::function<ResultType(void)>; const Converter &get_converter(Format src, Format dst) const; const Converter &get_converter(DataType src, Format dst) const; @@ -460,14 +468,6 @@ private: */ const RawTensor &find_or_create_raw_tensor(const std::string &name, Format format, Channel channel) const; - /** Fill a tensor with a value generator function. - * - * @param[in, out] tensor To be filled tensor. - * @param[in] generate_value A function that generates values. - */ - template <typename T, typename ResultType> - void fill_with_generator(T &&tensor, const GeneratorFunctionType<ResultType> &generate_value) const; - mutable TensorCache _cache{}; mutable arm_compute::Mutex _format_lock{}; mutable arm_compute::Mutex _channel_lock{}; |