From 0021d750d66d199c411df00cdd8308c325f1fef3 Mon Sep 17 00:00:00 2001 From: Diego Lopez Recas Date: Mon, 18 Dec 2017 14:42:56 +0000 Subject: IVGCVSW-863 Broadcast support in CL/NEON Arithmetic Add Also, added instrumentation to support generic tensor broadcasting for NEON and CL backends. Change-Id: I1bc5747a286e1a4b464c209067581e103d473b9a Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/114201 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- arm_compute/core/Helpers.inl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'arm_compute/core/Helpers.inl') diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl index 6d0f8b0104..8b86c22676 100644 --- a/arm_compute/core/Helpers.inl +++ b/arm_compute/core/Helpers.inl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -123,6 +123,11 @@ inline void execute_window_loop(const Window &w, L &&lambda_function, Ts &&... i { w.validate(); + for(unsigned int i = 0; i < Coordinates::num_max_dimensions; ++i) + { + ARM_COMPUTE_ERROR_ON(w[i].step() == 0); + } + Coordinates id; ForEachDimension::unroll(w, id, std::forward(lambda_function), std::forward(iterators)...); } @@ -136,9 +141,10 @@ inline Iterator::Iterator(const ITensor *tensor, const Window &win) : Iterator() { ARM_COMPUTE_ERROR_ON(tensor == nullptr); - const ITensorInfo *info = tensor->info(); - ARM_COMPUTE_ERROR_ON(info == nullptr); - const Strides &strides = info->strides_in_bytes(); + ARM_COMPUTE_ERROR_ON(tensor->info() == nullptr); + + const ITensorInfo *info = tensor->info(); + const Strides &strides = info->strides_in_bytes(); _ptr = tensor->buffer() + info->offset_first_element_in_bytes(); -- cgit v1.2.1