aboutsummaryrefslogtreecommitdiff
path: root/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
diff options
context:
space:
mode:
authorJoel Liang <joel.liang@arm.com>2017-11-10 09:59:19 +0800
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitf1f3ebd517089e934cf3f06e64d90619a395ad87 (patch)
tree8dac05909b5f522a1c78e0ac4423cb6f65254391 /src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
parent283c1790da45ab562ecfb2aa7741297191886d85 (diff)
downloadComputeLibrary-f1f3ebd517089e934cf3f06e64d90619a395ad87.tar.gz
APPBROWSER-298, APPBROWSER-306: Reimplement the common code of compute shader
The new common code of compute shader is in file helpers_cs.h Rewrite the direct_convolution1x1.cs and softmax_layer.cs to use the new common code. It will also remove the dependence of the token pasting operator (##). We'll remove the "##" support after we rewrite all of the compute shader code. Change-Id: Icd8553ef6b61ad484a8507590ac8ed499bd47061 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95455 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Frank Lei <frank.lei@arm.com> (cherry picked from commit 0a4f83570d261f839d9866b68979efe8d7a95883) Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95601 Reviewed-by: Jim He <jim.he@arm.com>
Diffstat (limited to 'src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp')
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
index 36742ef81e..b4efc0b9a0 100644
--- a/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
+++ b/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
@@ -54,7 +54,7 @@ void GCFillBorderKernel::set_constant_border(unsigned int idx, const PixelValue
{
T value;
constant_border_value.get(value);
- _kernel.set_params(idx, static_cast<T>(value));
+ _kernel.set_argument(idx, static_cast<T>(value));
}
void GCFillBorderKernel::configure(const IGCTensor *tensor, BorderSize border_size, BorderMode border_mode, const PixelValue &constant_border_value)
@@ -112,8 +112,6 @@ void GCFillBorderKernel::configure(const IGCTensor *tensor, BorderSize border_si
_kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name, build_opts));
_tensor = tensor;
- _kernel.clear_params();
-
// Create static kernel arguments
const unsigned int valid_width = tensor->info()->valid_region().shape[0];
const unsigned int valid_height = tensor->info()->valid_region().shape[1];
@@ -121,10 +119,10 @@ void GCFillBorderKernel::configure(const IGCTensor *tensor, BorderSize border_si
// Set static kernel arguments
unsigned int idx = num_arguments_per_3D_tensor(); //Skip the tensor parameters
- _kernel.set_params(idx++, valid_width);
- _kernel.set_params(idx++, valid_height);
- _kernel.set_params(idx++, tensor->info()->valid_region().anchor[0]);
- _kernel.set_params(idx++, tensor->info()->valid_region().anchor[1]);
+ _kernel.set_argument(idx++, valid_width);
+ _kernel.set_argument(idx++, valid_height);
+ _kernel.set_argument(idx++, tensor->info()->valid_region().anchor[0]);
+ _kernel.set_argument(idx++, tensor->info()->valid_region().anchor[1]);
if(BorderMode::CONSTANT == border_mode)
{
@@ -137,8 +135,6 @@ void GCFillBorderKernel::configure(const IGCTensor *tensor, BorderSize border_si
win.set(Window::DimY, Window::Dimension(0, 1, 1));
win.use_tensor_dimensions(tensor->info()->tensor_shape(), Window::DimZ);
- _kernel.set_shader_params_binding_point(0);
-
IGCKernel::configure(win);
}