aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CPP
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/core/CPP')
-rw-r--r--arm_compute/core/CPP/CPPTypes.h7
-rw-r--r--arm_compute/core/CPP/ICPPKernel.h15
-rw-r--r--arm_compute/core/CPP/kernels/CPPCornerCandidatesKernel.h2
-rw-r--r--arm_compute/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.h2
-rw-r--r--arm_compute/core/CPP/kernels/CPPSortEuclideanDistanceKernel.h2
5 files changed, 12 insertions, 16 deletions
diff --git a/arm_compute/core/CPP/CPPTypes.h b/arm_compute/core/CPP/CPPTypes.h
index 4e156ea78e..19036525d5 100644
--- a/arm_compute/core/CPP/CPPTypes.h
+++ b/arm_compute/core/CPP/CPPTypes.h
@@ -47,5 +47,12 @@ enum class CPUTarget
A75 = (ARMV8_2 | A7x | 0x5),
A75_DOT = (A75 | DOT),
};
+
+struct ThreadInfo
+{
+ int thread_id{ 0 };
+ int num_threads{ 1 };
+ CPUTarget cpu{ CPUTarget::INTRINSICS };
+};
}
#endif /* __ARM_COMPUTE_CPP_TYPES_H__ */
diff --git a/arm_compute/core/CPP/ICPPKernel.h b/arm_compute/core/CPP/ICPPKernel.h
index 9684408987..2e5600f5ff 100644
--- a/arm_compute/core/CPP/ICPPKernel.h
+++ b/arm_compute/core/CPP/ICPPKernel.h
@@ -47,20 +47,9 @@ public:
* @note The width of the window has to be a multiple of num_elems_processed_per_iteration().
*
* @param[in] window Region on which to execute the kernel. (Must be a region of the window returned by window())
+ * @param[in] info Info about executing thread and CPU.
*/
- virtual void run(const Window &window) = 0;
-
- /** Sets the target CPU architecture.
- *
- * @param[in] target CPU target.
- */
- void set_target(CPUTarget target)
- {
- _target = target;
- }
-
-protected:
- CPUTarget _target{ CPUTarget::INTRINSICS };
+ virtual void run(const Window &window, const ThreadInfo &info) = 0;
};
}
#endif /*__ARM_COMPUTE_ICPPKERNEL_H__ */
diff --git a/arm_compute/core/CPP/kernels/CPPCornerCandidatesKernel.h b/arm_compute/core/CPP/kernels/CPPCornerCandidatesKernel.h
index 28edb489ad..5309973f5d 100644
--- a/arm_compute/core/CPP/kernels/CPPCornerCandidatesKernel.h
+++ b/arm_compute/core/CPP/kernels/CPPCornerCandidatesKernel.h
@@ -62,7 +62,7 @@ public:
void configure(const IImage *input, InternalKeypoint *output, int32_t *num_corner_candidates);
// Inherited methods overridden:
- void run(const Window &window) override;
+ void run(const Window &window, const ThreadInfo &info) override;
private:
int32_t *_num_corner_candidates; /**< Number of corner candidates */
diff --git a/arm_compute/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.h b/arm_compute/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.h
index bcb3026959..2a9c0473bb 100644
--- a/arm_compute/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.h
+++ b/arm_compute/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.h
@@ -60,7 +60,7 @@ public:
void configure(IDetectionWindowArray *input_output, float min_distance);
// Inherited methods overridden:
- void run(const Window &window) override;
+ void run(const Window &window, const ThreadInfo &info) override;
bool is_parallelisable() const override;
private:
diff --git a/arm_compute/core/CPP/kernels/CPPSortEuclideanDistanceKernel.h b/arm_compute/core/CPP/kernels/CPPSortEuclideanDistanceKernel.h
index b7a7d9ff9f..c6b47a512a 100644
--- a/arm_compute/core/CPP/kernels/CPPSortEuclideanDistanceKernel.h
+++ b/arm_compute/core/CPP/kernels/CPPSortEuclideanDistanceKernel.h
@@ -56,7 +56,7 @@ public:
void configure(InternalKeypoint *in_out, IKeyPointArray *output, const int32_t *num_corner_candidates, float min_distance);
// Inherited methods overridden:
- void run(const Window &window) override;
+ void run(const Window &window, const ThreadInfo &info) override;
bool is_parallelisable() const override;
private: