Initialize the kernel's input, output.
72{
73
74 ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
75 ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(
input->info(),
output->info()));
76
79
80 constexpr unsigned int num_elems_processed_per_iteration = 16;
81
82
83 std::set<std::string> build_opts;
84 build_opts.emplace((
"-DDATA_TYPE=" + get_cl_type_from_data_type(
input->info()->data_type())));
85 build_opts.emplace(
86 ("-DVEC_SIZE=" + support::cpp11::to_string(num_elems_processed_per_iteration)));
87 _kernel =
89
90
91 Window win = calculate_max_window(*
input->info(), Steps(num_elems_processed_per_iteration));
92
93 AccessWindowHorizontal input_access(
input->info(), 0, num_elems_processed_per_iteration);
94 AccessWindowHorizontal output_access(
output->info(), 0, num_elems_processed_per_iteration);
95 update_window_and_padding(win, input_access, output_access);
96 output_access.set_valid_region(win,
input->info()->valid_region());
97
98 ICLKernel::configure_internal(win);
99}
static CLKernelLibraryEx & get()
Get the KernelLibrary singleton.
Kernel create_kernel(const std::string &kernel_name, const StringSet &build_options_set={}) const
Create a kernel from the kernel library.