diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-07-11 15:00:49 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-07-12 09:29:37 +0000 |
commit | e1651a55c637708347c9adda4a77f1deffacf7d2 (patch) | |
tree | ad58c09a1a9b141b17ad108799b70727df3c1667 /src/core/CL/kernels/CLChannelCombineKernel.cpp | |
parent | bffb41e06c1276af00e1605ef934d05fa61f7127 (diff) | |
download | ComputeLibrary-e1651a55c637708347c9adda4a77f1deffacf7d2.tar.gz |
COMPMID-2414 Add add_2D_tensor_argument_if for OpenCL
Change-Id: I8675b4b4face0be9416ae6c7a7023234d50fc0cb
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1524
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLChannelCombineKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLChannelCombineKernel.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/CL/kernels/CLChannelCombineKernel.cpp b/src/core/CL/kernels/CLChannelCombineKernel.cpp index 11cd8ec5d0..126614a599 100644 --- a/src/core/CL/kernels/CLChannelCombineKernel.cpp +++ b/src/core/CL/kernels/CLChannelCombineKernel.cpp @@ -262,11 +262,7 @@ void CLChannelCombineKernel::run(const Window &window, cl::CommandQueue &queue) add_2D_tensor_argument(idx, _planes[0], slice); add_2D_tensor_argument(idx, _planes[1], win_sub_plane1); add_2D_tensor_argument(idx, _planes[2], win_sub_plane2); - - if(nullptr != _planes[3]) - { - add_2D_tensor_argument(idx, _planes[3], slice); - } + add_2D_tensor_argument_if((nullptr != _planes[3]), idx, _planes[3], slice); // Set outputs if(nullptr != _output) // Single planar output @@ -280,11 +276,7 @@ void CLChannelCombineKernel::run(const Window &window, cl::CommandQueue &queue) add_2D_tensor_argument(idx, _output_multi->cl_plane(0), slice); add_2D_tensor_argument(idx, _output_multi->cl_plane(1), win_sub_plane1); - - if(3 == num_planes_from_format(_output_multi->info()->format())) - { - add_2D_tensor_argument(idx, _output_multi->cl_plane(2), win_sub_plane2); - } + add_2D_tensor_argument_if((3 == num_planes_from_format(_output_multi->info()->format())), idx, _output_multi->cl_plane(2), win_sub_plane2); _kernel.setArg(idx++, slice.y().end()); } |