aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/graph')
-rw-r--r--arm_compute/graph/INode.h13
-rw-r--r--arm_compute/graph/NodeContext.h4
-rw-r--r--arm_compute/graph/nodes/BatchNormalizationLayer.h1
3 files changed, 15 insertions, 3 deletions
diff --git a/arm_compute/graph/INode.h b/arm_compute/graph/INode.h
index 56b50b9424..1969423074 100644
--- a/arm_compute/graph/INode.h
+++ b/arm_compute/graph/INode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -58,6 +58,16 @@ public:
* @return The updated target hint
*/
TargetHint override_target_hint(TargetHint target_hint) const;
+ /** Method to check if the node supports in-place operations.
+ *
+ * @return True if the node supports in-place operations, false otherwise.
+ */
+ virtual bool supports_in_place() const;
+ /** Set the value of the _supports_in_place attribute.
+ *
+ * @param[in] value Boolean value to assign to _supports_in_place.
+ */
+ void set_supports_in_place(bool value);
protected:
/** Interface to be implement that override the hints
@@ -70,6 +80,7 @@ protected:
protected:
TargetHint _target_hint{ TargetHint::DONT_CARE };
+ bool _supports_in_place{ false };
};
} // namespace graph
} // namespace arm_compute
diff --git a/arm_compute/graph/NodeContext.h b/arm_compute/graph/NodeContext.h
index bc90f217a7..17ae49740b 100644
--- a/arm_compute/graph/NodeContext.h
+++ b/arm_compute/graph/NodeContext.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -60,7 +60,7 @@ public:
* @param[in] input Input to add
*/
void add_input(arm_compute::ITensor *input);
- /** Adds and output to the context
+ /** Adds an output to the context
*
* @param[in] output Output to add
*/
diff --git a/arm_compute/graph/nodes/BatchNormalizationLayer.h b/arm_compute/graph/nodes/BatchNormalizationLayer.h
index 266c3905d8..abbf09a54e 100644
--- a/arm_compute/graph/nodes/BatchNormalizationLayer.h
+++ b/arm_compute/graph/nodes/BatchNormalizationLayer.h
@@ -51,6 +51,7 @@ public:
BatchNormalizationLayer(AccessorType &&mean, AccessorType &&var, AccessorType &&gamma, AccessorType &&beta, float epsilon, ActivationLayerInfo act_info = ActivationLayerInfo())
: _mean(std::move(mean)), _var(std::move(var)), _gamma(std::move(gamma)), _beta(std::move(beta)), _epsilon(epsilon), _act_info(act_info)
{
+ set_supports_in_place(true);
}
// Inherited methods overriden: