diff options
Diffstat (limited to 'src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp b/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp index 2ca4132b15..6f6019d26a 100644 --- a/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp +++ b/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp @@ -37,7 +37,8 @@ #include "arm_compute/core/Window.h" #include "arm_compute/core/utils/misc/ShapeCalculator.h" -using namespace arm_compute; +namespace arm_compute +{ using namespace arm_compute::misc::shape_calculator; namespace @@ -118,21 +119,7 @@ void CLGEMMReshapeRHSMatrixKernel::configure(const ICLTensor *input, ICLTensor * build_opts.add_option_if(rhs_info.transpose, "-DTRANSPOSE"); build_opts.add_option_if(rhs_info.interleave, "-DINTERLEAVE"); build_opts.add_option("-DSRC_HEIGHT=" + support::cpp11::to_string(input->info()->dimension(1))); - - switch(input->info()->element_size()) - { - case 1: - build_opts.add_option("-DDATA_TYPE=uchar"); - break; - case 2: - build_opts.add_option("-DDATA_TYPE=ushort"); - break; - case 4: - build_opts.add_option("-DDATA_TYPE=uint"); - break; - default: - ARM_COMPUTE_ERROR("Data type not supported"); - } + build_opts.add_option("-DDATA_TYPE=" + get_cl_unsigned_type_from_element_size(input->info()->element_size())); std::string kernel_name("gemm_reshape_rhs_matrix_"); kernel_name += rhs_info.transpose ? "t" : "nt"; @@ -169,4 +156,5 @@ void CLGEMMReshapeRHSMatrixKernel::run(const Window &window, cl::CommandQueue &q enqueue(queue, *this, slice, lws_hint()); } while(window.slide_window_slice_3D(slice)); -}
\ No newline at end of file +} +} // namespace arm_compute
\ No newline at end of file |