aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/OperatorTensor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/OperatorTensor.cpp')
-rw-r--r--src/runtime/OperatorTensor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/runtime/OperatorTensor.cpp b/src/runtime/OperatorTensor.cpp
index 5a35154479..19415b35cf 100644
--- a/src/runtime/OperatorTensor.cpp
+++ b/src/runtime/OperatorTensor.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Arm Limited.
+ * Copyright (c) 2020-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -22,8 +22,11 @@
* SOFTWARE.
*/
#include "arm_compute/runtime/OperatorTensor.h"
+
#include "arm_compute/runtime/MemoryRegion.h"
+#include "support/Cast.h"
+
namespace arm_compute
{
namespace experimental
@@ -45,10 +48,10 @@ ITensorInfo *OperatorTensor::info()
uint8_t *OperatorTensor::buffer() const
{
- switch(_mem_type)
+ switch (_mem_type)
{
case MemoryType::CPU:
- return (uint8_t *)dynamic_cast<MemoryRegion *>(_memory->region())->buffer();
+ return (uint8_t *)utils::cast::polymorphic_downcast<MemoryRegion *>(_memory->region())->buffer();
default:
ARM_COMPUTE_ERROR("Memory type not supported.");
}