diff options
Diffstat (limited to 'src/core/CL/kernels/CLDerivativeKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLDerivativeKernel.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/CL/kernels/CLDerivativeKernel.cpp b/src/core/CL/kernels/CLDerivativeKernel.cpp index 0a247f9071..e6d694d875 100644 --- a/src/core/CL/kernels/CLDerivativeKernel.cpp +++ b/src/core/CL/kernels/CLDerivativeKernel.cpp @@ -142,16 +142,8 @@ void CLDerivativeKernel::run(const Window &window, cl::CommandQueue &queue) { unsigned int idx = 0; add_2D_tensor_argument(idx, _input, slice); - - if(_run_derivative_x) - { - add_2D_tensor_argument(idx, _output_x, slice); - } - - if(_run_derivative_y) - { - add_2D_tensor_argument(idx, _output_y, slice); - } + add_2D_tensor_argument_if((_run_derivative_x), idx, _output_x, slice); + add_2D_tensor_argument_if((_run_derivative_y), idx, _output_y, slice); enqueue(queue, *this, slice, lws_hint()); } |