aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/core')
-rw-r--r--arm_compute/core/CL/ICLKernel.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arm_compute/core/CL/ICLKernel.h b/arm_compute/core/CL/ICLKernel.h
index 590f8929cb..76b40b81d1 100644
--- a/arm_compute/core/CL/ICLKernel.h
+++ b/arm_compute/core/CL/ICLKernel.h
@@ -111,6 +111,20 @@ public:
{
add_tensor_argument<1>(idx, tensor, window);
}
+ /** Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx if the condition is true.
+ *
+ * @param[in] cond Condition to check
+ * @param[in,out] idx Index at which to start adding the tensor's arguments. Will be incremented by the number of kernel arguments set.
+ * @param[in] tensor Tensor to set as an argument of the object's kernel.
+ * @param[in] window Window the kernel will be executed on.
+ */
+ void add_1D_tensor_argument_if(bool cond, unsigned int &idx, const ICLTensor *tensor, const Window &window)
+ {
+ if(cond)
+ {
+ add_1D_tensor_argument(idx, tensor, window);
+ }
+ }
/** Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx.
*
* @param[in,out] idx Index at which to start adding the tensor's arguments. Will be incremented by the number of kernel arguments set.
@@ -121,6 +135,20 @@ public:
{
add_tensor_argument<2>(idx, tensor, window);
}
+ /** Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx if the condition is true.
+ *
+ * @param[in] cond Condition to check
+ * @param[in,out] idx Index at which to start adding the tensor's arguments. Will be incremented by the number of kernel arguments set.
+ * @param[in] tensor Tensor to set as an argument of the object's kernel.
+ * @param[in] window Window the kernel will be executed on.
+ */
+ void add_2D_tensor_argument_if(bool cond, unsigned int &idx, const ICLTensor *tensor, const Window &window)
+ {
+ if(cond)
+ {
+ add_2D_tensor_argument(idx, tensor, window);
+ }
+ }
/** Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx.
*
* @param[in,out] idx Index at which to start adding the tensor's arguments. Will be incremented by the number of kernel arguments set.