diff options
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/CL/OpenCL.h | 2 | ||||
-rw-r--r-- | arm_compute/core/Helpers.inl | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/arm_compute/core/CL/OpenCL.h b/arm_compute/core/CL/OpenCL.h index bea9743f48..562f30bf14 100644 --- a/arm_compute/core/CL/OpenCL.h +++ b/arm_compute/core/CL/OpenCL.h @@ -57,6 +57,7 @@ public: using clBuildProgram_func = cl_int (*)(cl_program, cl_uint, const cl_device_id *, const char *, void (*pfn_notify)(cl_program, void *), void *); using clEnqueueNDRangeKernel_func = cl_int (*)(cl_command_queue, cl_kernel, cl_uint, const size_t *, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *); using clSetKernelArg_func = cl_int (*)(cl_kernel, cl_uint, size_t, const void *); + using clRetainMemObject_func = cl_int (*)(cl_mem); using clReleaseMemObject_func = cl_int (*)(cl_mem); using clEnqueueUnmapMemObject_func = cl_int (*)(cl_command_queue, cl_mem, void *, cl_uint, const cl_event *, cl_event *); using clRetainCommandQueue_func = cl_int (*)(cl_command_queue command_queue); @@ -106,6 +107,7 @@ public: clReleaseContext_func clReleaseContext = nullptr; clRetainCommandQueue_func clRetainCommandQueue = nullptr; clEnqueueUnmapMemObject_func clEnqueueUnmapMemObject = nullptr; + clRetainMemObject_func clRetainMemObject = nullptr; clReleaseMemObject_func clReleaseMemObject = nullptr; clGetDeviceInfo_func clGetDeviceInfo = nullptr; clGetDeviceIDs_func clGetDeviceIDs = nullptr; diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl index 90a4618fcc..e20bdb58a1 100644 --- a/arm_compute/core/Helpers.inl +++ b/arm_compute/core/Helpers.inl @@ -311,9 +311,13 @@ inline ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, con Coordinates anchor; anchor.set_num_dimensions(src_info.tensor_shape().num_dimensions()); TensorShape new_dst_shape(dst_shape); - anchor.set(0, (policy == InterpolationPolicy::BILINEAR && border_undefined) ? ((static_cast<int>(src_info.valid_region().anchor[0]) + border_size.left + 0.5f) * wr - 0.5f) : + anchor.set(0, (policy == InterpolationPolicy::BILINEAR + && border_undefined) ? + ((static_cast<int>(src_info.valid_region().anchor[0]) + border_size.left + 0.5f) * wr - 0.5f) : ((static_cast<int>(src_info.valid_region().anchor[0]) + 0.5f) * wr - 0.5f)); - anchor.set(1, (policy == InterpolationPolicy::BILINEAR && border_undefined) ? ((static_cast<int>(src_info.valid_region().anchor[1]) + border_size.top + 0.5f) * hr - 0.5f) : + anchor.set(1, (policy == InterpolationPolicy::BILINEAR + && border_undefined) ? + ((static_cast<int>(src_info.valid_region().anchor[1]) + border_size.top + 0.5f) * hr - 0.5f) : ((static_cast<int>(src_info.valid_region().anchor[1]) + 0.5f) * hr - 0.5f)); float shape_out_x = (policy == InterpolationPolicy::BILINEAR && border_undefined) ? |