From 2899e00a6fa57242a9bcae1d08a9a7e1e80f14e7 Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Tue, 16 Apr 2019 14:32:25 +0100 Subject: COMPMID-2049: Add support for deconvolution for qasymm8 on NEON Change-Id: I02890c7542f6036edad9cbba9fdcf2312c70070a Signed-off-by: Usama Arif Reviewed-on: https://review.mlplatform.org/c/1000 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- src/core/CPP/kernels/CPPUpsampleKernel.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/CPP/kernels/CPPUpsampleKernel.cpp b/src/core/CPP/kernels/CPPUpsampleKernel.cpp index d77d9c118f..f04728d30d 100644 --- a/src/core/CPP/kernels/CPPUpsampleKernel.cpp +++ b/src/core/CPP/kernels/CPPUpsampleKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -73,14 +73,15 @@ void CPPUpsampleKernel::run(const Window &window, const ThreadInfo &info) ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICPPKernel::window(), window); // Initialize _scaled_output buffer - const int width_scaled = _output->info()->dimension(0); - const int height_scaled = _output->info()->dimension(1); - const int stride_x = _info.stride().first; - const int stride_y = _info.stride().second; - const int start_x = _info.pad().first; - const int start_y = _inner_border.second + _info.pad().second; - const int end_y = height_scaled - _info.pad().second; - const int end_x = width_scaled - _inner_border.first - _info.pad().first; + const int width_scaled = _output->info()->dimension(0); + const int height_scaled = _output->info()->dimension(1); + const int stride_x = _info.stride().first; + const int stride_y = _info.stride().second; + const int start_x = _info.pad().first; + const int start_y = _inner_border.second + _info.pad().second; + const int end_y = height_scaled - _info.pad().second; + const int end_x = width_scaled - _inner_border.first - _info.pad().first; + const size_t element_size = _input->info()->element_size(); std::fill_n(_output->buffer(), _output->info()->total_size(), 0); @@ -95,7 +96,7 @@ void CPPUpsampleKernel::run(const Window &window, const ThreadInfo &info) execute_window_loop(window, [&](const Coordinates & id) { - *(reinterpret_cast(out.ptr())) = *(reinterpret_cast(in.ptr())); + memcpy(out.ptr(), in.ptr(), element_size); }, in, out); } -- cgit v1.2.1