diff options
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLFloorKernel.cpp | 15 |
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)); |