aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/CL/kernels/CLMeanStdDevKernel.h3
-rw-r--r--arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLMeanStdDev.h10
-rw-r--r--arm_compute/runtime/NEON/functions/NEMeanStdDev.h10
4 files changed, 18 insertions, 8 deletions
diff --git a/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h b/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h
index 9f30f76e1b..2c09590dab 100644
--- a/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h
+++ b/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h
@@ -63,12 +63,15 @@ public:
// Inherited methods overridden:
void run(const Window &window, cl::CommandQueue &queue) override;
+ BorderSize border_size() const override;
+
private:
const ICLImage *_input;
float *_mean;
float *_stddev;
cl::Buffer *_global_sum;
cl::Buffer *_global_sum_squared;
+ BorderSize _border_size;
};
}
#endif /* __ARM_COMPUTE_CLMEANSTDDEVKERNEL_H__ */
diff --git a/arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h b/arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h
index 83407ccb7d..9c72b20d58 100644
--- a/arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h
+++ b/arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h
@@ -64,6 +64,8 @@ public:
// Inherited methods overridden:
void run(const Window &window) override;
+ BorderSize border_size() const override;
+
private:
const IImage *_input;
float *_mean;
@@ -71,6 +73,7 @@ private:
uint64_t *_global_sum;
uint64_t *_global_sum_squared;
std::mutex _mtx;
+ BorderSize _border_size;
};
}
#endif /* __ARM_COMPUTE_NEMEANSTDDEVKERNEL_H__ */
diff --git a/arm_compute/runtime/CL/functions/CLMeanStdDev.h b/arm_compute/runtime/CL/functions/CLMeanStdDev.h
index e33bcdd779..7622138236 100644
--- a/arm_compute/runtime/CL/functions/CLMeanStdDev.h
+++ b/arm_compute/runtime/CL/functions/CLMeanStdDev.h
@@ -25,6 +25,7 @@
#define __ARM_COMPUTE_CLMEANSTDDEV_H__
#include "arm_compute/core/CL/OpenCL.h"
+#include "arm_compute/core/CL/kernels/CLFillBorderKernel.h"
#include "arm_compute/core/CL/kernels/CLMeanStdDevKernel.h"
#include "arm_compute/runtime/IFunction.h"
@@ -38,17 +39,18 @@ public:
CLMeanStdDev();
/** Initialise the kernel's inputs and outputs.
*
- * @param[in] input Input image. Data types supported: U8.
- * @param[out] mean Output average pixel value.
- * @param[out] stddev (Optional)Output standard deviation of pixel values.
+ * @param[in, out] input Input image. Data types supported: U8. (Written to only for border filling)
+ * @param[out] mean Output average pixel value.
+ * @param[out] stddev (Optional)Output standard deviation of pixel values.
*/
- void configure(const ICLImage *input, float *mean, float *stddev = nullptr);
+ void configure(ICLImage *input, float *mean, float *stddev = nullptr);
// Inherited methods overridden:
void run() override;
private:
CLMeanStdDevKernel _mean_stddev_kernel; /**< Kernel that standard deviation calculation. */
+ CLFillBorderKernel _fill_border_kernel; /**< Kernel that fills the border with zeroes. */
cl::Buffer _global_sum; /**< Variable that holds the global sum among calls in order to ease reduction */
cl::Buffer _global_sum_squared; /**< Variable that holds the global sum of squared values among calls in order to ease reduction */
};
diff --git a/arm_compute/runtime/NEON/functions/NEMeanStdDev.h b/arm_compute/runtime/NEON/functions/NEMeanStdDev.h
index 3770b2a270..e8bf8dfa3d 100644
--- a/arm_compute/runtime/NEON/functions/NEMeanStdDev.h
+++ b/arm_compute/runtime/NEON/functions/NEMeanStdDev.h
@@ -24,6 +24,7 @@
#ifndef __ARM_COMPUTE_NEMEANSTDDEV_H__
#define __ARM_COMPUTE_NEMEANSTDDEV_H__
+#include "arm_compute/core/NEON/kernels/NEFillBorderKernel.h"
#include "arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
@@ -44,17 +45,18 @@ public:
NEMeanStdDev();
/** Initialise the kernel's inputs and outputs.
*
- * @param[in] input Input image. Data type supported: U8.
- * @param[out] mean Output average pixel value.
- * @param[out] stddev (Optional) Output standard deviation of pixel values.
+ * @param[in, out] input Input image. Data types supported: U8. (Written to only for border filling)
+ * @param[out] mean Output average pixel value.
+ * @param[out] stddev (Optional) Output standard deviation of pixel values.
*/
- void configure(const IImage *input, float *mean, float *stddev = nullptr);
+ void configure(IImage *input, float *mean, float *stddev = nullptr);
// Inherited methods overridden:
void run() override;
private:
NEMeanStdDevKernel _mean_stddev_kernel; /**< Kernel that standard deviation calculation. */
+ NEFillBorderKernel _fill_border_kernel; /**< Kernel that fills tensor's borders with zeroes. */
uint64_t _global_sum; /**< Variable that holds the global sum among calls in order to ease reduction */
uint64_t _global_sum_squared; /**< Variable that holds the global sum of squared values among calls in order to ease reduction */
};