diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-09-08 19:47:30 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | baf174e85ddb5399355281cd34d0f459d92124a7 (patch) | |
tree | d69904df66f7e5ad55edd268d16735542445f36f /arm_compute/core | |
parent | 1c8409d7ce90ea449437076574c98a4ea90d9368 (diff) | |
download | ComputeLibrary-baf174e85ddb5399355281cd34d0f459d92124a7.tar.gz |
COMPMID-485: Memory Manager
Change-Id: Ib421b7622838f050038cd81e7426bb1413a7d6e6
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87376
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
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) ? |