38 : _min(nullptr), _max(nullptr), _aspect_ratios(nullptr)
49 _min = cl::Buffer(
CLScheduler::get().context(), CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE, info.
min_sizes().size() *
sizeof(float));
50 _aspect_ratios = cl::Buffer(
CLScheduler::get().context(), CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE, info.
aspect_ratios().size() *
sizeof(float));
53 _max = cl::Buffer(
CLScheduler::get().context(), CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE, info.
max_sizes().size() *
sizeof(float));
56 auto k = std::make_unique<CLPriorBoxLayerKernel>();
57 k->configure(compile_context, input1, input2, output, info, &_min, &_max, &_aspect_ratios);
58 _kernel = std::move(k);
void configure(const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output, const PriorBoxLayerInfo &info)
Set the input and output tensors.
CLPriorBoxLayer()
Constructor.
static CLScheduler & get()
Access the scheduler singleton.
std::vector< float > aspect_ratios() const
Get aspect ratios.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const PriorBoxLayerInfo &info)
Static function to check if given info will lead to a valid configuration of CLPriorBoxLayerKernel.
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const PriorBoxLayerInfo &info)
Static function to check if given info will lead to a valid configuration of CLPriorBoxLayer.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Interface for OpenCL tensor.
std::vector< float > max_sizes() const
Get max sizes.
std::vector< float > min_sizes() const
Get min sizes.