aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLFloorKernel.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-03-26 10:31:32 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-04-08 09:12:09 +0000
commit11d4918b2321d1e590124f44dd68e6cda223dbdc (patch)
tree059b20480d2e5e22604cb852e5cb12fc2bfb0afd /src/core/CL/kernels/CLFloorKernel.cpp
parentf64d33619827ce6ec9af4566c4743834e521328e (diff)
downloadComputeLibrary-11d4918b2321d1e590124f44dd68e6cda223dbdc.tar.gz
COMPMID-3279: Create CLCompiler interface
Change-Id: Ic9dd5288d72a690651aa03d474f2bfd6e1ebe8b2 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2957 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLFloorKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLFloorKernel.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/CL/kernels/CLFloorKernel.cpp b/src/core/CL/kernels/CLFloorKernel.cpp
index 8f0043f08a..abfed8d18e 100644
--- a/src/core/CL/kernels/CLFloorKernel.cpp
+++ b/src/core/CL/kernels/CLFloorKernel.cpp
@@ -77,7 +77,7 @@ CLFloorKernel::CLFloorKernel()
{
}
-void CLFloorKernel::configure(const ICLTensor *input, ICLTensor *output)
+void CLFloorKernel::configure(CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
{
ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
@@ -90,13 +90,13 @@ void CLFloorKernel::configure(const ICLTensor *input, ICLTensor *output)
_input = input;
_output = output;
- const unsigned int num_elems_processed_per_iteration = 16 / input->info()->element_size();
-
- // Create kernel
+ const unsigned int num_elems_processed_per_iteration = 16 / input->info()->element_size();
std::set<std::string> build_opts;
build_opts.emplace(("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type())));
build_opts.emplace(("-DVEC_SIZE=" + support::cpp11::to_string(num_elems_processed_per_iteration)));
- _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("floor_layer", build_opts));
+
+ // Create kernel
+ _kernel = create_kernel(compile_context, "floor_layer", build_opts);
// Configure kernel window
auto win_config = validate_and_configure_window(input->info(), output->info());
@@ -104,6 +104,11 @@ void CLFloorKernel::configure(const ICLTensor *input, ICLTensor *output)
ICLKernel::configure_internal(win_config.second);
}
+void CLFloorKernel::configure(const ICLTensor *input, ICLTensor *output)
+{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
Status CLFloorKernel::validate(const ITensorInfo *input, const ITensorInfo *output)
{
ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output));