diff options
author | Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> | 2023-09-27 17:46:17 +0100 |
---|---|---|
committer | felixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> | 2023-09-28 12:08:05 +0000 |
commit | afd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch) | |
tree | 03bc7d5a762099989b16a656fa8d397b490ed70e /src/gpu/cl/utils/ClAuxTensorHandler.h | |
parent | bdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff) | |
download | ComputeLibrary-afd38f0c617d6f89b2b4532c6c44f116617e2b6f.tar.gz |
Apply clang-format on repository
Code is formatted as per a revised clang format configuration
file(not part of this delivery). Version 14.0.6 is used.
Exclusion List:
- files with .cl extension
- files that are not strictly C/C++ (e.g. Android.bp, Sconscript ...)
And the following directories
- compute_kernel_writer/validation/
- tests/
- include/
- src/core/NEON/kernels/convolution/
- src/core/NEON/kernels/arm_gemm/
- src/core/NEON/kernels/arm_conv/
- data/
There will be a follow up for formatting of .cl files and the
files under tests/ and compute_kernel_writer/validation/.
Signed-off-by: Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>
Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Diffstat (limited to 'src/gpu/cl/utils/ClAuxTensorHandler.h')
-rw-r--r-- | src/gpu/cl/utils/ClAuxTensorHandler.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gpu/cl/utils/ClAuxTensorHandler.h b/src/gpu/cl/utils/ClAuxTensorHandler.h index af383489a1..81dc3baef4 100644 --- a/src/gpu/cl/utils/ClAuxTensorHandler.h +++ b/src/gpu/cl/utils/ClAuxTensorHandler.h @@ -39,25 +39,26 @@ namespace opencl class CLAuxTensorHandler { public: - CLAuxTensorHandler(int slot_id, TensorInfo &info, ITensorPack &pack, bool pack_inject = false, bool bypass_alloc = false) + CLAuxTensorHandler( + int slot_id, TensorInfo &info, ITensorPack &pack, bool pack_inject = false, bool bypass_alloc = false) : _tensor() { - if(info.total_size() == 0) + if (info.total_size() == 0) { return; } _tensor.allocator()->soft_init(info); ICLTensor *packed_tensor = utils::cast::polymorphic_downcast<ICLTensor *>(pack.get_tensor(slot_id)); - if((packed_tensor == nullptr) || (info.total_size() > packed_tensor->info()->total_size())) + if ((packed_tensor == nullptr) || (info.total_size() > packed_tensor->info()->total_size())) { - if(!bypass_alloc) + if (!bypass_alloc) { _tensor.allocator()->allocate(); ARM_COMPUTE_LOG_INFO_WITH_FUNCNAME_ACL("Allocating auxiliary tensor"); } - if(pack_inject) + if (pack_inject) { pack.add_tensor(slot_id, &_tensor); _injected_tensor_pack = &pack; @@ -70,22 +71,21 @@ public: } } - CLAuxTensorHandler(TensorInfo &info, ICLTensor &tensor) - : _tensor() + CLAuxTensorHandler(TensorInfo &info, ICLTensor &tensor) : _tensor() { _tensor.allocator()->soft_init(info); - if(info.total_size() <= tensor.info()->total_size()) + if (info.total_size() <= tensor.info()->total_size()) { _tensor.allocator()->import_memory(tensor.cl_buffer()); } } - CLAuxTensorHandler(const CLAuxTensorHandler &) = delete; + CLAuxTensorHandler(const CLAuxTensorHandler &) = delete; CLAuxTensorHandler &operator=(const CLAuxTensorHandler) = delete; ~CLAuxTensorHandler() { - if(_injected_tensor_pack) + if (_injected_tensor_pack) { _injected_tensor_pack->remove_tensor(_injected_slot_id); } @@ -103,9 +103,9 @@ public: private: CLTensor _tensor{}; - ITensorPack *_injected_tensor_pack{ nullptr }; - int _injected_slot_id{ TensorType::ACL_UNKNOWN }; + ITensorPack *_injected_tensor_pack{nullptr}; + int _injected_slot_id{TensorType::ACL_UNKNOWN}; }; } // namespace opencl } // namespace arm_compute -#endif /* ARM_COMPUTE_CL_UTILS_CL_AUX_TENSOR_HANDLER_H */
\ No newline at end of file +#endif /* ARM_COMPUTE_CL_UTILS_CL_AUX_TENSOR_HANDLER_H */ |