From 4406fd6cc4abded564d3791324e1f48bdfd34273 Mon Sep 17 00:00:00 2001 From: Frank Lei Date: Thu, 1 Feb 2018 14:47:14 +0800 Subject: APPBROWSER-391: Fix GLES COMPUTE alignment issues APPBROWSER-402: Performance optimization for squeezenet/xray model Change-Id: If31b186b99a6d6087164019fe94d3ac9279e3204 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/119526 Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- arm_compute/core/GLES_COMPUTE/IGCTensor.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'arm_compute/core/GLES_COMPUTE/IGCTensor.h') diff --git a/arm_compute/core/GLES_COMPUTE/IGCTensor.h b/arm_compute/core/GLES_COMPUTE/IGCTensor.h index ab4e57e0ce..7329864b85 100644 --- a/arm_compute/core/GLES_COMPUTE/IGCTensor.h +++ b/arm_compute/core/GLES_COMPUTE/IGCTensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -75,6 +75,18 @@ public: */ virtual GLuint gc_buffer() const = 0; + /** Flag indicating whether the tensor has been left aligned by a kernel and therefore needs shifting. + * + * @return True if the tensor is left aligned. + */ + bool needs_shifting() const; + /** Set the flag indicating whether or not a tensor needs shifting. + * + * @param[in] needs_shifting Indicates if the tensor is left aligned or not. + * + */ + void set_needs_shifting(bool needs_shifting); + protected: /** Method to be implemented by the child class to map the SSBO. * @@ -92,6 +104,7 @@ protected: private: uint8_t *_mapping; + bool _needs_shifting; }; using IGCImage = IGCTensor; -- cgit v1.2.1