aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2021-02-16 15:15:19 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-02-23 18:21:55 +0000
commitceaa0bfe219631b5a4e638613f90f9fa47a3defe (patch)
tree3bb878645ae7509f7807197d320a02882ad84751
parentc40562d4467e3a68b0dac5e865570c8f38d1487e (diff)
downloadComputeLibrary-ceaa0bfe219631b5a4e638613f90f9fa47a3defe.tar.gz
Remove OpenGL ES support
Remove the following: - Relevant backend kernels - Relevant backend functions - Relevant backend validation tests - Relevant backend specific examples - Remove backend support from Graph API - Remove backend support from build system Update documentation Resolves: COMPMID-4149 Change-Id: Id0621d6ee35169754de458103907aaba4ef770c0 Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5097 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
-rw-r--r--SConscript20
-rw-r--r--SConstruct15
-rw-r--r--arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h63
-rw-r--r--arm_compute/core/GLES_COMPUTE/GCHelpers.h58
-rw-r--r--arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h271
-rw-r--r--arm_compute/core/GLES_COMPUTE/GCKernels.h54
-rw-r--r--arm_compute/core/GLES_COMPUTE/IGCKernel.h165
-rw-r--r--arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h41
-rw-r--r--arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h43
-rw-r--r--arm_compute/core/GLES_COMPUTE/IGCSimpleKernel.h66
-rw-r--r--arm_compute/core/GLES_COMPUTE/IGCTensor.h113
-rw-r--r--arm_compute/core/GLES_COMPUTE/OpenGLES.h165
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h71
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h74
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h82
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h98
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h92
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h74
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h77
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h92
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h79
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h77
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h80
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h64
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h70
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h92
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h67
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h128
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h72
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h84
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h70
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h85
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h52
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h109
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h84
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h52
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h90
-rw-r--r--arm_compute/core/Types.h6
-rw-r--r--arm_compute/graph/backends/GLES/GCDeviceBackend.h64
-rw-r--r--arm_compute/graph/backends/GLES/GCFunctionFactory.h57
-rw-r--r--arm_compute/graph/backends/GLES/GCNodeValidator.h52
-rw-r--r--arm_compute/graph/backends/GLES/GCTensorHandle.h72
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h49
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCFunctions.h51
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCHelpers.h39
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCMemory.h85
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h108
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h63
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCScheduler.h107
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCTensor.h106
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h128
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h63
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h55
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h70
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h67
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h71
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h71
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h161
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h78
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h83
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h66
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h56
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h116
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h116
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h52
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h49
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h76
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h78
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h53
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h79
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h54
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h79
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h54
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h52
-rw-r--r--docs/00_introduction.dox108
-rw-r--r--docs/06_functions_list.dox31
-rw-r--r--docs/ComputeLibrary.dir53
-rw-r--r--docs/Doxyfile1
-rw-r--r--examples/SConscript9
-rw-r--r--examples/gc_absdiff.cpp127
-rw-r--r--examples/gc_dc.cpp132
-rw-r--r--include/linux/EGL/egl.h303
-rw-r--r--include/linux/EGL/eglext.h804
-rw-r--r--include/linux/EGL/eglplatform.h121
-rw-r--r--include/linux/GLES/gl.h770
-rw-r--r--include/linux/GLES/glext.h1278
-rw-r--r--include/linux/GLES/glplatform.h30
-rw-r--r--include/linux/GLES2/gl2.h620
-rw-r--r--include/linux/GLES2/gl2ext.h1809
-rw-r--r--include/linux/GLES2/gl2platform.h30
-rw-r--r--include/linux/GLES3/gl3.h1061
-rw-r--r--include/linux/GLES3/gl31.h1187
-rw-r--r--include/linux/GLES3/gl3ext.h24
-rw-r--r--include/linux/GLES3/gl3platform.h30
-rw-r--r--include/linux/KHR/khrplatform.h273
-rw-r--r--scripts/include_functions_kernels.py6
-rw-r--r--src/core/GLES_COMPUTE/GCCoreRuntimeContext.cpp42
-rw-r--r--src/core/GLES_COMPUTE/GCHelpers.cpp50
-rw-r--r--src/core/GLES_COMPUTE/GCKernelLibrary.cpp559
-rw-r--r--src/core/GLES_COMPUTE/IGCKernel.cpp150
-rw-r--r--src/core/GLES_COMPUTE/IGCSimple2DKernel.cpp51
-rw-r--r--src/core/GLES_COMPUTE/IGCSimple3DKernel.cpp52
-rw-r--r--src/core/GLES_COMPUTE/IGCSimpleKernel.cpp55
-rw-r--r--src/core/GLES_COMPUTE/IGCTensor.cpp64
-rw-r--r--src/core/GLES_COMPUTE/OpenGLES.cpp826
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/absdiff.cs60
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/activation_layer.cs150
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h130
-rwxr-xr-xsrc/core/GLES_COMPUTE/cs_shaders/arithmetic_add.cs65
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/batchnormalization_layer.cs266
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/concatenate.cs72
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/convolution_layer.cs791
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/depthwise_convolution3x3.cs316
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/direct_convolution1x1.cs1057
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/direct_convolution3x3.cs1155
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/direct_convolution5x5.cs225
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/dropout.cs148
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/fill_border.cs498
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/gemm.cs1130
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/helpers_cs.h498
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/normalization_layer.cs106
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/normalize_planar_yuv_layer.cs99
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/pixelwise_mul_float.cs58
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs1052
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/scale.cs136
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/softmax_layer.cs363
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/tensor_shift.cs134
-rwxr-xr-xsrc/core/GLES_COMPUTE/cs_shaders/transpose.cs234
-rw-r--r--src/core/GLES_COMPUTE/egl_entries.in35
-rw-r--r--src/core/GLES_COMPUTE/gl_entries.in64
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.cpp108
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp136
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.cpp161
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp247
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCCol2ImKernel.cpp126
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.cpp114
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp252
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp450
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.cpp109
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp168
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp127
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.cpp131
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.cpp103
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp338
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp127
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp304
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.cpp123
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.cpp169
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.cpp125
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp374
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCScaleKernel.cpp173
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp278
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.cpp107
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp145
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.cpp143
-rw-r--r--src/graph/backends/GLES/GCDeviceBackend.cpp163
-rw-r--r--src/graph/backends/GLES/GCFunctionsFactory.cpp275
-rw-r--r--src/graph/backends/GLES/GCNodeValidator.cpp147
-rw-r--r--src/graph/backends/GLES/GCTensorHandle.cpp103
-rw-r--r--src/runtime/GLES_COMPUTE/GCBufferAllocator.cpp59
-rw-r--r--src/runtime/GLES_COMPUTE/GCHelpers.cpp85
-rw-r--r--src/runtime/GLES_COMPUTE/GCMemory.cpp81
-rw-r--r--src/runtime/GLES_COMPUTE/GCMemoryRegion.cpp96
-rw-r--r--src/runtime/GLES_COMPUTE/GCRuntimeContext.cpp67
-rw-r--r--src/runtime/GLES_COMPUTE/GCScheduler.cpp142
-rw-r--r--src/runtime/GLES_COMPUTE/GCTensor.cpp83
-rw-r--r--src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp104
-rw-r--r--src/runtime/GLES_COMPUTE/IGCSimpleFunction.cpp47
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.cpp39
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCActivationLayer.cpp44
-rwxr-xr-xsrc/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.cpp44
-rwxr-xr-xsrc/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.cpp49
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.cpp81
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp240
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp73
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp84
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCDropoutLayer.cpp50
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCFillBorder.cpp39
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.cpp193
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp211
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.cpp35
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.cpp37
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp66
-rwxr-xr-xsrc/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.cpp54
-rwxr-xr-xsrc/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.cpp38
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp64
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCScale.cpp40
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.cpp81
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCTensorShift.cpp39
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCTranspose.cpp37
-rw-r--r--tests/GLES_COMPUTE/GCAccessor.h148
-rw-r--r--tests/GLES_COMPUTE/Helper.h94
-rw-r--r--tests/SConscript10
-rw-r--r--tests/Utils.h17
-rw-r--r--tests/benchmark/GLES_COMPUTE/Scale.cpp58
-rw-r--r--tests/benchmark_examples/RunExample.cpp3
-rw-r--r--tests/framework/ParametersLibrary.cpp9
-rw-r--r--tests/framework/ParametersLibrary.h14
-rw-r--r--tests/framework/SConscript5
-rw-r--r--tests/main.cpp17
-rw-r--r--tests/validate_examples/RunExample.cpp5
-rw-r--r--tests/validation/GLES_COMPUTE/ActivationLayer.cpp132
-rw-r--r--tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp72
-rw-r--r--tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp92
-rw-r--r--tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp125
-rw-r--r--tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp91
-rw-r--r--tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp90
-rw-r--r--tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp112
-rw-r--r--tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp91
-rw-r--r--tests/validation/GLES_COMPUTE/DropoutLayer.cpp82
-rw-r--r--tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp111
-rw-r--r--tests/validation/GLES_COMPUTE/GEMM.cpp85
-rw-r--r--tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp86
-rw-r--r--tests/validation/GLES_COMPUTE/NormalizationLayer.cpp87
-rw-r--r--tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp106
-rw-r--r--tests/validation/GLES_COMPUTE/PoolingLayer.cpp139
-rw-r--r--tests/validation/GLES_COMPUTE/Scale.cpp110
-rw-r--r--tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp107
-rw-r--r--tests/validation/GLES_COMPUTE/Transpose.cpp81
-rw-r--r--tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp105
-rw-r--r--tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp98
-rw-r--r--tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h1
-rw-r--r--utils/Utils.h24
223 files changed, 52 insertions, 35356 deletions
diff --git a/SConscript b/SConscript
index d5faa9d900..c89abef81c 100644
--- a/SConscript
+++ b/SConscript
@@ -156,15 +156,6 @@ if env['opencl'] and env['embed_kernels']:
generate_embed.append(arm_compute_env.Command(embed_files, cl_files, action=resolve_includes))
-if env['gles_compute'] and env['embed_kernels']:
- cs_files = Glob('src/core/GLES_COMPUTE/cs_shaders/*.cs')
- cs_files += Glob('src/core/GLES_COMPUTE/cs_shaders/*.h')
-
- embed_files = [ f.get_path()+"embed" for f in cs_files ]
- arm_compute_env.Append(CPPPATH =[Dir("./src/core/GLES_COMPUTE/").path] )
-
- generate_embed.append(arm_compute_env.Command(embed_files, cs_files, action=resolve_includes))
-
Default(generate_embed)
if env["build"] == "embed_only":
Return()
@@ -302,17 +293,6 @@ if env['neon']:
runtime_files += Glob('src/runtime/cpu/*.cpp')
runtime_files += Glob('src/runtime/cpu/operators/*.cpp')
-if env['gles_compute']:
- if env['os'] != 'android':
- arm_compute_env.Append(CPPPATH = ["#opengles-3.1/include", "#opengles-3.1/mali_include"])
-
- core_files += Glob('src/core/GLES_COMPUTE/*.cpp')
- core_files += Glob('src/core/GLES_COMPUTE/kernels/*.cpp')
-
- runtime_files += Glob('src/runtime/GLES_COMPUTE/*.cpp')
- runtime_files += Glob('src/runtime/GLES_COMPUTE/functions/*.cpp')
-
- graph_files += Glob('src/graph/backends/GLES/*.cpp')
if env['tracing']:
arm_compute_env.Append(CPPDEFINES = ['ARM_COMPUTE_TRACING_ENABLED'])
else:
diff --git a/SConstruct b/SConstruct
index 5d86ac3434..8892626b90 100644
--- a/SConstruct
+++ b/SConstruct
@@ -54,7 +54,6 @@ vars.AddVariables(
BoolVariable("standalone", "Builds the tests as standalone executables, links statically with libgcc, libstdc++ and libarm_compute", False),
BoolVariable("opencl", "Enable OpenCL support", True),
BoolVariable("neon", "Enable Neon support", False),
- BoolVariable("gles_compute", "Enable OpenGL ES Compute Shader support", False),
BoolVariable("embed_kernels", "Embed OpenCL kernels and OpenGL ES compute shaders in library binary", True),
BoolVariable("compress_kernels", "Compress embedded OpenCL kernels in library binary. Note embed_kernels should be enabled", False),
BoolVariable("set_soname", "Set the library's soname and shlibversion (requires SCons 2.4 or above)", False),
@@ -142,8 +141,8 @@ if env['opencl'] and env['embed_kernels'] and env['compress_kernels'] and env['o
Exit(1)
if not env['exceptions']:
- if env['opencl'] or env['gles_compute']:
- print("ERROR: OpenCL and GLES are not supported when building without exceptions. Use opencl=0 gles_compute=0")
+ if env['opencl']:
+ print("ERROR: OpenCL is not supported when building without exceptions. Use opencl=0")
Exit(1)
env.Append(CPPDEFINES = ['ARM_COMPUTE_EXCEPTIONS_DISABLED'])
@@ -346,15 +345,10 @@ if env['opencl']:
print("Cannot link OpenCL statically, which is required for bare metal / standalone builds")
Exit(1)
-if env['gles_compute']:
- if env['os'] in ['bare_metal'] or env['standalone']:
- print("Cannot link OpenGLES statically, which is required for bare metal / standalone builds")
- Exit(1)
-
if env["os"] not in ["android", "bare_metal"] and (env['opencl'] or env['cppthreads']):
env.Append(LIBS = ['pthread'])
-if env['opencl'] or env['gles_compute']:
+if env['opencl']:
if env['embed_kernels']:
env.Append(CPPDEFINES = ['EMBEDDED_KERNELS'])
if env['compress_kernels']:
@@ -388,9 +382,6 @@ for dirname in os.listdir("./include"):
Export('version_at_least')
-if env['gles_compute'] and env['os'] != 'android':
- env.Append(CPPPATH = ['#/include/linux'])
-
SConscript('./SConscript', variant_dir=build_path, duplicate=0)
if env['examples'] and env['exceptions']:
diff --git a/arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h b/arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h
deleted file mode 100644
index 5c8f5d0132..0000000000
--- a/arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCCORERUNTIME_CONTEXT_H
-#define ARM_COMPUTE_GCCORERUNTIME_CONTEXT_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-
-namespace arm_compute
-{
-// Forward declarations
-class GCKernelLibrary;
-
-/** Core runtime context for OpenGL ES */
-class GCCoreRuntimeContext final
-{
-public:
- /** Legacy constructor */
- GCCoreRuntimeContext();
-
- /** Constructor */
- GCCoreRuntimeContext(GCKernelLibrary *kernel_lib);
- /** Destructor */
- ~GCCoreRuntimeContext() = default;
- /** Default copy constructor */
- GCCoreRuntimeContext(const GCCoreRuntimeContext &) = default;
- /** Default move constructor */
- GCCoreRuntimeContext(GCCoreRuntimeContext &&) = default;
- /** Default copy assignment */
- GCCoreRuntimeContext &operator=(const GCCoreRuntimeContext &) = default;
- /** Default move assignment operator */
- GCCoreRuntimeContext &operator=(GCCoreRuntimeContext &&) = default;
- /** Kernel Library accessor
- *
- * @return The kernel library instance used by the core context
- */
- GCKernelLibrary *kernel_library() const;
-
-private:
- GCKernelLibrary *_kernel_lib{ nullptr };
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCCORERUNTIME_CONTEXT_H */
diff --git a/arm_compute/core/GLES_COMPUTE/GCHelpers.h b/arm_compute/core/GLES_COMPUTE/GCHelpers.h
deleted file mode 100644
index 194d49d38d..0000000000
--- a/arm_compute/core/GLES_COMPUTE/GCHelpers.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCHELPERS_H
-#define ARM_COMPUTE_GCHELPERS_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/GPUTarget.h"
-#include "arm_compute/core/Helpers.h"
-
-#include <set>
-#include <string>
-
-namespace arm_compute
-{
-// Forward declarations
-class GCCoreRuntimeContext;
-
-/** Max vector width of an GLES vector */
-static constexpr unsigned int max_gc_vector_width = 16;
-
-/** Helper function to get the GPU target from GLES using GL_RENDERER enum
- *
- * @return the GPU target
- */
-GPUTarget get_target_from_device();
-/** Creates an GLES kernel
- *
- * @param[in] ctx A context to be used to create the GLES kernel.
- * @param[in] kernel_name The kernel name.
- * @param[in] build_opts The build options to be used for the GLES kernel compilation.
- *
- * @return A GLES kernel
- */
-GCKernel create_opengl_kernel(GCCoreRuntimeContext *ctx, const std::string &kernel_name, const std::set<std::string> &build_opts);
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCHELPERS_H */
diff --git a/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h b/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h
deleted file mode 100644
index 8ecdd194bf..0000000000
--- a/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (c) 2017-2021 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCKERNELLIBRARY_H
-#define ARM_COMPUTE_GCKERNELLIBRARY_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Utils.h"
-
-#include <map>
-#include <set>
-#include <string>
-#include <utility>
-#include <vector>
-
-namespace arm_compute
-{
-/** GCProgram class */
-class GCProgram final
-{
-public:
- /** Default constructor. */
- GCProgram();
- /** Construct program from source file.
- *
- * @param[in] name Program name.
- * @param[in] source Program source.
- */
- GCProgram(std::string name, std::string source);
- /** Default Copy Constructor. */
- GCProgram(const GCProgram &) = default;
- /** Default Move Constructor. */
- GCProgram(GCProgram &&) = default;
- /** Default copy assignment operator */
- GCProgram &operator=(const GCProgram &) = default;
- /** Default move assignment operator */
- GCProgram &operator=(GCProgram &&) = default;
- /** Returns program name.
- *
- * @return Program's name.
- */
- std::string name() const
- {
- return _name;
- }
- /** Link program.
- *
- * @param[in] shader Shader used to link program.
- *
- * @return linked program id .
- */
- GLuint link_program(GLuint shader);
- /** Compile shader.
- *
- * @param[in] build_options Shader build options.
- *
- * @return GLES shader object.
- */
- GLuint compile_shader(const std::string &build_options);
-
-private:
- std::string _name; /**< Program name. */
- std::string _source; /**< Source code for the program. */
-};
-
-/** GCKernel class */
-class GCKernel final
-{
-public:
- /** Default Constructor. */
- GCKernel();
- /** Default Copy Constructor. */
- GCKernel(const GCKernel &) = default;
- /** Default Move Constructor. */
- GCKernel(GCKernel &&) = default;
- /** Default copy assignment operator */
- GCKernel &operator=(const GCKernel &) = default;
- /** Default move assignment operator */
- GCKernel &operator=(GCKernel &&) = default;
- /** Constructor.
- *
- * @param[in] name Kernel name.
- * @param[in] program Built program.
- */
- GCKernel(std::string name, GLuint program);
- /** Destructor.
- */
- ~GCKernel();
- /** Returns kernel name.
- *
- * @return Kernel's name.
- */
- std::string name() const
- {
- return _name;
- }
- /** Get program id.
- *
- * @return program id.
- */
- GLuint get_program() const
- {
- return _program;
- }
- /** Use current program.
- *
- * @return program id.
- */
- void use();
- /** Unuse current program.
- *
- * @return program id.
- */
- void unuse();
- /** Set argument value at index of shader params.
- *
- * @param[in] idx Index in shader params.
- * @param[in] value Argument value to be set.
- */
- template <class T>
- void set_argument(unsigned int idx, T value)
- {
- if(idx >= _shader_arguments.size())
- {
- _shader_arguments.resize(idx + 1, 0);
- }
-
- unsigned int *p = reinterpret_cast<unsigned int *>(&value);
- _shader_arguments[idx] = *p;
- }
- /** Clear shader arguments.
- *
- */
- void clear_arguments()
- {
- _shader_arguments.clear();
- }
- /** Set shader params binding point.
- *
- * @param[in] binding Shader params binding point.
- */
- void set_shader_params_binding_point(unsigned int binding)
- {
- _shader_params_binding_point = binding;
- }
- /** Update shader params.
- *
- */
- void update_shader_params();
- /** Clean up program and ubo.
- *
- */
- void cleanup();
-
-private:
- std::string _name; /**< Kernel name */
- GLuint _program; /**< Linked program id */
- std::vector<unsigned int> _shader_arguments; /**< Store all the values of the shader arguments */
- GLuint _shader_params_ubo_name; /**< Uniform buffer object name for shader parameters */
- GLuint _shader_params_binding_point; /**< The binding point of the uniform block for shader parameters */
- GLuint _shader_params_index; /**< The index of the uniform block */
- GLint _shader_params_size; /**< The uniform block data size in the shader */
- static constexpr const char *_shader_params_name = "shader_params"; /**< The uniform block name in the shader */
-};
-
-/** GCKernelLibrary class */
-class GCKernelLibrary final
-{
- using StringSet = std::set<std::string>;
-
-public:
- /** Default Constructor. */
- GCKernelLibrary();
- /** Default Destructor */
- ~GCKernelLibrary();
- /** Prevent instances of this class from being copied */
- GCKernelLibrary(const GCKernelLibrary &) = delete;
- /** Prevent instances of this class from being copied */
- const GCKernelLibrary &operator=(const GCKernelLibrary &) = delete;
- /** Get the static instance of @ref GCKernelLibrary.
- * This method has been deprecated and will be removed in future releases.
- * @return The static instance of GCKernelLibrary.
- */
- static GCKernelLibrary &get();
- /** Initialises the kernel library.
- *
- * @param[in] shader_path (Optional) Path of the directory from which shader sources are loaded.
- * @param[in] dpy (Optional) EGLdisplay set by external application.
- * @param[in] ctx (Optional) EGLContext set by external application.
- */
- void init(std::string shader_path = "./", EGLDisplay dpy = EGL_NO_DISPLAY, EGLContext ctx = EGL_NO_CONTEXT);
- /** Sets the path that the shaders reside in.
- *
- * @param[in] shader_path Path of the shader.
- */
- void set_shader_path(const std::string &shader_path);
- /** Sets display and context to create kernel.
- *
- * @param[in] dpy EGLdisplay set by external application.
- * @param[in] ctx EGLContext set by external application.
- */
- void set_context(EGLDisplay dpy, EGLContext ctx);
- /** Creates a kernel from the kernel library.
- *
- * @param[in] shader_name Shader name.
- * @param[in] build_options_set Shader build options as a set.
- *
- * @return The created kernel.
- */
- GCKernel create_kernel(const std::string &shader_name, const StringSet &build_options_set = {}) const;
- /** Serializes and saves programs to a binary. */
- void save_binary();
- /** Load serialized binary with all the programs. */
- void load_binary();
- /** Setup a dummy fbo to workaround an issue on Galaxy S8. */
- void setup_dummy_fbo();
-
-private:
- /** Preprocess GLES shader
- *
- * @param[in] shader_source Source code of the shader to preprocess.
- *
- * @return Preprocessed GLES shader object.
- */
- std::string preprocess_shader(const std::string &shader_source) const;
- /** Load program and its dependencies.
- *
- * @param[in] program_name Name of the program to load.
- */
- const GCProgram &load_program(const std::string &program_name) const;
- /** Concatenates contents of a set into a single string.
- *
- * @param[in] s Input set to concatenate.
- *
- * @return Concatenated string.
- */
- std::string stringify_set(const StringSet &s) const;
-
- EGLDisplay _display; /**< Underlying EGL Display. */
- EGLContext _context; /**< Underlying EGL Context. */
- GLuint _frame_buffer; /**< Dummy fbo */
- GLuint _tex_rt; /**< Dummy texture for render target */
- std::string _shader_path; /**< Path to the shaders folder. */
- mutable std::map<std::string, const GCProgram> _programs_map; /**< Map with all already loaded program data. */
- mutable std::map<std::string, const GCKernel> _built_programs_map; /**< Map with all already built program data. */
- static const std::map<std::string, std::string> _shader_program_map; /**< Map that associates kernel names with programs. */
- static const std::map<std::string, std::string> _program_source_map; /**< Contains sources for all programs.
- Used for compile-time shader inclusion. */
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCKERNELLIBRARY_H */
diff --git a/arm_compute/core/GLES_COMPUTE/GCKernels.h b/arm_compute/core/GLES_COMPUTE/GCKernels.h
deleted file mode 100644
index 1b94ae3dda..0000000000
--- a/arm_compute/core/GLES_COMPUTE/GCKernels.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCKERNELS_H
-#define ARM_COMPUTE_GCKERNELS_H
-
-/* Header regrouping all the GLES compute kernels */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h"
-
-#endif /* ARM_COMPUTE_GCKERNELS_H */
diff --git a/arm_compute/core/GLES_COMPUTE/IGCKernel.h b/arm_compute/core/GLES_COMPUTE/IGCKernel.h
deleted file mode 100644
index 7891b98aea..0000000000
--- a/arm_compute/core/GLES_COMPUTE/IGCKernel.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_IGCKERNEL_H
-#define ARM_COMPUTE_IGCKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/GPUTarget.h"
-
-#include "arm_compute/core/IKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-class Window;
-
-/** Common interface for all the GLES kernels */
-class IGCKernel : public IKernel
-{
-public:
- /** Constructor */
- IGCKernel();
- /** Returns a reference to the GLES kernel of this object.
- *
- * @return A reference to the GLES kernel of this object.
- */
- GCKernel &kernel();
-
- /** Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx.
- *
- * @param[in] idx Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0.
- * @param[in] tensor Tensor to set as an argument of the object's kernel.
- * @param[in] binding_point Tensor's binding point in this kernel.
- * @param[in] window Window the kernel will be executed on.
- */
- void add_1D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window);
-
- /** Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx.
- *
- * @param[in] idx Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0.
- * @param[in] tensor Tensor to set as an argument of the object's kernel.
- * @param[in] binding_point Tensor's binding point in this kernel.
- * @param[in] window Window the kernel will be executed on.
- */
- void add_2D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window);
-
- /** Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx.
- *
- * @param[in] idx Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0.
- * @param[in] tensor Tensor to set as an argument of the object's kernel.
- * @param[in] binding_point Tensor's binding point in this kernel.
- * @param[in] window Window the kernel will be executed on.
- */
- void add_3D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window);
-
- /** Returns the number of arguments enqueued per 1D tensor object.
- *
- * @return The number of arguments enqueues per 1D tensor object.
- */
- unsigned int num_arguments_per_1D_tensor() const;
- /** Returns the number of arguments enqueued per 2D tensor object.
- *
- * @return The number of arguments enqueues per 2D tensor object.
- */
- unsigned int num_arguments_per_2D_tensor() const;
- /** Returns the number of arguments enqueued per 3D tensor object.
- *
- * @return The number of arguments enqueues per 3D tensor object.
- */
- unsigned int num_arguments_per_3D_tensor() const;
- /** Enqueue the OpenGL ES shader to process the given window
- *
- * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()).
- */
- virtual void run(const Window &window) = 0;
-
- /** Set the Local-Workgroup-Size hint
- *
- * @note This method should be called after the configuration of the kernel
- *
- * @param[in] lws_hint Local-Workgroup-Size to use
- */
- void set_lws_hint(gles::NDRange &lws_hint)
- {
- _lws_hint = lws_hint;
- }
-
- /** Set the targeted GPU architecture
- *
- * @param[in] target The targeted GPU architecture
- */
- void set_target(GPUTarget target)
- {
- _target = target;
- }
-
- /** Get the targeted GPU architecture
- *
- * @return The targeted GPU architecture.
- */
- GPUTarget get_target() const
- {
- return _target;
- }
-
-private:
- /** Add the passed tensor's parameters to the object's kernel's arguments starting from the index idx.
- *
- * @param[in] idx Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0.
- * @param[in] tensor Tensor to set as an argument of the object's kernel.
- * @param[in] binding_point Tensor's binding point in this kernel.
- * @param[in] window Window the kernel will be executed on.
- */
- template <unsigned int dimension_size>
- void add_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window);
-
- /** Returns the number of arguments enqueued per tensor object.
- *
- * @return The number of arguments enqueued per tensor object.
- */
- template <unsigned int dimension_size>
- unsigned int num_arguments_per_tensor() const;
-
-protected:
- GCKernel _kernel; /**< GLES kernel to run */
- gles::NDRange _lws_hint; /**< Local workgroup size hint for the GLES kernel */
- GPUTarget _target; /**< The targeted GPU */
-};
-
-/** Add the kernel to the command queue with the given window.
- *
- * @note Depending on the size of the window, this might translate into several jobs being enqueued.
- *
- * @note If kernel->kernel() is empty then the function will return without adding anything to the queue.
- *
- * @param[in] kernel Kernel to enqueue
- * @param[in] window Window the kernel has to process.
- * @param[in] lws Local workgroup size requested, by default (1, 1, 1)
- *
- * @note If any dimension of the lws is greater than the global workgroup size then no lws will be passed.
- */
-void enqueue(IGCKernel &kernel, const Window &window, const gles::NDRange &lws = gles::NDRange(1U, 1U, 1U));
-}
-#endif /*ARM_COMPUTE_IGCKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h b/arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h
deleted file mode 100644
index 3b2cfa19dd..0000000000
--- a/arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_IGCSIMPLE2DKERNEL_H
-#define ARM_COMPUTE_IGCSIMPLE2DKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCSimpleKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for simple OpenGL ES kernels having 1 tensor input and 1 tensor output. This interface can be used when the work-item processes a 2D tile */
-class IGCSimple2DKernel : public IGCSimpleKernel
-{
-public:
- // Inherited methods overridden:
- void run(const Window &window) override;
-};
-}
-#endif /*ARM_COMPUTE_IGCSIMPLE2DKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h b/arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h
deleted file mode 100644
index 9ccd135023..0000000000
--- a/arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_IGCSIMPLE3DKERNEL_H
-#define ARM_COMPUTE_IGCSIMPLE3DKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for simple GLES kernels having 1 tensor input and 1 tensor output.
- * Both input tensor and output tensor must have at least 3 dimensions.
- */
-class IGCSimple3DKernel : public IGCSimple2DKernel
-{
-public:
- // Inherited methods overridden:
- void run(const Window &window) override;
-};
-}
-#endif /*ARM_COMPUTE_IGCSIMPLE3DKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/IGCSimpleKernel.h b/arm_compute/core/GLES_COMPUTE/IGCSimpleKernel.h
deleted file mode 100644
index e49941db04..0000000000
--- a/arm_compute/core/GLES_COMPUTE/IGCSimpleKernel.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2016-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_IGCSIMPLEKERNEL_H
-#define ARM_COMPUTE_IGCSIMPLEKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-
-namespace arm_compute
-{
-/** Interface for simple OpenGL ES kernels having 1 tensor input and 1 tensor output */
-class IGCSimpleKernel : public IGCKernel
-{
-public:
- /** Constructor. */
- IGCSimpleKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCSimpleKernel(const IGCSimpleKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCSimpleKernel &operator=(const IGCSimpleKernel &) = delete;
- /** Allow instances of this class to be moved */
- IGCSimpleKernel(IGCSimpleKernel &&) = default;
- /** Allow instances of this class to be moved */
- IGCSimpleKernel &operator=(IGCSimpleKernel &&) = default;
- /** Default destructor */
- ~IGCSimpleKernel() = default;
-
- /** Configure the kernel
- *
- * @param[in] input Source tensor.
- * @param[out] output Destination tensor.
- * @param[in] num_elems_processed_per_iteration Number of processed elements per iteration.
- * @param[in] border_undefined (Optional) True if the border mode is undefined. False if it's replicate or constant.
- * @param[in] border_size (Optional) Size of the border.
- */
- void configure(const IGCTensor *input, IGCTensor *output, unsigned int num_elems_processed_per_iteration, bool border_undefined = false, const BorderSize &border_size = BorderSize());
-
-protected:
- const IGCTensor *_input;
- IGCTensor *_output;
-};
-}
-
-#endif /*ARM_COMPUTE_IGCSIMPLEKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/IGCTensor.h b/arm_compute/core/GLES_COMPUTE/IGCTensor.h
deleted file mode 100644
index 080947d9e5..0000000000
--- a/arm_compute/core/GLES_COMPUTE/IGCTensor.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_IGCTENSOR_H
-#define ARM_COMPUTE_IGCTENSOR_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/ITensor.h"
-
-#include <cstdint>
-
-namespace arm_compute
-{
-/** Interface for GLES Compute tensor */
-class IGCTensor : public ITensor
-{
-public:
- /** Default constructor. */
- IGCTensor();
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCTensor(const IGCTensor &) = delete;
-
- /** Prevent instances of this class from being copy assigned (As this class contains pointers) */
- IGCTensor &operator=(const IGCTensor &) = delete;
-
- /** Allow instances of this class to be moved */
- IGCTensor(IGCTensor &&) = default;
-
- /** Allow instances of this class to be moved */
- IGCTensor &operator=(IGCTensor &&) = default;
-
- /** Virtual destructor */
- virtual ~IGCTensor() = default;
-
- /** Map on an allocated buffer.
- *
- * @param[in] blocking (Optional) If true, then the mapping will be ready to use by the time
- * this method returns, else it is the caller's responsibility
- * to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer.
- */
- void map(bool blocking = true);
- /** Unmap an allocated and mapped buffer.
- */
- void unmap();
- /** Clear the contents of the tensor synchronously.
- */
- void clear();
-
- // Inherited methods overridden:
- uint8_t *buffer() const override;
- /** Interface to be implemented by the child class to return the tensor's gles compute buffer id.
- *
- * @return A SSBO buffer id.
- */
- virtual GLuint gc_buffer() const = 0;
-
- /** Flag indicating whether the tensor has been left aligned by a kernel and therefore needs shifting.
- *
- * @return True if the tensor is left aligned.
- */
- bool needs_shifting() const;
- /** Set the flag indicating whether or not a tensor needs shifting.
- *
- * @param[in] needs_shifting Indicates if the tensor is left aligned or not.
- *
- */
- void set_needs_shifting(bool needs_shifting);
-
-protected:
- /** Method to be implemented by the child class to map the SSBO.
- *
- * @param[in] blocking If true, then the mapping will be ready to use by the time
- * this method returns, else it is the caller's responsibility
- * to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer.
- */
- virtual uint8_t *do_map(bool blocking) = 0;
- /** Method to be implemented by the child class to unmap the SSBO.
- *
- * @note This method simply enqueues the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before
- * the memory is accessed by the device.
- */
- virtual void do_unmap() = 0;
-
-private:
- uint8_t *_mapping;
- bool _needs_shifting;
-};
-
-/** Interface for GLES Compute image */
-using IGCImage = IGCTensor;
-}
-#endif /*ARM_COMPUTE_IGCTENSOR_H */
diff --git a/arm_compute/core/GLES_COMPUTE/OpenGLES.h b/arm_compute/core/GLES_COMPUTE/OpenGLES.h
deleted file mode 100644
index 0bd7bed27a..0000000000
--- a/arm_compute/core/GLES_COMPUTE/OpenGLES.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_OPENGLES_H
-#define ARM_COMPUTE_OPENGLES_H
-
-#include "arm_compute/core/Log.h"
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <EGL/eglplatform.h>
-#include <GLES3/gl31.h>
-#include <GLES3/gl3ext.h>
-#include <cstddef>
-
-#ifdef ARM_COMPUTE_DEBUG_ENABLED
-#define ARM_COMPUTE_GL_CHECK(x) \
- x; \
- { \
- GLenum error = glGetError(); \
- if(error != GL_NO_ERROR) \
- ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("glGetError() = %i (0x%.8x)\n", error, error); \
- }
-#else /* ARM_COMPUTE_DEBUG_ENABLED */
-#define ARM_COMPUTE_GL_CHECK(x) x
-#endif /* ARM_COMPUTE_DEBUG_ENABLED */
-
-namespace arm_compute
-{
-namespace gles
-{
-/** Class interface for specifying NDRange values. */
-class NDRange
-{
-private:
- size_t _sizes[3];
- size_t _dimensions;
-
-public:
- /** Default constructor - resulting range has zero dimensions. */
- NDRange()
- : _dimensions(0)
- {
- _sizes[0] = 0;
- _sizes[1] = 0;
- _sizes[2] = 0;
- }
-
- /** Constructs one-dimensional range.
- *
- * @param[in] size0 Size of the first dimension.
- */
- NDRange(size_t size0)
- : _dimensions(1)
- {
- _sizes[0] = size0;
- _sizes[1] = 1;
- _sizes[2] = 1;
- }
-
- /** Constructs two-dimensional range.
- *
- * @param[in] size0 Size of the first dimension.
- * @param[in] size1 Size of the second dimension.
- */
- NDRange(size_t size0, size_t size1)
- : _dimensions(2)
- {
- _sizes[0] = size0;
- _sizes[1] = size1;
- _sizes[2] = 1;
- }
-
- /** Constructs three-dimensional range.
- *
- * @param[in] size0 Size of the first dimension.
- * @param[in] size1 Size of the second dimension.
- * @param[in] size2 Size of the third dimension.
- */
- NDRange(size_t size0, size_t size1, size_t size2)
- : _dimensions(3)
- {
- _sizes[0] = size0;
- _sizes[1] = size1;
- _sizes[2] = size2;
- }
-
- /** Conversion operator to const size_t *.
- *
- * @returns A pointer to the size of the first dimension.
- */
- operator const size_t *() const
- {
- return _sizes;
- }
-
- /** Queries the number of dimensions in the range.
- *
- * @returns The number of dimensions.
- */
- size_t dimensions() const
- {
- return _dimensions;
- }
-
- /** Returns the size of the object in bytes based on the runtime number of dimensions
- *
- * @returns The size of the object in bytes.
- */
- size_t size() const
- {
- return _dimensions * sizeof(size_t);
- }
-
- /** Returns the sizes array for each dimensions.
- *
- * @returns The sizes array
- */
- size_t *get()
- {
- return _sizes;
- }
-
- /** Returns the sizes array for each dimensions.
- *
- * @returns The sizes array
- */
- const size_t *get() const
- {
- return _sizes;
- }
-};
-
-static const NDRange NullRange;
-static const NDRange Range_128_1 = NDRange(128, 1);
-} // namespace gles
-
-/** Check if the OpenGL ES 3.1 API is available at runtime.
- *
- * @returns true if the OpenGL ES 3.1 API is available.
- */
-bool opengles31_is_available();
-} // namespace arm_compute
-
-#endif /* ARM_COMPUTE_OPENGLES_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h
deleted file mode 100644
index ff8943b63a..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCABSOLUTEDIFFERENCEKERNEL_H
-#define ARM_COMPUTE_GCABSOLUTEDIFFERENCEKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the absolute difference kernel.
- *
- * Absolute difference is computed by:
- * @f[ output(x,y) = | input1(x,y) - input2(x,y) | @f]
- */
-class GCAbsoluteDifferenceKernel : public IGCKernel
-{
-public:
- /** Default constructor. */
- GCAbsoluteDifferenceKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCAbsoluteDifferenceKernel(const GCAbsoluteDifferenceKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCAbsoluteDifferenceKernel &operator=(const GCAbsoluteDifferenceKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCAbsoluteDifferenceKernel(GCAbsoluteDifferenceKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCAbsoluteDifferenceKernel &operator=(GCAbsoluteDifferenceKernel &&) = default;
- /** Default destructor */
- ~GCAbsoluteDifferenceKernel() = default;
-
- /** Set the inputs and output images.
- *
- * @param[in] input1 Source tensor. Data types supported: U8
- * @param[in] input2 Source tensor. Data types supported: U8
- * @param[out] output Destination tensor. Data types supported: U8
- */
- void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input1; /**< Source tensor 1. */
- const IGCTensor *_input2; /**< Source tensor 2. */
- IGCTensor *_output; /**< Destination tensor. */
-};
-}
-#endif /* ARM_COMPUTE_GCABSOLUTEDIFFERENCEKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h
deleted file mode 100644
index 5d36768027..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCACTIVATIONLAYERKERNEL_H
-#define ARM_COMPUTE_GCACTIVATIONLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-// Forward declarations
-class IGCTensor;
-class GCCoreRuntimeContext;
-
-/** Interface for the activation layer kernel. */
-class GCActivationLayerKernel : public IGCKernel
-{
-public:
- /** Default constructor
- *
- * @param[in, out] ctx Core context to use
- */
- explicit GCActivationLayerKernel(GCCoreRuntimeContext *ctx = nullptr);
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCActivationLayerKernel(const GCActivationLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCActivationLayerKernel &operator=(const GCActivationLayerKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCActivationLayerKernel(GCActivationLayerKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCActivationLayerKernel &operator=(GCActivationLayerKernel &&) = default;
- /** Default destructor */
- ~GCActivationLayerKernel() = default;
- /** Set the input and output tensor.
- *
- * @note If the output tensor is a nullptr, the activation function will be performed in-place
- *
- * @param[in, out] input Source tensor. In case of @p output tensor = nullptr, this tensor will store the result
- * of the activation function. Data types supported: F16/F32.
- * @param[out] output Destination tensor. Data type should match the input data type.
- * @param[in] act_info Activation layer information.
- */
- void configure(IGCTensor *input, IGCTensor *output, ActivationLayerInfo act_info);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- IGCTensor *_input;
- IGCTensor *_output;
- GCCoreRuntimeContext *_ctx;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCACTIVATIONLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h
deleted file mode 100644
index 4cd56b5a3d..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2016-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCARITHMETICADDITIONKERNEL_H
-#define ARM_COMPUTE_GCARITHMETICADDITIONKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the arithmetic addition kernel
- *
- * Arithmetic addition is computed by:
- * @f[ output(x,y) = input1(x,y) + input2(x,y) @f]
- */
-class GCArithmeticAdditionKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCArithmeticAdditionKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCArithmeticAdditionKernel(const GCArithmeticAdditionKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCArithmeticAdditionKernel &operator=(const GCArithmeticAdditionKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCArithmeticAdditionKernel(GCArithmeticAdditionKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCArithmeticAdditionKernel &operator=(GCArithmeticAdditionKernel &&) = default;
- /** Default destructor */
- ~GCArithmeticAdditionKernel() = default;
- /** Initialise the kernel's inputs, output and convertion policy.
- *
- * @param[in] input1 First tensor input. Data types supported: F16.
- * @param[in] input2 Second tensor input. Data types supported: F16.
- * @param[out] output Output tensor. Data types supported: F16.
- * @param[in] policy Policy to use to handle overflow.
- */
- void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, ConvertPolicy policy);
- /** Static function to check if given info will lead to a valid configuration of @ref GCArithmeticAdditionKernel
- *
- * @param[in] input1 First tensor input info. Data types supported: F16.
- * @param[in] input2 Second tensor input info. Data types supported: F16.
- * @param[out] output Output tensor info. Data types supported: F16.
- * @param[in] policy Policy to use to handle overflow.
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input1; /**< Source tensor 1 */
- const IGCTensor *_input2; /**< Source tensor 2 */
- IGCTensor *_output; /**< Destination tensor */
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCARITHMETICADDITIONKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h
deleted file mode 100644
index 998042cd5c..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCBATCHNORMALIZATIONLAYERKERNEL_H
-#define ARM_COMPUTE_GCBATCHNORMALIZATIONLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the BatchNormalization layer kernel.
- */
-class GCBatchNormalizationLayerKernel : public IGCKernel
-{
-public:
- /** Constructor */
- GCBatchNormalizationLayerKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCBatchNormalizationLayerKernel(const GCBatchNormalizationLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCBatchNormalizationLayerKernel &operator=(const GCBatchNormalizationLayerKernel &) = delete;
- /** Default Move Constructor. */
- GCBatchNormalizationLayerKernel(GCBatchNormalizationLayerKernel &&) = default;
- /** Default move assignment operator */
- GCBatchNormalizationLayerKernel &operator=(GCBatchNormalizationLayerKernel &&) = default;
- /** Default destructor */
- ~GCBatchNormalizationLayerKernel() = default;
-
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dimensions represent a single input with dimensions [width, height, FM].
- * The rest are optional and used for representing batches. Data types supported: F16/F32.
- * @param[out] output Destination tensor. Output will have the same number of dimensions as input. Data type supported: same as @p input
- * @param[in] mean Mean values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] var Variance values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] beta (Optional) Beta values tensor info. 1 dimension with size equal to the feature maps [FM]. If not provided, default value for beta is 0. Data types supported: Same as @p input
- * @param[in] gamma (Optional) Gamma values tensor info. 1 dimension with size equal to the feature maps [FM]. If not provided, default value for gamma is 1. Data types supported: Same as @p input
- * @param[in] epsilon (optional) Small value to avoid division with zero.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU supported.
- */
- void configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *var, const IGCTensor *beta = nullptr, const IGCTensor *gamma = nullptr, float epsilon = 0.001f,
- ActivationLayerInfo act_info = ActivationLayerInfo());
- /** Static function to check if given info will lead to a valid configuration of @ref GCBatchNormalizationLayerKernel
- *
- * @param[in] input Source tensor info. In case of @p output tensor info = nullptr, this tensor will store the result.
- * 3 lower dimensions represent a single input with dimensions [width, height, FM].
- * The rest are optional and used for representing batches. Data types supported: F16/F32.
- * @param[in] output Destination tensor info. Output will have the same number of dimensions as input. Data type supported: same as @p input
- * @param[in] mean Mean values tensor info. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] var Variance values tensor info. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] beta (Optional) Beta values tensor info. 1 dimension with size equal to the feature maps [FM]. If not provided, default value for beta is 0. Data types supported: Same as @p input
- * @param[in] gamma (Optional) Gamma values tensor info. 1 dimension with size equal to the feature maps [FM]. If not provided, default value for gamma is 1. Data types supported: Same as @p input
- * @param[in] epsilon (Optional) Small value to avoid division with zero. Default value is 0.001f.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU supported.
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input, const ITensorInfo *output,
- const ITensorInfo *mean, const ITensorInfo *var,
- const ITensorInfo *beta = nullptr, const ITensorInfo *gamma = nullptr,
- float epsilon = 0.001f, ActivationLayerInfo act_info = ActivationLayerInfo());
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
- const IGCTensor *_mean;
- const IGCTensor *_var;
- const IGCTensor *_beta;
- const IGCTensor *_gamma;
- float _epsilon;
-};
-}
-#endif /*ARM_COMPUTE_GCBATCHNORMALIZATIONLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h
deleted file mode 100644
index 6ec9da9e88..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCCOL2IMKERNEL_H
-#define ARM_COMPUTE_GCCOL2IMKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the col2im reshaping kernel.
- *
- * Rearranges each matrix column into image blocks. It's the inverse operation of @ref GCIm2ColKernel.
- *
- * For example, a vector of 9 elements can be reshaped to a block(image) of 3x3:
- *
- * @f[
- * \left( \begin{array}{ccccccccc}
- * a0 & a1 & a2 & a3 & a4 & a5 & a6 & a7 & a8 \\
- * \end{array} \right)
- * \rightarrow
- * \left( \begin{array}{ccc}
- * a0 & a1 & a2 \\
- * a3 & a4 & a5 \\
- * a6 & a7 & a8 \\
- * \end{array} \right)
- * @f]
- */
-class GCCol2ImKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCCol2ImKernel();
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCCol2ImKernel(const GCCol2ImKernel &) = delete;
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCCol2ImKernel &operator=(const GCCol2ImKernel &) = delete;
-
- /** Allow instances of this class to be moved */
- GCCol2ImKernel(GCCol2ImKernel &&) = default;
-
- /** Allow instances of this class to be moved */
- GCCol2ImKernel &operator=(GCCol2ImKernel &&) = default;
-
- /** Default destructor */
- ~GCCol2ImKernel() = default;
-
- /** Set the input and output of the kernel.
- *
- * @param[in] input The input tensor to convert. Data types supported: F16/F32
- * @param[out] output The output tensor. 3 lower dimensions represent a single output [width, height, OFM],
- * while the rest represent batch of outputs. Data types supported: Same as @p input
- * @param[in] convolved_dims Output convolved dimensions.
- */
- void configure(const IGCTensor *input, IGCTensor *output, std::pair<unsigned int, unsigned int> convolved_dims);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
- std::pair<unsigned int, unsigned int> _convolved_dims;
-};
-}
-
-#endif /*ARM_COMPUTE_GCCOL2IMKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h
deleted file mode 100644
index 52e8d72151..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCDEPTHCONCATENATEKERNEL_H
-#define ARM_COMPUTE_GCDEPTHCONCATENATEKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the depth concatenate kernel.
- * The input tensor will be concatenated into the output tensor.
- */
-class GCDepthConcatenateLayerKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCDepthConcatenateLayerKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDepthConcatenateLayerKernel(const GCDepthConcatenateLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDepthConcatenateLayerKernel &operator=(const GCDepthConcatenateLayerKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCDepthConcatenateLayerKernel(GCDepthConcatenateLayerKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCDepthConcatenateLayerKernel &operator=(GCDepthConcatenateLayerKernel &&) = default;
- /** Default destructor */
- ~GCDepthConcatenateLayerKernel() = default;
- /** Initialise the kernel's inputs and output
- *
- * @param[in] input Input tensor. Data types supported: F16/F32.
- * @param[in] depth_offset The offset on the Z axis.
- * @param[in,out] output Output tensor. Data types supported: Same as @p input.
- *
- * @note: The output tensor's low two dimensions can't be smaller than the input one's.
- * @note: The gaps between the two lowest dimensions of input and output need to be divisible by 2.
- *
- */
- void configure(const IGCTensor *input, unsigned int depth_offset, IGCTensor *output);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
- int _depth_offset;
-};
-}
-#endif /* ARM_COMPUTE_GCDEPTHCONCATENATEKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h
deleted file mode 100644
index 95708d43b1..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCDEPTHWISECONVOLUTIONKERNEL3x3_H
-#define ARM_COMPUTE_GCDEPTHWISECONVOLUTIONKERNEL3x3_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the kernel to run a 3x3 depthwise convolution on a tensor.
- */
-class GCDepthwiseConvolutionLayer3x3Kernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCDepthwiseConvolutionLayer3x3Kernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDepthwiseConvolutionLayer3x3Kernel(const GCDepthwiseConvolutionLayer3x3Kernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDepthwiseConvolutionLayer3x3Kernel &operator=(const GCDepthwiseConvolutionLayer3x3Kernel &) = delete;
- /** Default Move Constructor. */
- GCDepthwiseConvolutionLayer3x3Kernel(GCDepthwiseConvolutionLayer3x3Kernel &&) = default;
- /** Default move assignment operator */
- GCDepthwiseConvolutionLayer3x3Kernel &operator=(GCDepthwiseConvolutionLayer3x3Kernel &&) = default;
- /** Initialize the function's source, destination, conv and border_size.
- *
- * @param[in] input Source tensor. DataType supported: F16.
- * @param[in] weights Weights tensor. A 3D tensor with dimensions [3, 3, IFM]. Data type supported: Same as @p input.
- * @param[in] biases (Optional) Biases tensor. A 1D tensor with dimensions [IFM]. Must be nullptr if not needed.
- * Data type supported: Same as @p input.
- * @param[out] output Destination tensor. Data type supported: Same as @p input.
- * @param[in] conv_info Padding and stride information to use for the convolution.
- * @param[in] depth_multiplier (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1.
- */
- void configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier = 1);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
- BorderSize border_size() const override;
-
-private:
- BorderSize _border_size;
- const IGCTensor *_input;
- IGCTensor *_output;
- const IGCTensor *_weights;
- const IGCTensor *_biases;
- unsigned int _conv_stride_x;
- unsigned int _conv_stride_y;
- unsigned int _conv_pad_left;
- unsigned int _conv_pad_top;
- gles::NDRange _lws;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCDEPTHWISECONVOLUTIONKERNEL3x3_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h
deleted file mode 100644
index 64a51afa45..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYERKERNEL_H
-#define ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the direct convolution kernel.
- */
-template <unsigned int kernel_size>
-class GCDirectConvolutionLayerKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCDirectConvolutionLayerKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDirectConvolutionLayerKernel(const GCDirectConvolutionLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDirectConvolutionLayerKernel &operator=(const GCDirectConvolutionLayerKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCDirectConvolutionLayerKernel(GCDirectConvolutionLayerKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCDirectConvolutionLayerKernel &operator=(GCDirectConvolutionLayerKernel &&) = default;
- /** Default destructor */
- ~GCDirectConvolutionLayerKernel() = default;
- /** Set the input and output of the kernel.
- *
- * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F16/F32
- * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as @p input.
- * @param[in] bias Biases tensor. Shared bias supported. Biases are 1D tensor with dimensions [OFM]. Data type supported:Same as @p input.
- * @param[out] output The output tensor. First 2 lower dimensions represent a transform of each 3D input,
- * while every dimension above represents a batch. Data types supported: Same as @p input
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation.
- */
- void configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *bias, IGCTensor *output,
- const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info = ActivationLayerInfo());
-
- // Inherited methods overridden:
- BorderSize border_size() const override;
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- const IGCTensor *_bias;
- const IGCTensor *_weights;
- IGCTensor *_output;
- BorderSize _border_size;
- int _conv_stride_x;
- int _conv_stride_y;
- int _conv_pad_x;
- int _conv_pad_y;
- gles::NDRange _lws;
-};
-
-/** Interface for the 1x1 direct convolution kernel */
-using GCDirectConvolutionLayer1x1Kernel = GCDirectConvolutionLayerKernel<1>;
-/** Interface for the 3x3 direct convolution kernel */
-using GCDirectConvolutionLayer3x3Kernel = GCDirectConvolutionLayerKernel<3>;
-/** Interface for the 5x5 direct convolution kernel */
-using GCDirectConvolutionLayer5x5Kernel = GCDirectConvolutionLayerKernel<5>;
-}
-#endif /*ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h
deleted file mode 100644
index b1338b89f6..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCDROPOUTLAYERKERNEL_H
-#define ARM_COMPUTE_GCDROPOUTLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the dropout layer kernel.
- *
- * Dropout is used to improve over-fit on neural networks.
- *
- */
-class GCDropoutLayerKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCDropoutLayerKernel();
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDropoutLayerKernel(const GCDropoutLayerKernel &) = delete;
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCDropoutLayerKernel &operator=(const GCDropoutLayerKernel &) = delete;
-
- /** Allow instances of this class to be moved */
- GCDropoutLayerKernel(GCDropoutLayerKernel &&) = default;
-
- /** Allow instances of this class to be moved */
- GCDropoutLayerKernel &operator=(GCDropoutLayerKernel &&) = default;
-
- /** Set the input and output of the kernel.
- *
- * @param[in] input The input tensor for this op. Data types supported: F16/F32
- * @param[out] mask The mask tensor. Data types supported: Same as @p input
- * @param[out] output The output tensor. Data types supported: Same as @p input
- * @param[in] ratio Dropout ratio
- * @param[in] forward Forward or backward propagation
- *
- */
- void configure(const IGCTensor *input, IGCTensor *mask, IGCTensor *output, float ratio, bool forward);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_mask;
- IGCTensor *_output;
- unsigned int _num_elems_processed_per_iteration;
-};
-}
-
-#endif /*ARM_COMPUTE_GCDROPOUTLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h
deleted file mode 100644
index 6852f90b02..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCFILLBORDERKERNEL_H
-#define ARM_COMPUTE_GCFILLBORDERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for filling the border of a kernel */
-class GCFillBorderKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCFillBorderKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCFillBorderKernel(const GCFillBorderKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCFillBorderKernel &operator=(const GCFillBorderKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCFillBorderKernel(GCFillBorderKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCFillBorderKernel &operator=(GCFillBorderKernel &&) = default;
- /** Default destructor */
- ~GCFillBorderKernel() = default;
-
- /** Initialise the kernel's input, output and border mode.
- *
- * @param[in,out] tensor Tensor to process Data types supported: F16/F32.
- * @param[in] border_size Size of the border to fill in elements.
- * @param[in] border_mode Border mode to use for the convolution.
- * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT.
- */
- void configure(const IGCTensor *tensor, BorderSize border_size, BorderMode border_mode, const PixelValue &constant_border_value = PixelValue());
-
- /** Function to set the constant value on fill border kernel depending on type.
- *
- * @param[in] idx Index of the kernel argument to set.
- * @param[in] constant_border_value Constant value to use for borders if border_mode is set to CONSTANT.
- */
- template <class T>
- void set_constant_border(unsigned int idx, const PixelValue &constant_border_value);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
- bool is_parallelisable() const override;
-
-private:
- const IGCTensor *_tensor;
-};
-}
-#endif /*ARM_COMPUTE_GCFILLBORDERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h
deleted file mode 100644
index c7d5181d9d..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMINTERLEAVE4X4KERNEL_H
-#define ARM_COMPUTE_GCGEMMINTERLEAVE4X4KERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** OpenGL ES kernel which interleaves the elements of a matrix A in chunk of 4x4
- *
- * This function puts the values in a 4x4 block of Matrix A on the same row (Interleaved values)
- *
- * @f[
- * \left( \begin{array}{cccc}
- * a00 & a01 & a02 & a03 \\
- * a10 & a11 & a12 & a13 \\
- * a20 & a21 & a22 & a23 \\
- * a30 & a31 & a32 & a33 \\
- * \end{array} \right)
- * \rightarrow
- * \left( \begin{array}{ccccccccccccccccc}
- * a00 & a10 & a20 & a30 & a01 & a11 & a21 & a31 & a02 & a12 & a22 & a32 & a03 & a13 & a23 & a33 \\
- * \end{array} \right)
- * @f]
- *
- * After this operation, the output matrix will have the following shape: [ height * 4, ceil(width / 4.0f) ]
- */
-class GCGEMMInterleave4x4Kernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCGEMMInterleave4x4Kernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMInterleave4x4Kernel(const GCGEMMInterleave4x4Kernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMInterleave4x4Kernel &operator=(const GCGEMMInterleave4x4Kernel &) = delete;
- /** Allow instances of this class to be moved */
- GCGEMMInterleave4x4Kernel(GCGEMMInterleave4x4Kernel &&) = default;
- /** Allow instances of this class to be moved */
- GCGEMMInterleave4x4Kernel &operator=(GCGEMMInterleave4x4Kernel &&) = default;
- /** Initialise the kernel's input and output.
- *
- * @param[in] input Input tensor. Data types supported: F16, F32
- * @param[out] output Output tensor. Data type supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-
- // Inherited methods overridden
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
-};
-}
-#endif /* ARM_COMPUTE_GCGEMMINTERLEAVE4X4KERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h
deleted file mode 100644
index e7de8a3fe2..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMMATRIXACCUMULATEBIASESKERNEL_H
-#define ARM_COMPUTE_GCGEMMMATRIXACCUMULATEBIASESKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-/** Interface to add a bias to each row of the input tensor
- *
- */
-class GCGEMMMatrixAccumulateBiasesKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCGEMMMatrixAccumulateBiasesKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMMatrixAccumulateBiasesKernel(const GCGEMMMatrixAccumulateBiasesKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMMatrixAccumulateBiasesKernel &operator=(const GCGEMMMatrixAccumulateBiasesKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCGEMMMatrixAccumulateBiasesKernel(GCGEMMMatrixAccumulateBiasesKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCGEMMMatrixAccumulateBiasesKernel &operator=(GCGEMMMatrixAccumulateBiasesKernel &&) = default;
- /** Set the accumulate buffer and the biases of the kernel.
- *
- * @param[in, out] accum The accumulate tensor to convert. Data types supported: F16/F32
- * @param[in] biases The shared biases tensor to append. It must be 1D tensor. Data types supported: Same as @p input
- */
- void configure(IGCTensor *accum, const IGCTensor *biases);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- IGCTensor *_accum;
- const IGCTensor *_biases;
- gles::NDRange _lws;
-};
-}
-
-#endif /*ARM_COMPUTE_GCGEMMMATRIXACCUMULATEBIASESKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h
deleted file mode 100644
index 8b78e0c103..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMMATRIXADDITIONKERNEL_H
-#define ARM_COMPUTE_GCGEMMMATRIXADDITIONKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** OpenGL ES kernel to perform the in-place matrix addition between 2 matrices, taking into account that the second matrix might be weighted by a scalar value beta.
- * The matrices must have the same dimensions
- *
- * @note This kernel is computed if and only if beta != 0.0.
- */
-class GCGEMMMatrixAdditionKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCGEMMMatrixAdditionKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMMatrixAdditionKernel(const GCGEMMMatrixAdditionKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMMatrixAdditionKernel &operator=(const GCGEMMMatrixAdditionKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCGEMMMatrixAdditionKernel(GCGEMMMatrixAdditionKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCGEMMMatrixAdditionKernel &operator=(GCGEMMMatrixAdditionKernel &&) = default;
- /** Initialise the kernel's input, output and beta value
- *
- * @note The input and output tensors must have the same dimensions
- *
- * @param[in] input Input tensor (Matrix C). Data types supported: F32
- * @param[in, out] output Output tensor. If this kernel is used to finalize the GEMM result (alpha * AB + beta * C), output must contain the result obtained by @ref GCGEMMMatrixMultiplyKernel. Data type supported: same as @p input
- * @param[in] beta Weight of matrix C
- */
- void configure(const IGCTensor *input, IGCTensor *output, float beta);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
-};
-}
-
-#endif /* ARM_COMPUTE_GCGEMMMATRIXADDITIONKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h
deleted file mode 100644
index 4b6e08fb3a..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMMATRIXMULTIPLYKERNEL_H
-#define ARM_COMPUTE_GCGEMMMATRIXMULTIPLYKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GPUTarget.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** GLES Compute kernel to multiply two input matrices "A" and "B" or to multiply a vector "A" by a matrix "B". All elements of the output matrix/vector will be multiplied by alpha
- *
- * @attention The second input tensor must have at least 2 dimensions (matrix)
- *
- */
-class GCGEMMMatrixMultiplyKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCGEMMMatrixMultiplyKernel();
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMMatrixMultiplyKernel(const GCGEMMMatrixMultiplyKernel &) = delete;
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMMMatrixMultiplyKernel &operator=(const GCGEMMMatrixMultiplyKernel &) = delete;
-
- /** Allow instances of this class to be moved */
- GCGEMMMatrixMultiplyKernel(GCGEMMMatrixMultiplyKernel &&) = default;
-
- /** Allow instances of this class to be moved */
- GCGEMMMatrixMultiplyKernel &operator=(GCGEMMMatrixMultiplyKernel &&) = default;
-
- /** Initialise the kernel's input, output and alpha
- *
- * @param[in] input0 Input tensor containing the interleaved Matrix A or the vector A. Data types supported: F16/F32
- * @param[in] input1 Input tensor containing the transposed Matrix B if the first input tensor A is not a vector.
- * If the output tensor is a vector, input1 must contain the matrix B not reshaped. Data type supported: same as @p input0
- * @param[out] output Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0
- * @param[in] alpha Weight of the matrix product
- * @param[in] is_interleaved_transposed (Optional) True if input0 and input1 have been reshaped respectively using @ref GCGEMMInterleave4x4Kernel and @ref GCGEMMTranspose1xWKernel
- * @param[in] reshape_info (Optional) GEMM reshape info. If is_interleaved_transposed = true, this object must contain the information to understand how the matrix A and matrix B have been reshaped
- */
- void configure(const IGCTensor *input0, const IGCTensor *input1, IGCTensor *output, float alpha, bool is_interleaved_transposed = true, const GEMMReshapeInfo &reshape_info = GEMMReshapeInfo());
- /** Static function to check if given info will lead to a valid configuration of @ref GCGEMMMatrixMultiplyKernel
- *
- * @param[in] input0 Input tensor containing the Matrix A. Data types supported: F16/F32
- * @param[in] input1 Input tensor containing the Matrix B. Data type supported: same as @p input0
- * @param[in] output Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0
- * @param[in] alpha Weight of the matrix product
- * @param[in] is_interleaved_transposed True if input0 and input1 have been reshaped respectively using @ref GCGEMMInterleave4x4Kernel and @ref GCGEMMTranspose1xWKernel
- * @param[in] reshape_info GEMM reshape info. If is_interleaved_transposed = true, this object must contain the information to understand how the matrix A and matrix B have been reshaped
- * @param[in] gpu_target GPU Target
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input0, const ITensorInfo *input1, const ITensorInfo *output, float alpha, bool is_interleaved_transposed, const GEMMReshapeInfo &reshape_info,
- GPUTarget gpu_target);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input0;
- const IGCTensor *_input1;
- IGCTensor *_output;
-};
-}
-#endif /* ARM_COMPUTE_GCGEMMMATRIXMULTIPLYKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h
deleted file mode 100644
index b091159a0c..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMTRANSPOSE1XWKERNEL_H
-#define ARM_COMPUTE_GCGEMMTRANSPOSE1XWKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** OpenGLES kernel which transposes the elements of a matrix in chunks of 1xW, where W is equal to (16 / element size of the tensor)
- *
- * Following an example of how the transposition1xW works when the input data type is F32
- *
- * @f[
- * \left( \begin{array}{cccc}
- * a00 & a01 & a02 & a03 \\
- * a10 & a11 & a12 & a13 \\
- * a20 & a21 & a22 & a23 \\
- * a30 & a31 & a32 & a33 \\
- * \end{array} \right)
- * \rightarrow
- * \left( \begin{array}{ccccccccccccccccc}
- * a00 & a01 & a02 & a03 & a10 & a11 & a12 & a13 & a20 & a21 & a22 & a23 & a30 & a31 & a32 & a33 \\
- * \end{array} \right)
- * @f]
- *
- * @note The output matrix will have the following shape: [ height * W, ceil(width / W) ], where W = (16 / element size of the tensor)
- *
- */
-class GCGEMMTranspose1xWKernel : public IGCSimple2DKernel
-{
-public:
- /** Initialise the kernel's input and output.
- *
- * @param[in] input Input tensor. Data types supported: F16, F32
- * @param[out] output Output tensor. Data type supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-};
-}
-#endif /* ARM_COMPUTE_GCGEMMTRANSPOSE1XWKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h
deleted file mode 100644
index 38c924dfd8..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCIM2COLKERNEL_H
-#define ARM_COMPUTE_GCIM2COLKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-class Size2D;
-
-/** Interface for the im2col reshape kernel.
- *
- * Rearranges image blocks into columns. It is used to strip out each convolution block to a single column.
- * It is used to transform a convolution to a plain matrix multiplication.
- *
- * For example taking into account the image below and assuming 3x3 image blocks with stride of 1 we have:
- * @f[
- * \left( \begin{array}{cccc}
- * a00 & a01 & a02 & a03 \\
- * a10 & a11 & a12 & a13 \\
- * a20 & a21 & a22 & a23 \\
- * a30 & a31 & a32 & a33 \\
- * \end{array} \right)
- * =
- * \left( \begin{array}{ccccccccc}
- * a00 & a01 & a02 & a10 & a11 & a12 & a20 & a21 & a22 \\
- * a01 & a02 & a03 & a11 & a12 & a13 & a21 & a22 & a23 \\
- * a10 & a11 & a12 & a20 & a21 & a22 & a30 & a31 & a32 \\
- * a11 & a12 & a13 & a21 & a22 & a23 & a31 & a32 & a33 \\
- * \end{array} \right)
- * @f]
- */
-class GCIm2ColKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCIm2ColKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCIm2ColKernel(const GCIm2ColKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCIm2ColKernel &operator=(const GCIm2ColKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCIm2ColKernel(GCIm2ColKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCIm2ColKernel &operator=(GCIm2ColKernel &&) = default;
- /** Set the input and output of the kernel.
- *
- * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F16/F32
- * @param[out] output The output tensor. First 2 lower dimensions represent a transform of each 3D input,
- * while every dimension above represents a batch. Data types supported: Same as @p input
- * @param[in] kernel_dims The kernel dimensions (width and height).
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] has_bias In case biases are provided expands the matrix with 1.
- * @param[in] dilation (Optional) Dilation, in elements, across x and y. Defaults to (1, 1).
- */
- void configure(const IGCTensor *input, IGCTensor *output, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, const Size2D &dilation = Size2D(1U, 1U));
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
- /** Static function to check if given info will lead to a valid configuration of @ref CLIm2ColKernel
- *
- * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F16/F32
- * @param[in] output The output tensor. First 2 lower dimensions represent a transform of each 3D input,
- * while every dimension above represents a batch. Data types supported: Same as @p input
- * @param[in] kernel_dims The kernel dimensions (width and height).
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] has_bias In case biases are provided expands the matrix with 1.
- * @param[in] dilation (Optional) Dilation, in elements, across x and y. Defaults to (1, 1).
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, const Size2D &dilation = Size2D(1U, 1U));
-
-private:
- /** Run the reshape kernel optimised for the special case (stride is 1, padding is 0 and kernel's low 3 dimensions are same as input)
- *
- * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()).
- * @param[in,out] queue Command queue on which to enqueue the kernel.
- */
- void run_reduced(const Window &window);
- /** run the generic convolution layer input reshape kernel
- *
- * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()).
- * @param[in,out] queue Command queue on which to enqueue the kernel.
- */
- void run_generic(const Window &window);
-
- /** Common signature for the kernel to run */
- using Im2ColFunction = void (GCIm2ColKernel::*)(const Window &);
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
- std::pair<unsigned int, unsigned int> _convolved_dims;
- std::pair<unsigned int, unsigned int> _kernel_dims;
- unsigned int _num_elems_processed_per_iteration;
- Im2ColFunction _run_func;
-};
-}
-
-#endif /*ARM_COMPUTE_GCIM2COLKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h
deleted file mode 100644
index a942975b49..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCNORMALIZATIONLAYERKERNEL_H
-#define ARM_COMPUTE_GCNORMALIZATIONLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the normalization layer kernel.
- */
-class GCNormalizationLayerKernel : public IGCKernel
-{
-public:
- /** Constructor */
- GCNormalizationLayerKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCNormalizationLayerKernel(const GCNormalizationLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCNormalizationLayerKernel &operator=(const GCNormalizationLayerKernel &) = delete;
- /** Default Move Constructor. */
- GCNormalizationLayerKernel(GCNormalizationLayerKernel &&) = default;
- /** Default move assignment operator */
- GCNormalizationLayerKernel &operator=(GCNormalizationLayerKernel &&) = default;
- /** Default destrutor */
- ~GCNormalizationLayerKernel() = default;
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM],
- * and an optional 4th dimension for batch of inputs. Data types supported: F32.
- * @param[in] squared_input Source with each element has been squared. 3 lower dims represent a single input with dimensions [width, height, IFM],
- * Data types should match the input type.
- * @param[out] output Destination tensor. Output will have the same number of dimensions as input. Data types should match the input type.
- * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters.
- */
- void configure(const IGCTensor *input, const IGCTensor *squared_input, IGCTensor *output, NormalizationLayerInfo norm_info);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
- BorderSize border_size() const override;
-
-private:
- const IGCTensor *_input;
- const IGCTensor *_squared_input;
- IGCTensor *_output;
- BorderSize _border_size;
-};
-}
-#endif /*ARM_COMPUTE_GCNORMALIZATIONLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h
deleted file mode 100644
index b8bd22659f..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTEH
-#define ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the NormalizePlanarYUV layer kernel.
- */
-class GCNormalizePlanarYUVLayerKernel : public IGCKernel
-{
-public:
- /** Constructor */
- GCNormalizePlanarYUVLayerKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCNormalizePlanarYUVLayerKernel(const GCNormalizePlanarYUVLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCNormalizePlanarYUVLayerKernel &operator=(const GCNormalizePlanarYUVLayerKernel &) = delete;
- /** Default Move Constructor. */
- GCNormalizePlanarYUVLayerKernel(GCNormalizePlanarYUVLayerKernel &&) = default;
- /** Default move assignment operator */
- GCNormalizePlanarYUVLayerKernel &operator=(GCNormalizePlanarYUVLayerKernel &&) = default;
- /** Default destructor */
- ~GCNormalizePlanarYUVLayerKernel() = default;
-
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dimensions represent a single input with dimensions [width, height, channels].
- * Data types supported: F16.
- * @param[out] output Destination tensor. Data type supported: same as @p input
- * @param[in] mean Mean values tensor. 1 dimension with size equal to the number of input channels. Data types supported: same as @p input
- * @param[in] std Standard deviation values tensor. 1 dimension with size equal to the feature maps [FM].
- * Data types supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *std);
- /** Static function to check if given info will lead to a valid configuration of @ref GCNormalizePlanarYUVLayerKernel
- *
- * @param[in] input Source tensor info. 3 lower dimensions represent a single input with dimensions [width, height, channels].
- * Data types supported: F16.
- * @param[out] output Destination tensor info. Data type supported: same as @p input
- * @param[in] mean Mean values tensor info. 1 dimension with size equal to the number of input channels. Data types supported: same as @p input
- * @param[in] std Standard deviation values tensor info. 1 dimension with size equal to the number of input channels.
- * Data types supported: same as @p input
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
- const IGCTensor *_mean;
- const IGCTensor *_std;
-};
-}
-#endif /*ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h
deleted file mode 100644
index f9d84b8963..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCPIXELWISEMULTIPLICATIONKERNEL_H
-#define ARM_COMPUTE_GCPIXELWISEMULTIPLICATIONKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the pixelwise multiplication kernel.
- *
- */
-class GCPixelWiseMultiplicationKernel : public IGCKernel
-{
-public:
- /** Default constructor.*/
- GCPixelWiseMultiplicationKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCPixelWiseMultiplicationKernel(const GCPixelWiseMultiplicationKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCPixelWiseMultiplicationKernel &operator=(const GCPixelWiseMultiplicationKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCPixelWiseMultiplicationKernel(GCPixelWiseMultiplicationKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCPixelWiseMultiplicationKernel &operator=(GCPixelWiseMultiplicationKernel &&) = default;
- /** Initialise the kernel's input, output and border mode.
- *
- * @param[in] input1 An input tensor. Data types supported: F32.
- * @param[in] input2 An input tensor. Data types supported: same as @p input1.
- * @param[out] output The output tensor, Data types supported: same as @p input1.
- * @param[in] scale Scale to apply after multiplication.
- * Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15.
- */
- void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, float scale);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input1;
- const IGCTensor *_input2;
- IGCTensor *_output;
-};
-}
-
-#endif /*ARM_COMPUTE_GCPIXELWISEMULTIPLICATIONKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h
deleted file mode 100644
index a2190774be..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCPOOLINGLAYERKERNEL_H
-#define ARM_COMPUTE_GCPOOLINGLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-#include "arm_compute/core/Error.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the pooling layer kernel */
-class GCPoolingLayerKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCPoolingLayerKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCPoolingLayerKernel(const GCPoolingLayerKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCPoolingLayerKernel &operator=(const GCPoolingLayerKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCPoolingLayerKernel(GCPoolingLayerKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCPoolingLayerKernel &operator=(GCPoolingLayerKernel &&) = default;
- /** Default destructor */
- ~GCPoolingLayerKernel() = default;
-
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data types supported: F16/F32.
- * @param[out] output Destination tensor. Data types supported: Same as @p input.
- * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo.
- * @param[out] indices (optional) The indices of the maximal values. Data type supported: U32.
- */
- void configure(const IGCTensor *input, IGCTensor *output, const PoolingLayerInfo &pool_info, IGCTensor *indices = nullptr);
-
- /** Static function to check if given info will lead to a valid configuration of @ref GCPoolingLayerKernel
- *
- * @param[in] input Source tensor info. Data types supported: F16/F32.
- * @param[in] output Destination tensor info. Data types supported: Same as @p input.
- * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo.
- * @param[in] indices (optional) The indices of the maximal values. Data type supported: U32.
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices = nullptr);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
- BorderSize border_size() const override;
-
-private:
- const IGCTensor *_input;
- IGCTensor *_output;
- IGCTensor *_indices;
- PoolingLayerInfo _pool_info;
- BorderSize _border_size;
- unsigned int _num_elems_processed_per_iteration;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCPOOLINGLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h
deleted file mode 100644
index 7a2e40a5ec..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2016-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCSCALEKERNEL_H
-#define ARM_COMPUTE_GCSCALEKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h"
-#include "arm_compute/core/KernelDescriptors.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the scale kernel */
-class GCScaleKernel : public IGCSimple3DKernel
-{
-public:
- /** Initialise the kernel's inputs, output and interpolation policy
- *
- * @param[in] input Source tensor. Data types supported: F16
- * @param[out] output Destination tensor. Data types supported: Same as @p input
- * All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane.
- * @param[in] info @ref ScaleKernelInfo descriptor to be used to configure
- */
- void configure(const IGCTensor *input, IGCTensor *output, const ScaleKernelInfo &info);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
- BorderSize border_size() const override;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCSCALEKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h
deleted file mode 100644
index 1b0d450b86..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCSOFTMAXLAYERKERNEL_H
-#define ARM_COMPUTE_GCSOFTMAXLAYERKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Interface for the identifying the max value of 1D Logits */
-class GCLogits1DMaxKernel : public IGCSimple3DKernel
-{
-public:
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data types supported: F16/F32
- * @param[out] output Destination tensor. Data types supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-};
-
-/** Interface for shifting the logits values around the max value and exponentiating the result */
-class GCLogits1DShiftExpSumKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCLogits1DShiftExpSumKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCLogits1DShiftExpSumKernel(const GCLogits1DShiftExpSumKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCLogits1DShiftExpSumKernel &operator=(const GCLogits1DShiftExpSumKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCLogits1DShiftExpSumKernel(GCLogits1DShiftExpSumKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCLogits1DShiftExpSumKernel &operator=(GCLogits1DShiftExpSumKernel &&) = default;
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data types supported: F16/F32
- * @param[in] max Max values tensor. Data types supported: same as @p input
- * @param[out] output Destination tensor. Data types supported: same as @p input
- * @param[out] sum Sum of 1D logits tensor. Data types supported: same as @p input
- */
- void configure(const IGCTensor *input, const IGCTensor *max, IGCTensor *output, IGCTensor *sum);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- const IGCTensor *_max;
- IGCTensor *_output;
- IGCTensor *_sum;
-};
-
-/** Interface for calculating the final step of the Softmax Layer where each logit value is multiplied by the inverse of the sum of the logits. */
-class GCLogits1DNormKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCLogits1DNormKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCLogits1DNormKernel(const GCLogits1DNormKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCLogits1DNormKernel &operator=(const GCLogits1DNormKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCLogits1DNormKernel(GCLogits1DNormKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCLogits1DNormKernel &operator=(GCLogits1DNormKernel &&) = default;
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data types supported: F16/F32
- * @param[in] sum Sum tensor. Dimensions should be dim(input)-1. Data types supported: same as @p input
- * @param[out] output Destination tensor. Data types supported: same as @p input
- */
- void configure(const IGCTensor *input, const IGCTensor *sum, IGCTensor *output);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- const IGCTensor *_sum;
- IGCTensor *_output;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCSOFTMAXLAYERKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h
deleted file mode 100644
index 72c3839c55..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCTENSORSHIFTKERNEL_H
-#define ARM_COMPUTE_GCTENSORSHIFTKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-/** Interface for the kernel to shift valid data on a tensor.
- *
- * For example shifting 3x3 valid data with padding of 1 to right:
- * @f[
- * \left( \begin{array}{ccccc}
- * 0 & 0 & 0 & 0 & 0 \\
- * a00 & a01 & a02 & 0 & 0 \\
- * a10 & a11 & a12 & 0 & 0 \\
- * a20 & a21 & a22 & 0 & 0 \\
- * 0 & 0 & 0 & 0 & 0 \\
- * \end{array} \right)
- * =
- * \left( \begin{array}{ccccc}
- * 0 & 0 & 0 & 0 & 0 \\
- * 0 & a00 & a01 & a02 & 0 \\
- * 0 & a10 & a11 & a12 & 0 \\
- * 0 & a20 & a21 & a22 & 0 \\
- * 0 & 0 & 0 & 0 & 0 \\
- * \end{array} \right)
- * @f]
- */
-class GCTensorShiftKernel : public IGCKernel
-{
-public:
- /** Default constructor */
- GCTensorShiftKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCTensorShiftKernel(const GCTensorShiftKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCTensorShiftKernel &operator=(const GCTensorShiftKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCTensorShiftKernel(GCTensorShiftKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCTensorShiftKernel &operator=(GCTensorShiftKernel &&) = default;
- /** Default destructor */
- ~GCTensorShiftKernel() = default;
- /** Set the input of the kernel.
- *
- * @param[in,out] input Source tensor. Data types supported: F16/F32
- */
- void configure(IGCTensor *input);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- IGCTensor *_input;
- gles::NDRange _lws;
- int _left_padding;
-};
-}
-#endif /*ARM_COMPUTE_GCTENSORSHIFTKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h
deleted file mode 100644
index 03f741b3d4..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCTRANSPOSEKERNEL_H
-#define ARM_COMPUTE_GCTRANSPOSEKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** OpenGL ES kernel which transposes the elements of a matrix.
- *
- * [width, height, batch] -> [height, width, batch]
- *
- */
-class GCTransposeKernel : public IGCSimple2DKernel
-{
-public:
- /** Initialise the kernel's input and output.
- *
- * @param[in] input Input tensor. Data types supported: F16/F32
- * @param[out] output Output tensor. Data type supported: Same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-};
-}
-#endif /* ARM_COMPUTE_GCTRANSPOSEKERNEL_H */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h
deleted file mode 100644
index 3b238bf5f4..0000000000
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCWEIGHTSRESHAPEKERNEL_H
-#define ARM_COMPUTE_GCWEIGHTSRESHAPEKERNEL_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-namespace arm_compute
-{
-/** GLES Compute kernel to perform reshaping on the weights used by convolution and locally connected layer
- *
- * Rearranges each 3-dimensional kernel to a single row leading to a matrix with linearized kernels.
- * In combination with the @ref GCIm2ColKernel can transform a convolution to a matrix multiplication.
- *
- * For example assuming a 3D weight kernel of 3x3 dimensions and depth of 2 we have:
- * @f[
- * \left( \begin{array}{ccc}
- * a000 & a001 & a002 \\
- * a010 & a011 & a012 \\
- * a020 & a021 & a022 \\
- * \end{array} \right)
- * \left( \begin{array}{ccc}
- * a100 & a101 & a102 \\
- * a110 & a111 & a112 \\
- * a120 & a121 & a122 \\
- * \end{array} \right)
- * \rightarrow
- * \left( \begin{array}{ccccccccc}
- * a000 & a001 & a002 & a010 & a011 & a012 & a020 & a021 & a022 & a100 & a101 & a102 & a110 & a111 & a112 & a120 & a121 & a122 \\
- * \end{array} \right)
- * @f]
- */
-class GCWeightsReshapeKernel : public IGCKernel
-{
-public:
- /** Constructor.*/
- GCWeightsReshapeKernel();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCWeightsReshapeKernel(const GCWeightsReshapeKernel &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCWeightsReshapeKernel &operator=(const GCWeightsReshapeKernel &) = delete;
- /** Allow instances of this class to be moved */
- GCWeightsReshapeKernel(GCWeightsReshapeKernel &&) = default;
- /** Allow instances of this class to be moved */
- GCWeightsReshapeKernel &operator=(GCWeightsReshapeKernel &&) = default;
- /** Default destructor */
- ~GCWeightsReshapeKernel() = default;
-
- /** Set the input and output of the kernel.
- *
- * @param[in] input The input tensor to convert. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM] if shared,
- * and 5D tensor with dimensions [kernel_x, kernel_y, IFM, OFM, batches] if unshared. Data types supported: F16, F32
- * @param[in] biases The shared biases tensor to append. Bias is 1D tensor with dimensions [OFM] if shared and 2D tensor with
- * dimensions [OFM, batches] if unshared. Data types supported: Same as @p input
- * @warning Appending biases to weights reshaped matrix is not supported for quantized asymmetric types.
- * @param[out] output The output tensor. Should be a 2D Tensor. Data types supported: Same as @p input
- */
- void configure(const IGCTensor *input, const IGCTensor *biases, IGCTensor *output);
-
- // Inherited methods overridden:
- void run(const Window &window) override;
-
-private:
- const IGCTensor *_input;
- const IGCTensor *_biases;
- IGCTensor *_output;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCWEIGHTSRESHAPEKERNEL_H */ \ No newline at end of file
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 59ba5aabb4..5c897b9110 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2020 Arm Limited.
+ * Copyright (c) 2016-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -1821,10 +1821,10 @@ private:
/** GEMM reshape information class. This class stores the necessary information about matrix A and matrix B reshape.
*
- * The matrix A can only be reshaped through @ref CLGEMMReshapeLHSMatrixKernel or @ref NEGEMMInterleave4x4Kernel or @ref GCGEMMInterleave4x4Kernel
+ * The matrix A can only be reshaped through @ref CLGEMMReshapeLHSMatrixKernel or @ref NEGEMMInterleave4x4Kernel
* Note: Optionally just for @ref CLGEMMReshapeLHSMatrixKernel is it possible to set mult_interleave4x4_height, the multiplication factor for the height of the 4x4 interleaved block
*
- * The matrix B can only be reshaped through @ref CLGEMMReshapeRHSMatrixKernel or @ref NEGEMMTranspose1xWKernel or @ref GCGEMMTranspose1xWKernel
+ * The matrix B can only be reshaped through @ref CLGEMMReshapeRHSMatrixKernel or @ref NEGEMMTranspose1xWKernel
* Note: Optionally just for @ref CLGEMMReshapeRHSMatrixKernel is it possible to set mult_transpose1xW_width, the multiplication factor for the width of the 1xW transposed block
*
*/
diff --git a/arm_compute/graph/backends/GLES/GCDeviceBackend.h b/arm_compute/graph/backends/GLES/GCDeviceBackend.h
deleted file mode 100644
index 41805cdbfa..0000000000
--- a/arm_compute/graph/backends/GLES/GCDeviceBackend.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GRAPH_GCDEVICEBACKEND_H
-#define ARM_COMPUTE_GRAPH_GCDEVICEBACKEND_H
-
-#include "arm_compute/graph/IDeviceBackend.h"
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h"
-
-namespace arm_compute
-{
-namespace graph
-{
-namespace backends
-{
-/** GLES Compute device backend */
-class GCDeviceBackend final : public IDeviceBackend
-{
-public:
- /** Default Constructor */
- GCDeviceBackend();
-
- // Inherited overridden methods
- void initialize_backend() override;
- void setup_backend_context(GraphContext &ctx) override;
- void release_backend_context(GraphContext &ctx) override;
- bool is_backend_supported() override;
- IAllocator *backend_allocator() override;
- std::unique_ptr<ITensorHandle> create_tensor(const Tensor &tensor) override;
- std::unique_ptr<ITensorHandle> create_subtensor(ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent) override;
- std::unique_ptr<arm_compute::IFunction> configure_node(INode &node, GraphContext &ctx) override;
- Status validate_node(INode &node) override;
- std::shared_ptr<arm_compute::IMemoryManager> create_memory_manager(MemoryManagerAffinity affinity) override;
- std::shared_ptr<arm_compute::IWeightsManager> create_weights_manager() override;
-
-private:
- bool _initialized; /**< Flag that specifies if the backend has been default initialized */
- GCBufferAllocator _allocator; /**< GLES buffer affinity allocator */
-};
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
-#endif //ARM_COMPUTE_GRAPH_GCDEVICEBACKEND_H
diff --git a/arm_compute/graph/backends/GLES/GCFunctionFactory.h b/arm_compute/graph/backends/GLES/GCFunctionFactory.h
deleted file mode 100644
index e5c00e5b29..0000000000
--- a/arm_compute/graph/backends/GLES/GCFunctionFactory.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GRAPH_GCFUNCTIONFACTORY_H
-#define ARM_COMPUTE_GRAPH_GCFUNCTIONFACTORY_H
-
-#include "arm_compute/runtime/IFunction.h"
-
-#include <memory>
-
-namespace arm_compute
-{
-namespace graph
-{
-// Forward declarations
-class INode;
-class GraphContext;
-
-namespace backends
-{
-/** Factory for generating GLES compute backend functions **/
-class GCFunctionFactory final
-{
-public:
- /** Create a backend execution function depending on the node type
- *
- * @param[in] node Node to create the backend function for
- * @param[in] ctx Context to use
- *
- * @return Backend function
- */
- static std::unique_ptr<arm_compute::IFunction> create(INode *node, GraphContext &ctx);
-};
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
-#endif //ARM_COMPUTE_GRAPH_GCFUNCTIONFACTORY_H
diff --git a/arm_compute/graph/backends/GLES/GCNodeValidator.h b/arm_compute/graph/backends/GLES/GCNodeValidator.h
deleted file mode 100644
index ab3864acf7..0000000000
--- a/arm_compute/graph/backends/GLES/GCNodeValidator.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GRAPH_GCNODEVALIDATOR_H
-#define ARM_COMPUTE_GRAPH_GCNODEVALIDATOR_H
-
-#include "arm_compute/core/Error.h"
-
-namespace arm_compute
-{
-namespace graph
-{
-// Forward declarations
-class INode;
-
-namespace backends
-{
-class GCNodeValidator final
-{
-public:
- /** Validate a node
- *
- * @param[in] node Node to validate
- *
- * @return An error status
- */
- static Status validate(INode *node);
-};
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
-#endif //ARM_COMPUTE_GRAPH_GCNODEVALIDATOR_H
diff --git a/arm_compute/graph/backends/GLES/GCTensorHandle.h b/arm_compute/graph/backends/GLES/GCTensorHandle.h
deleted file mode 100644
index bf4897a3b9..0000000000
--- a/arm_compute/graph/backends/GLES/GCTensorHandle.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GRAPH_GCTENSORHANDLE_H
-#define ARM_COMPUTE_GRAPH_GCTENSORHANDLE_H
-
-#include "arm_compute/graph/ITensorHandle.h"
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-
-namespace arm_compute
-{
-namespace graph
-{
-namespace backends
-{
-/** GLES compute tensor handle interface object **/
-class GCTensorHandle final : public ITensorHandle
-{
-public:
- /** Default Constructor
- *
- * @param[in] info Tensor metadata
- */
- GCTensorHandle(const ITensorInfo &info);
- /** Destructor: free the tensor's memory */
- ~GCTensorHandle() = default;
- /** Allow instances of this class to be move constructed */
- GCTensorHandle(GCTensorHandle &&) = default;
- /** Allow instances of this class to be moved */
- GCTensorHandle &operator=(GCTensorHandle &&) = default;
-
- // Inherited overridden methods
- void allocate() override;
- void free() override;
- void manage(IMemoryGroup *mg) override;
- void map(bool blocking) override;
- void unmap() override;
- void release_if_unused() override;
- arm_compute::ITensor &tensor() override;
- const arm_compute::ITensor &tensor() const override;
- ITensorHandle *parent_handle() override;
- bool is_subtensor() const override;
- Target target() const override;
-
-private:
- arm_compute::GCTensor _tensor; /**< Backend Tensor */
-};
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GRAPH_GCTENSORHANDLE_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h b/arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h
deleted file mode 100644
index ceb89edb76..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCBUFFERALLOCATOR_H
-#define ARM_COMPUTE_GCBUFFERALLOCATOR_H
-
-#include "arm_compute/runtime/IAllocator.h"
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-#include <cstddef>
-
-namespace arm_compute
-{
-/** Default GLES buffer allocator implementation */
-class GCBufferAllocator final : public IAllocator
-{
-public:
- /** Default constructor */
- GCBufferAllocator() = default;
-
- // Inherited methods overridden:
- void *allocate(size_t size, size_t alignment) override;
- void free(void *ptr) override;
- std::unique_ptr<IMemoryRegion> make_region(size_t size, size_t alignment) override;
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCBUFFERALLOCATOR_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCFunctions.h b/arm_compute/runtime/GLES_COMPUTE/GCFunctions.h
deleted file mode 100644
index c8026621ab..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCFunctions.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCFUNCTIONS_H
-#define ARM_COMPUTE_GCFUNCTIONS_H
-
-/* Header regrouping all the GLES compute functions */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h"
-
-#endif /* ARM_COMPUTE_GCFUNCTIONS_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCHelpers.h b/arm_compute/runtime/GLES_COMPUTE/GCHelpers.h
deleted file mode 100644
index 99e27686e1..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCHelpers.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GC_HELPERS_H
-#define ARM_COMPUTE_GC_HELPERS_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-
-namespace arm_compute
-{
-/** This function creates an OpenGL-ES context and a display.
- *
- * @return A std::tuple where the first element is the opengl display, the second element is the opengl context
- * and the third one an error code. The error code will be EGL_TRUE upon successful creation, otherwise
- * a value telling why the function failed.
- */
-std::tuple<EGLDisplay, EGLContext, EGLBoolean> create_opengl_display_and_context();
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GC_HELPERS_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCMemory.h b/arm_compute/runtime/GLES_COMPUTE/GCMemory.h
deleted file mode 100644
index 12a8bce912..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCMemory.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_RUNTIME_GLES_COMPUTE_GCMEMORY_H
-#define ARM_COMPUTE_RUNTIME_GLES_COMPUTE_GCMEMORY_H
-
-#include "arm_compute/runtime/IMemory.h"
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h"
-
-#include <cstddef>
-#include <memory>
-
-namespace arm_compute
-{
-/** GLES implementation of memory object */
-class GCMemory : public IMemory
-{
-public:
- /** Default Constructor */
- GCMemory();
- /** Default Constructor
- *
- * @param[in] memory Memory to be imported
- */
- GCMemory(const std::shared_ptr<IGCMemoryRegion> &memory);
- /** Default Constructor
- *
- * @note Ownership of the memory is not transferred to this object.
- * Thus management (allocate/free) should be done by the client.
- *
- * @param[in] memory Memory to be imported
- */
- GCMemory(IGCMemoryRegion *memory);
- /** Allow instances of this class to be copied */
- GCMemory(const GCMemory &) = default;
- /** Allow instances of this class to be copy assigned */
- GCMemory &operator=(const GCMemory &) = default;
- /** Allow instances of this class to be moved */
- GCMemory(GCMemory &&) noexcept = default;
- /** Allow instances of this class to be move assigned */
- GCMemory &operator=(GCMemory &&) noexcept = default;
- /** GLES Region accessor
- *
- * @return Memory region
- */
- IGCMemoryRegion *gc_region();
- /** GLES Region accessor
- *
- * @return Memory region
- */
- IGCMemoryRegion *gc_region() const;
-
- // Inherited methods overridden:
- IMemoryRegion *region() final;
- IMemoryRegion *region() const final;
- void set_region(IMemoryRegion *region) final;
- void set_owned_region(std::unique_ptr<IMemoryRegion> region) final;
-
-private:
- IGCMemoryRegion *_region;
- std::shared_ptr<IGCMemoryRegion> _region_owned;
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_RUNTIME_GLES_COMPUTE_GCMEMORY_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h b/arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h
deleted file mode 100644
index 90fd4c6d86..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_RUNTIME_GLES_COMPUTE_GC_MEMORY_REGION_H
-#define ARM_COMPUTE_RUNTIME_GLES_COMPUTE_GC_MEMORY_REGION_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/runtime/IMemoryRegion.h"
-
-#include <cstddef>
-
-namespace arm_compute
-{
-/** GLES memory region interface */
-class IGCMemoryRegion : public IMemoryRegion
-{
-public:
- /** Constructor
- *
- * @param[in] size Region size
- */
- IGCMemoryRegion(size_t size);
- /** Default Destructor */
- virtual ~IGCMemoryRegion() = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCMemoryRegion(const IGCMemoryRegion &) = delete;
- /** Default move constructor */
- IGCMemoryRegion(IGCMemoryRegion &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCMemoryRegion &operator=(const IGCMemoryRegion &) = delete;
- /** Default move assignment operator */
- IGCMemoryRegion &operator=(IGCMemoryRegion &&) = default;
- /** Returns the underlying CL buffer
- *
- * @return CL memory buffer object
- */
- const GLuint &gc_ssbo_name() const;
- /** Host/SVM pointer accessor
- *
- * @return Host/SVM pointer base
- */
- virtual void *ptr() = 0;
- /** Enqueue a map operation of the allocated buffer on the given queue.
- *
- * @param[in] blocking If true, then the mapping will be ready to use by the time
- * this method returns, else it is the caller's responsibility
- * to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer.
- *
- * @return The mapping address.
- */
- virtual void *map(bool blocking) = 0;
- /** Enqueue an unmap operation of the allocated buffer on the given queue.
- *
- * @note This method simply enqueue the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before
- * the memory is accessed by the device.
- *
- */
- virtual void unmap() = 0;
-
- // Inherited methods overridden :
- void *buffer() override;
- const void *buffer() const override;
-
-protected:
- void *_mapping;
- GLuint _ssbo_name;
-};
-
-/** GLES buffer memory region implementation */
-class GCBufferMemoryRegion final : public IGCMemoryRegion
-{
-public:
- /** Constructor
- *
- * @param[in] size Region size
- */
- GCBufferMemoryRegion(size_t size);
- /** Destructor */
- ~GCBufferMemoryRegion();
-
- // Inherited methods overridden :
- void *ptr() final;
- void *map(bool blocking) final;
- void unmap() final;
- std::unique_ptr<IMemoryRegion> extract_subregion(size_t offset, size_t size) final;
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_RUNTIME_GLES_COMPUTE_GC_MEMORY_REGION_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h b/arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h
deleted file mode 100644
index d6e754003f..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCRUNTIME_CONTEXT_H
-#define ARM_COMPUTE_GCRUNTIME_CONTEXT_H
-
-#include "arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "arm_compute/runtime/IScheduler.h"
-#include "arm_compute/runtime/RuntimeContext.h"
-
-namespace arm_compute
-{
-/** Runtime context */
-class GCRuntimeContext : public RuntimeContext
-{
-public:
- /** Default Constructor */
- GCRuntimeContext();
- /** Destructor */
- ~GCRuntimeContext() = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCRuntimeContext(const GCRuntimeContext &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCRuntimeContext &operator=(const GCRuntimeContext &) = delete;
- /** CPU Scheduler setter */
- void set_gpu_scheduler(GCScheduler *scheduler);
-
- // Inherited overridden methods
- GCScheduler *gpu_scheduler();
- GCKernelLibrary &kernel_library();
- GCCoreRuntimeContext *core_runtime_context();
-
-private:
- std::unique_ptr<GCScheduler> _gpu_owned_scheduler{ nullptr };
- GCScheduler *_gpu_scheduler{ nullptr };
- GCKernelLibrary _kernel_lib{};
- GCCoreRuntimeContext _core_context{};
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCRUNTIME_CONTEXT_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h b/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
deleted file mode 100644
index eed4d3b58e..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCSCHEDULER_H
-#define ARM_COMPUTE_GCSCHEDULER_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-// Forward declarations
-class IGCKernel;
-
-/** Provides global access to a OpenGL ES context and command queue. */
-class GCScheduler final
-{
-public:
- /** Constructor */
- GCScheduler();
- /** Destructor */
- ~GCScheduler();
- /** Prevent instances of this class from being copied */
- GCScheduler(const GCScheduler &) = delete;
- /** Prevent instances of this class from being copied */
- GCScheduler &operator=(const GCScheduler &) = delete;
- /** Access the scheduler singleton.
- *
- * @return The scheduler
- */
- static GCScheduler &get();
- /** Initialises the context and command queue used by the scheduler to default values
- * and sets a default device and kernel path for the @ref GCKernelLibrary.
- */
- void default_init();
- /** Initializes the context and display used by the Scheduler.
- *
- * @param[in] display Display to use
- * @param[in] ctx Context to use
- */
- void default_init_with_context(EGLDisplay display, EGLContext ctx);
- /** Schedule the execution of the passed kernel if possible.
- *
- * @param[in] kernel Kernel to execute.
- * @param[in] flush (Optional) Specifies if the command queue will be flushed after running the kernel.
- */
- void dispatch(IGCKernel &kernel, bool flush = true);
- /** Initialises the display and context to be used by the scheduler.
- *
- * @param[in] dpy The EGL display connection
- * @param[in] ctx The EGL rendering context
- */
- void init(EGLDisplay dpy, EGLContext ctx);
- /** Defines a barrier ordering memory transactions. */
- void memory_barrier();
- /** Get the target GPU.
- *
- * @return The target GPU.
- */
- GPUTarget get_target() const
- {
- return _target;
- }
- /** Accessor to set target GPU to be used by the scheduler.
- *
- * @param[in] target The target GPU.
- */
- void set_target(GPUTarget target)
- {
- _target = target;
- }
-
-private:
- /** Set up EGL context */
- void setup_context();
-
- /** Flag to ensure symbols initialisation is happening before Scheduler creation */
- static std::once_flag _initialize_symbols;
-
- EGLDisplay _display; /**< Underlying EGL Display. */
- EGLContext _context; /**< Underlying EGL Context. */
-
- GPUTarget _target;
-};
-}
-#endif /* ARM_COMPUTE_GCSCHEDULER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCTensor.h b/arm_compute/runtime/GLES_COMPUTE/GCTensor.h
deleted file mode 100644
index aa31df78d6..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCTensor.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCTENSOR_H
-#define ARM_COMPUTE_GCTENSOR_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-
-namespace arm_compute
-{
-class ITensorAllocator;
-class ITensorInfo;
-class IRuntimeContext;
-
-/** Interface for OpenGL ES tensor */
-class GCTensor : public IGCTensor, public IMemoryManageable
-{
-public:
- /** Default constructor
- *
- * @param[in] ctx (Optional) Pointer to the runtime context.
- *
- */
- GCTensor(IRuntimeContext *ctx = nullptr);
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCTensor(const GCTensor &) = delete;
-
- /** Prevent instances of this class from being copy assigned (As this class contains pointers) */
- GCTensor &operator=(const GCTensor &) = delete;
-
- /** Allow instances of this class to be moved */
- GCTensor(GCTensor &&) = default;
-
- /** Allow instances of this class to be moved */
- GCTensor &operator=(GCTensor &&) = default;
-
- /** Virtual destructor */
- virtual ~GCTensor() = default;
-
- /** Return a pointer to the tensor's allocator
- *
- * @return A pointer to the tensor's allocator
- */
- ITensorAllocator *allocator();
-
- /** Enqueue a map operation of the allocated buffer on the given queue.
- *
- * @param[in] blocking (Optional) If true, then the mapping will be ready to use by the time
- * this method returns, else it is the caller's responsibility
- * to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer.
- *
- * @return The mapping address.
- */
- void map(bool blocking = true);
-
- /** Enqueue an unmap operation of the allocated and mapped buffer on the given queue.
- *
- * @note This method simply enqueues the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before
- * the memory is accessed by the device.
- *
- */
- void unmap();
-
- // Inherited methods overridden:
- TensorInfo *info() const override;
- TensorInfo *info() override;
- uint8_t *buffer() const override;
- GLuint gc_buffer() const override;
- void associate_memory_group(IMemoryGroup *memory_group) override;
-
-protected:
- // Inherited methods overridden:
- uint8_t *do_map(bool blocking) override;
- void do_unmap() override;
-
-private:
- mutable GCTensorAllocator _allocator; /**< Instance of the OpenGL ES tensor allocator */
-};
-
-/** OpenGL ES Image */
-using GCImage = GCTensor;
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_GCTENSOR_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h b/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
deleted file mode 100644
index ff1e9b0766..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCTENSORALLOCATOR_H
-#define ARM_COMPUTE_GCTENSORALLOCATOR_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemory.h"
-#include "arm_compute/runtime/ITensorAllocator.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-
-#include <memory>
-
-namespace arm_compute
-{
-class GCTensor;
-
-/** Basic implementation of a GLES memory tensor allocator. */
-class GCTensorAllocator : public ITensorAllocator
-{
-public:
- /** Default constructor. */
- GCTensorAllocator(IMemoryManageable *owner = nullptr);
-
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCTensorAllocator(const GCTensorAllocator &) = delete;
-
- /** Prevent instances of this class from being copy assigned (As this class contains pointers) */
- GCTensorAllocator &operator=(const GCTensorAllocator &) = delete;
-
- /** Allow instances of this class to be moved */
- GCTensorAllocator(GCTensorAllocator &&) = default;
-
- /** Allow instances of this class to be moved */
- GCTensorAllocator &operator=(GCTensorAllocator &&) = default;
-
- /** Default destructor */
- ~GCTensorAllocator() = default;
-
- /** Interface to be implemented by the child class to return the pointer to the mapped data.
- *
- * @return a pointer to the data.
- */
- uint8_t *data();
-
- /** Get the OpenGL ES buffer object name
- *
- * @return The buffer object name
- */
- GLuint get_gl_ssbo_name() const;
-
- /** Enqueue a map operation of the allocated buffer on the given queue.
- *
- * @param[in] blocking If true, then the mapping will be ready to use by the time
- * this method returns, else it is the caller's responsibility
- * to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer.
- *
- * @return The mapping address.
- */
- uint8_t *map(bool blocking);
-
- /** Enqueue an unmap operation of the allocated buffer on the given queue.
- *
- * @note This method simply enqueue the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before
- * the memory is accessed by the device.
- *
- */
- void unmap();
-
- /** Allocate size specified by TensorInfo of GLES memory.
- *
- * @note: The tensor must not already be allocated when calling this function.
- *
- */
- void allocate() override;
-
- /** Free allocated GLES memory.
- *
- * @note The tensor must have been allocated when calling this function.
- *
- */
- void free() override;
-
- /** Associates the tensor with a memory group
- *
- * @param[in] associated_memory_group Memory group to associate the tensor with
- */
- void set_associated_memory_group(IMemoryGroup *associated_memory_group);
-
-protected:
- /** Call map() on the SSBO.
- *
- * @return A pointer to the beginning of the tensor's allocation.
- */
- uint8_t *lock() override;
-
- /** Call unmap() on the SSBO. */
- void unlock() override;
-
-private:
- IMemoryManageable *_owner; /**< Owner of the allocator */
- IMemoryGroup *_associated_memory_group; /**< Registered memory group */
- GCMemory _memory; /**< OpenGL ES memory */
- uint8_t *_mapping; /**< Pointer to the CPU mapping of the OpenGL ES buffer. */
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCTENSORALLOCATOR_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h b/arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h
deleted file mode 100644
index f3f7a3a9ff..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_IGCSIMPLEFUNCTION_H
-#define ARM_COMPUTE_IGCSIMPLEFUNCTION_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h"
-#include "arm_compute/runtime/IFunction.h"
-
-#include <memory>
-
-namespace arm_compute
-{
-/** Basic interface for functions which have a single OpenGL ES kernel */
-class IGCSimpleFunction : public IFunction
-{
-public:
- /** Default Constructor
- *
- * @param[in] ctx Runtime context to be used by the function
- */
- IGCSimpleFunction(GCRuntimeContext *ctx = nullptr);
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCSimpleFunction(const IGCSimpleFunction &) = delete;
- /** Default move constructor */
- IGCSimpleFunction(IGCSimpleFunction &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- IGCSimpleFunction &operator=(const IGCSimpleFunction &) = delete;
- /** Default move assignment operator */
- IGCSimpleFunction &operator=(IGCSimpleFunction &&) = default;
-
- // Inherited methods overridden:
- void run() override final;
-
-protected:
- std::unique_ptr<IGCKernel> _kernel; /**< Kernel to run */
- GCFillBorderKernel _border_handler; /**< Kernel to handle borders */
- GCRuntimeContext *_ctx; /**< Context to use */
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_IGCSIMPLEFUNCTION_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h
deleted file mode 100644
index bbba8acd7e..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCABSOLUTEDIFFERENCE_H
-#define ARM_COMPUTE_GCABSOLUTEDIFFERENCE_H
-
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-class ITensor;
-
-/** Basic function to run @ref GCAbsoluteDifferenceKernel
- *
- * @note The tensor data types for the inputs must be U8.
- * @note The function calculates the absolute difference also when the 2 inputs have different tensor data types.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCAbsoluteDifference : public IGCSimpleFunction
-{
-public:
- /** Initialize the function
- *
- * @param[in] input1 First input tensor. Data types supported: U8
- * @param[in] input2 Second input tensor. Data types supported: U8
- * @param[out] output Output tensor. Data types supported: U8
- */
- void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output);
-};
-}
-
-#endif /* ARM_COMPUTE_GCABSOLUTEDIFFERENCE_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h
deleted file mode 100644
index b09afbb81d..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCACTIVATIONLAYER_H
-#define ARM_COMPUTE_GCACTIVATIONLAYER_H
-
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-// Forward declarations
-class IGCTensor;
-
-/** Basic function to run @ref GCActivationLayerKernel
- *
- * @note The function simulates an activation layer with the specified activation function.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCActivationLayer : public IGCSimpleFunction
-{
-public:
- /** Constructor
- *
- * @param[in, out] ctx Runtime context to be used by the function
- */
- explicit GCActivationLayer(GCRuntimeContext *ctx = nullptr);
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCActivationLayer(const GCActivationLayer &) = delete;
- /** Default move constructor */
- GCActivationLayer(GCActivationLayer &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCActivationLayer &operator=(const GCActivationLayer &) = delete;
- /** Default move assignment operator */
- GCActivationLayer &operator=(GCActivationLayer &&) = default;
- /** Set the input and output tensor.
- *
- * @note If the output tensor is a nullptr, the activation function will be performed in-place
- *
- * @param[in, out] input Source tensor. In case of @p output tensor = nullptr, this tensor will store the result
- * of the activation function. Data types supported: F16/F32.
- * @param[out] output Destination tensor. Data type supported: same as @p input
- * @param[in] act_info Activation layer parameters.
- */
- void configure(IGCTensor *input, IGCTensor *output, ActivationLayerInfo act_info);
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCACTIVATIONLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h
deleted file mode 100644
index 9a7527dcd5..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2016-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCARITHMETICADDITION_H
-#define ARM_COMPUTE_GCARITHMETICADDITION_H
-
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to run @ref GCArithmeticAdditionKernel
- *
- * @note The tensor data type for the inputs must be F16.
- * @note The function performs an arithmetic addition between two tensors.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCArithmeticAddition : public IGCSimpleFunction
-{
-public:
- /** Initialise the kernel's inputs, output and convertion policy.
- *
- * @param[in] input1 First tensor input. Data types supported: F16.
- * @param[in] input2 Second tensor input. Data types supported: F16.
- * @param[out] output Output tensor. Data types supported: F16.
- * @param[in] policy Policy to use to handle overflow.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported.
- */
- void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, ConvertPolicy policy, const ActivationLayerInfo &act_info = ActivationLayerInfo());
- /** Static function to check if given info will lead to a valid configuration of @ref GCArithmeticAddition
- *
- * @param[in] input1 First tensor input info. Data types supported: F16.
- * @param[in] input2 Second tensor input info. Data types supported: F16.
- * @param[in] output Output tensor info. Data types supported: F16.
- * @param[in] policy Policy to use to handle overflow.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported.
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info = ActivationLayerInfo());
-};
-}
-#endif /* ARM_COMPUTE_GCARITHMETICADDITION_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h
deleted file mode 100644
index 75b4cdc628..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCBATCHNORMALIZATIONLAYER_H
-#define ARM_COMPUTE_GCBATCHNORMALIZATIONLAYER_H
-
-#include "arm_compute/runtime/IFunction.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to run @ref GCBatchNormalizationLayerKernel and simulate a batch normalization layer.
- *
- * Batch normalization is calculated by:
- * @f[ out_i = \gamma * (\frac{in_i - \mu_{B}}{\sqrt{\sigma^2_{B} + \epsilon}}) + \beta \equiv BN_{\gamma,\beta}(in_i) @f]
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCBatchNormalizationLayer : public IFunction
-{
-public:
- /** Default constructor */
- GCBatchNormalizationLayer();
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dimensions represent a single input with dimensions [width, height, FM].
- * The rest are optional and used for representing batches. Data types supported: F16/F32.
- * @param[out] output Destination tensor. Output will have the same number of dimensions as input. Data type supported: same as @p input
- * @param[in] mean Mean values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] var Variance values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] beta Beta values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] gamma Gamma values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input
- * @param[in] epsilon Small value to avoid division with zero.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU supported.
- */
- void configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *var, const IGCTensor *beta, const IGCTensor *gamma, float epsilon,
- ActivationLayerInfo act_info = ActivationLayerInfo());
-
- // Inherited methods overridden:
- void run() override;
-
-private:
- GCBatchNormalizationLayerKernel _norm_kernel; /**< BatchNormalization layer kernel to run */
-};
-}
-#endif /* ARM_COMPUTE_GCBATCHNORMALIZATIONLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h
deleted file mode 100644
index fe24c07f63..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2019-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCDEPTHCONCATENATELAYER_H
-#define ARM_COMPUTE_GCDEPTHCONCATENATELAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/IFunction.h"
-
-#include <memory>
-#include <vector>
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to execute concatenate tensors along a given axis. This function calls the following kernels:
- *
- * @note only axis z is supported
- * -# @ref GCDepthConcatenateLayerKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCConcatenateLayer : public IFunction
-{
-public:
- /** Default constructor */
- GCConcatenateLayer();
- /** Initialise the kernel's inputs vector and output.
- *
- * @note Input and output tensor dimensions preconditions defer depending on the concatenation axis.
- *
- * @param[in,out] inputs_vector The vectors containing all the tensors to concatenate. Data types supported: F16/F32.
- * @param[out] output Output tensor. Data types supported: Same as @p input.
- * @param[in] axis Concatenation axis. Supported underlying concatenation axis is 2.
- */
- void configure(std::vector<IGCTensor *> inputs_vector, IGCTensor *output, size_t axis);
-
- // Inherited methods overridden:
- void run() override;
-
-private:
- std::vector<std::unique_ptr<IGCKernel>> _concat_kernels;
- unsigned int _num_inputs;
- unsigned int _axis;
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCDEPTHCONCATENATELAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h
deleted file mode 100644
index 3cff9688eb..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCCONVOLUTIONLAYER_H
-#define ARM_COMPUTE_GCCONVOLUTIONLAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h"
-#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-
-#include <memory>
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Function to reshape and transpose the weights. This function calls the following kernels:
- * -# @ref GCWeightsReshapeKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCConvolutionLayerReshapeWeights : public IFunction
-{
-public:
- /** Constructor */
- GCConvolutionLayerReshapeWeights();
- /** Set the input and output tensors.
- *
- * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM].
- * Data type supported: F16/F32.
- * @param[in] biases Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p weights.
- * @param[out] output Destination tensor. Data types supported: Same as @p weights.
- */
- void configure(const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output);
- // Inherited methods overridden:
- void run() override;
-
-private:
- GCWeightsReshapeKernel _weights_reshape_kernel;
-};
-
-/** Basic function to compute the convolution layer. This function calls the following GLES kernels:
- *
- * -# @ref GCWeightsReshapeKernel (executed only once for each configuration)
- * -# @ref GCGEMMTranspose1xWKernel (executed only once for each configuration)
- * -# @ref GCIm2ColKernel
- * -# @ref GCGEMMInterleave4x4Kernel
- * -# @ref GCCol2ImKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCConvolutionLayer : public IFunction
-{
-public:
- /** Default constructor */
- GCConvolutionLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCConvolutionLayer(const GCConvolutionLayer &) = delete;
- /** Default move constructor */
- GCConvolutionLayer(GCConvolutionLayer &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCConvolutionLayer &operator=(const GCConvolutionLayer &) = delete;
- /** Default move assignment operator */
- GCConvolutionLayer &operator=(GCConvolutionLayer &&) = default;
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs.
- * Data types supported: F16/F32.
- * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: Same as @p input.
- * @param[in] biases Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM].
- * Data type supported: Should match @p input data type, except for input of QASYMM8 type where biases should be of S32 type.
- * @param[out] output Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs.
- * Data types supported: Same as @p input.
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] weights_info Specifies if the weights tensor has been reshaped with GCWeightsReshapeKernel. If this is not part of the fully connected layer the weights
- * tensor has also been transposed with GCGEMMTranspose1xWKernel. Data type supported: Same as @p input.
- * @param[in] dilation (Optional) Dilation, in elements, across x and y. Defaults to (1, 1).
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation.
- * @param[in] num_groups (Optional) Number of groups when performing a grouped convolution. num_groups != 1 is not supported
- */
- void configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info,
- const WeightsInfo &weights_info = WeightsInfo(), const Size2D &dilation = Size2D(1U, 1U), const ActivationLayerInfo &act_info = ActivationLayerInfo(), unsigned int num_groups = 1);
-
- // Inherited methods overridden:
- void run() override;
- void prepare() override;
-
-private:
- /** Configures the appropriate matrix multiply routine
- *
- * @param input Input tensor. Data types supported: F16/F32.
- * @param weights Weights tensor. Data type supported: Same as @p input.
- * @param output Output tensor. Data types supported: Same as @p input,
- */
- void configure_mm(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output);
- /** Static function to check if given info will lead to a valid configuration of @ref GCGEMMConvolutionLayer matrix multiply routines
- *
- * @param[in] input Input tensor. Data types supported: QASYMM8/F16/F32.
- * @param[in] weights Weights tensor. Data type supported: Same as @p input.
- * @param[in] output Output tensor. Data types supported: Same as @p input,
- * except for input of QASYMM8 type where output should be of S32 type.
- *
- * @return a status
- */
- static Status validate_mm(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *output);
-
-private:
- MemoryGroup _memory_group;
- GCConvolutionLayerReshapeWeights _reshape_weights;
- GCIm2ColKernel _input_im2col_kernel;
- GCGEMM _mm_gemm;
- GCCol2ImKernel _output_col2im_kernel;
- GCFillBorderKernel _fill_border;
- GCActivationLayer _activationlayer_function;
-
- const IGCTensor *_original_weights;
-
- GCTensor _input_im2col_reshaped;
- GCTensor _input_interleaved_reshaped;
- GCTensor _weights_reshaped;
- GCTensor _weights_transposed;
- GCTensor _gemm_output;
- GCTensor _tmp_output;
-
- bool _is_activationlayer_enabled;
- bool _is_prepared;
-};
-}
-
-#endif /* ARM_COMPUTE_GCCONVOLUTIONLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h
deleted file mode 100644
index 82fe368d7d..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCDEPTHWISECONVOLUTION_H
-#define ARM_COMPUTE_GCDEPTHWISECONVOLUTION_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h"
-#include "arm_compute/runtime/IFunction.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to execute a depthwise convolution for kernel size 3x3xC. This function calls the following OpenGLES kernels:
- *
- * -# @ref GCDepthwiseConvolutionLayer3x3Kernel
- * -# @ref GCFillBorderKernel (if pad_x or pad_y > 0)
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCDepthwiseConvolutionLayer3x3 : public IFunction
-{
-public:
- /** Default constructor */
- GCDepthwiseConvolutionLayer3x3();
- /** Initialize the function's source, destination, conv and border_size.
- *
- * @param[in, out] input Source tensor. Data type supported: F16. (Written to only for border filling).
- * @param[in] weights Weights tensor. A 3D tensor with shape [3, 3, IFM]. Data type supported: Same as @p input.
- * @param[in] biases Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed.
- * Data type supported: Same as @p input.
- * @param[out] output Destination tensor. Data type supported: same as @p input.
- * @param[in] conv_info Padding and stride information to use for the convolution.
- * @param[in] depth_multiplier (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation.
- * @param[in] dilation (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). Currently supports (1,1) only.
- */
- void configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info,
- unsigned int depth_multiplier = 1, const ActivationLayerInfo &act_info = ActivationLayerInfo(), const Size2D &dilation = Size2D(1U, 1U));
-
- // Inherited methods overridden:
- void run() override final;
-
-private:
- std::unique_ptr<IGCKernel> _kernel;
- GCFillBorderKernel _border_handler;
- GCTensorShiftKernel _shift_handler;
- GCActivationLayer _activationlayer_function;
-
- bool _is_activationlayer_enabled;
-};
-}
-#endif /*ARM_COMPUTE_GCDEPTHWISECONVOLUTION_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h
deleted file mode 100644
index f834802db6..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYER_H
-#define ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h"
-#include "arm_compute/runtime/IFunction.h"
-
-#include <memory>
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to execute direct convolution function. This function calls the following kernels:
- *
- * -# @ref GCDirectConvolutionLayerKernel
- * -# @ref GCFillBorderKernel
- * -# @ref GCTensorShiftKernel
- *
- * @note Supported kernel size: 1x1, 3x3, and 5x5
- * @note This OpenGL ES implementation works with stride_x = 1 and 2
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCDirectConvolutionLayer : public IFunction
-{
-public:
- /** Default constructor */
- GCDirectConvolutionLayer();
- /** Set the input and output tensors.
- *
- * @param[in,out] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs.
- * Data types supported: F16/F32.
- * input will be written to only if it is currently left aligned.
- * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as @p input.
- * @param[in] biases Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported:Same as @p input.
- * @param[out] output Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs.
- * Data types supported: Same as @p input.
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation.
- */
- void configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info,
- const ActivationLayerInfo &act_info = ActivationLayerInfo());
-
- // Inherited methods overridden:
- void run() override final;
-
-private:
- std::unique_ptr<IGCKernel> _kernel;
- GCFillBorderKernel _border_handler;
- GCTensorShiftKernel _shift_handler;
-};
-}
-#endif /* ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h
deleted file mode 100644
index 4d551f2692..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCDROPOUTLAYER_H
-#define ARM_COMPUTE_GCDROPOUTLAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h"
-#include "arm_compute/runtime/IFunction.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-/** Basic function to do dropout op. This function calls the following kernels:
- *
- * -# @ref GCDropoutLayerKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCDropoutLayer : public IFunction
-{
-public:
- /** Constructor */
- GCDropoutLayer();
-
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data type supported: F16/F32.
- * @param[out] mask Destination tensor. Data type supported: Same as @p input.
- * @param[out] output Destination tensor. Data type supported: Same as @p input.
- * @param[in] ratio Dropout ratio
- * @param[in] forward Forward or backward propagation
- *
- */
- void configure(const IGCTensor *input, IGCTensor *mask, IGCTensor *output, float ratio, bool forward);
-
- //Inherited methods override
- void run() override;
-
-private:
- GCDropoutLayerKernel _dropout_kernel;
-};
-}
-
-#endif /* ARM_COMPUTE_GCDROPOUTLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h
deleted file mode 100644
index 1635db51e7..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCFILLBORDER_H
-#define ARM_COMPUTE_GCFILLBORDER_H
-
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-class ITensor;
-
-/** Basic function to run @ref GCFillBorderKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCFillBorder : public IGCSimpleFunction
-{
-public:
- /** Initialize the function
- *
- * @param[in,out] tensor Source tensor. Data types supported: F16/F32
- * @param[in] border_width The border width
- * @param[in] border_mode Strategy to use for borders.
- * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT.
- */
- void configure(IGCTensor *tensor, unsigned int border_width, BorderMode border_mode,
- const PixelValue &constant_border_value = PixelValue());
-};
-}
-
-#endif /*ARM_COMPUTE_FILLBORDER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h
deleted file mode 100644
index f839a7db39..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCFULLYCONNECTEDLAYER_H
-#define ARM_COMPUTE_GCFULLYCONNECTEDLAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-#include "arm_compute/runtime/IWeightsManager.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-
-namespace arm_compute
-{
-/** Basic function to reshape the weights of Fully Connected layer with OpenGL ES. This function calls the following kernels:
- *
- * -# @ref GCTransposeKernel
- *
- * @note The fully connected layer accepts "weights" tensors only with 2 dimensions.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCFullyConnectedLayerReshapeWeights : public IGCSimpleFunction
-{
-public:
- /** Set the input and output tensors.
- *
- * @param[in] input Weights tensor. The weights must be 2 dimensional. Data types supported: F16/F32.
- * @param[out] output Destination tensor which stores the transposed input tensor. Data type supported: Same as @p input.
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-};
-
-/** Basic function to compute a Fully Connected layer on OpenGL ES. This function calls the following OpenGL ES kernels:
- *
- * -# @ref GCIm2ColKernel (called when the input comes from a convolutional layer)
- * -# @ref GCFullyConnectedLayerReshapeWeights (if @p are_weights_reshaped is set to false and transpose_weights is set to true ) (called once)
- * -# @ref GCGEMMMatrixMultiplyKernel
- * -# @ref GCGEMMMatrixAccumulateBiasesKernel (if @p biases is not equal to nullptr)
- *
- * @note The fully connected layer accepts "weights" tensors only with 2 dimensions.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCFullyConnectedLayer : public IFunction
-{
-public:
- /** Constructor */
- GCFullyConnectedLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr, IWeightsManager *weights_manager = nullptr);
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCFullyConnectedLayer(const GCFullyConnectedLayer &) = delete;
- /** Default move constructor */
- GCFullyConnectedLayer(GCFullyConnectedLayer &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCFullyConnectedLayer &operator=(const GCFullyConnectedLayer &) = delete;
- /** Default move assignment operator */
- GCFullyConnectedLayer &operator=(GCFullyConnectedLayer &&) = default;
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data type supported: F16/F32.
- * @param[in] weights Weights tensor. The weights must be 2 dimensional. Data type supported: Same as @p input
- * @param[in] biases Bias tensor. It can be nullptr. Data type supported:Same as @p input.
- * @param[out] output Destination tensor. Data type supported: Same as @p input.
- * @param[in] fc_info (Optional) Fully connected layer additional info
- */
- void configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output,
- FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo());
-
- //Inherited methods override
- void run() override;
- void prepare() override;
-
-private:
- void configure_fc_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output);
- void configure_conv_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output);
-
- MemoryGroup _memory_group;
- IWeightsManager *_weights_manager;
- GCIm2ColKernel _im2col_kernel;
- GCFullyConnectedLayerReshapeWeights _reshape_weights_kernel;
- GCGEMMMatrixMultiplyKernel _mm_kernel;
- GCGEMMMatrixAccumulateBiasesKernel _accumulate_biases_kernel;
- GCTensor _im2col_output;
- GCTensor _reshape_weights_output;
- const IGCTensor *_original_weights;
- bool _are_weights_reshaped;
- bool _is_fc_after_conv;
- bool _accumulate_biases;
-};
-}
-#endif /* ARM_COMPUTE_GCFULLYCONNECTEDLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h
deleted file mode 100644
index 653da4b981..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GCGEMM_H
-#define ARM_COMPUTE_GCGEMM_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to execute GEMM on OpenGLES Compute. This function calls the following kernels:
- *
- * -# @ref GCGEMMInterleave4x4Kernel (if the output tensor is a matrix)
- * -# @ref GCGEMMTranspose1xWKernel (if the output tensor is a matrix)
- * -# @ref GCGEMMMatrixMultiplyKernel
- * -# @ref GCGEMMMatrixAdditionKernel (if c != nullptr and beta != 0.0)
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCGEMM : public IFunction
-{
-public:
- /** Default constructor. */
- GCGEMM(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMM(const GCGEMM &) = delete;
- /** Default move constructor */
- GCGEMM(GCGEMM &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- GCGEMM &operator=(const GCGEMM &) = delete;
- /** Default move assignment operator */
- GCGEMM &operator=(GCGEMM &&) = default;
- /** Initialise the kernel's inputs and output
- *
- * @note GEMM: General Matrix Multiply - [alpha * A * B + beta * C].
- *
- * @note All tensors must have the same data type.
- *
- * @note Whilst the first input tensor can be a vector, the second input tensor must be at least a matrix
- *
- * @param[in] a First input tensor (Matrix or Vector A). Data types supported: F32
- * @param[in] b Second input tensor (Matrix B). Data type supported: same as @p a.
- * @param[in] c Third input tensor (Matrix C). It can be a nullptr if just the multiplication between @p a and @p b is needed. Data type supported: same as @p a.
- * @param[out] output Output tensor. Data type supported: same as @p a
- * @param[in] alpha Weight of the matrix product
- * @param[in] beta Weight of matrix C
- * @param[in] gemm_info (Optional) Specifies if the matrix A and/or matrix B have been reshaped and
- * if the reshape of matrix B should happen only for the first run
- */
- void configure(const IGCTensor *a, const IGCTensor *b, const IGCTensor *c, IGCTensor *output, float alpha, float beta, const GEMMInfo &gemm_info = GEMMInfo());
- /** Static function to check if given info will lead to a valid configuration of @ref GCGEMM.
- *
- * @param[in] a First input tensor (Matrix or Vector A). Data types supported: F16/F32
- * @param[in] b Second input tensor (Matrix B). Data type supported: same as @p a.
- * @param[in] c Third input tensor (Matrix C). It can be a nullptr if just the multiplication between @p a and @p b is needed. Data type supported: same as @p a.
- * @param[out] output Output tensor. Data type supported: same as @p a
- * @param[in] alpha Weight of the matrix product
- * @param[in] beta Weight of matrix C
- * @param[in] gemm_info (Optional) Specifies if the matrix A and/or matrix B have been reshaped and
- * if the reshape of matrix B should happen only for the first run
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *a, const ITensorInfo *b, const IGCTensor *c, const ITensorInfo *output, const float alpha, const float beta, const GEMMInfo &gemm_info = GEMMInfo());
-
- // Inherited methods overridden:
- void run() override;
- void prepare() override;
-
-private:
- MemoryGroup _memory_group;
- GCGEMMInterleave4x4Kernel _interleave_kernel;
- GCGEMMTranspose1xWKernel _transpose_kernel;
- GCGEMMMatrixMultiplyKernel _mm_kernel;
- GCGEMMMatrixAdditionKernel _ma_kernel;
- GCTensor _tmp_a;
- GCTensor _tmp_b;
- const IGCTensor *_original_b;
- bool _is_interleaved_transposed;
- bool _run_addition;
- bool _reshape_b_only_on_first_run;
- bool _is_prepared;
-};
-}
-
-#endif /* ARM_COMPUTE_GCGEMM_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h
deleted file mode 100644
index 964c368316..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMINTERLEAVE4X4_H
-#define ARM_COMPUTE_GCGEMMINTERLEAVE4X4_H
-
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-class ITensor;
-
-/** Basic function to execute GCGEMMInterleave4x4Kernel. This function calls the following OpenGL ES kernel:
- *
- * -# @ref GCGEMMInterleave4x4Kernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCGEMMInterleave4x4 : public IGCSimpleFunction
-{
-public:
- /** Initialise the kernel's inputs, output
- *
- * @param[in] input First input tensor. Data types supported: F32, F16
- * @param[out] output Output tensor. Data type supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-};
-}
-
-#endif /* ARM_COMPUTE_GCGEMMINTERLEAVE4X4_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h
deleted file mode 100644
index 107590cf76..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCGEMMTRANSPOSE1XW_H
-#define ARM_COMPUTE_GCGEMMTRANSPOSE1XW_H
-
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-/** Basic function to execute GCGEMMTranspose1xWKernel. This function calls the following OpenGLES kernels:
- *
- * -# @ref GCGEMMTranspose1xWKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCGEMMTranspose1xW : public IGCSimpleFunction
-{
-public:
- /** Initialise the kernel's inputs, output
- *
- * @param[in] input First input tensor. Data type supported: F32
- * @param[out] output Output tensor. Data type supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-};
-}
-#endif /*ARM_COMPUTE_GCGEMMTRANSPOSE1XW_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h
deleted file mode 100644
index f8ee39c362..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCNORMALIZATIONLAYER_H
-#define ARM_COMPUTE_GCNORMALIZATIONLAYER_H
-
-#include "arm_compute/runtime/IFunction.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-// Forward declarations
-class IGCTensor;
-
-/** Basic function to compute a normalization layer. This function calls the following OpenGL ES kernels:
- *
- * -# @ref GCPixelWiseMultiplicationKernel
- * -# @ref GCFillBorderKernel
- * -# @ref GCNormalizationLayerKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCNormalizationLayer : public IFunction
-{
-public:
- /** Default constructor */
- GCNormalizationLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM],
- * and an optional 4th dimension for batch of inputs. Data types supported: F32. Number of channels must be 1.
- * @param[out] output Destination tensor. Dimensions, data type and number of channels must match the input ones.
- * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters.
- */
- void configure(const IGCTensor *input, IGCTensor *output, const NormalizationLayerInfo &norm_info);
-
- // Inherited methods overridden:
- void run() override;
-
-private:
- MemoryGroup _memory_group;
- GCTensor _squared_input; /**< The intermediate buffer which stores results of squaring input*/
- GCNormalizationLayerKernel _norm_kernel; /**< Normalization layer kernel to run */
- GCPixelWiseMultiplicationKernel _multiply_kernel; /**< Pixel multiplication kernel to run */
- GCFillBorderKernel _border_handler; /**< Kernel to handle borders */
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCNORMALIZATIONLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h
deleted file mode 100644
index e097cb9291..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYER_H
-#define ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYER_H
-
-#include "arm_compute/runtime/IFunction.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to run @ref GCNormalizePlanarYUVLayerKernel
- *
- * @note The function simulates a NormalizePlanarYUV layer.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCNormalizePlanarYUVLayer : public IFunction
-{
-public:
- /** Default constructor */
- GCNormalizePlanarYUVLayer();
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. 3 lower dimensions represent a single input with dimensions [width, height, channels].
- * Data types supported: F16.
- * @param[out] output Destination tensor. Data type supported: same as @p input
- * @param[in] mean Mean values tensor. 1 dimension with size equal to the number of input channels. Data types supported: same as @p input
- * @param[in] std Standard deviation values tensor. 1 dimension with size equal to the number of input channels.
- * Data types supported: same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *std);
- /** Static function to check if given info will lead to a valid configuration of @ref CLNormalizePlanarYUVLayer
- *
- * @param[in] input Source tensor info. 3 lower dimensions represent a single input with dimensions [width, height, channels].
- * Data types supported: F16/F32.
- * @param[out] output Destination tensor info. Data type supported: same as @p input
- * @param[in] mean Mean values tensor info. 1 dimension with size equal to the number of input channels. Data types supported: same as @p input
- * @param[in] std Standard deviation values tensor info. 1 dimension with size equal to the number of input channels.
- * Data types supported: same as @p input
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std);
-
- // Inherited methods overridden:
- void run() override;
-
-private:
- GCNormalizePlanarYUVLayerKernel _norm_kernel; /**< NormalizePlanarYUV layer kernel to run */
-};
-}
-#endif /* ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h
deleted file mode 100644
index e09ce374ff..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCPIXELWISEMULTIPLICATION_H
-#define ARM_COMPUTE_GCPIXELWISEMULTIPLICATION_H
-
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to run @ref GCPixelWiseMultiplicationKernel.
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCPixelWiseMultiplication : public IGCSimpleFunction
-{
-public:
- /** Initialise the kernel's inputs, output and convertion policy.
- *
- * @param[in] input1 First tensor input. Data types supported: F32.
- * @param[in] input2 Second tensor input. Data types supported: Same as @p input1.
- * @param[out] output Output tensor. Data types supported: Same as @p input1.
- * @param[in] scale Scale to apply after multiplication. Must be a positive value.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported.
- */
- void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, float scale, const ActivationLayerInfo &act_info = ActivationLayerInfo());
-};
-}
-#endif /*ARM_COMPUTE_GCPIXELWISEMULTIPLICATION_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h
deleted file mode 100644
index dcb7e81b9b..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCPOOLINGLAYER_H
-#define ARM_COMPUTE_GCPOOLINGLAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-#include "arm_compute/runtime/IFunction.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/Types.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to simulate a pooling layer with the specified pooling operation. This function calls the following OpenGL ES kernels:
- *
- * -# @ref GCFillBorderKernel (executed if padding size is different from zero)
- * -# @ref GCPoolingLayerKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCPoolingLayer : public IFunction
-{
-public:
- GCPoolingLayer();
- /** Set the input and output tensors.
- *
- * @param[in,out] input Source tensor. (Written to only when padding != 0) Data types supported: F16/F32.
- * @param[out] output Destination tensor. Data types supported: Same as @p input.
- * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo.
- * @param[out] indices (optional) The indices of the maximal values. Data type supported: U32.
- */
- void configure(IGCTensor *input, IGCTensor *output, const PoolingLayerInfo &pool_info, IGCTensor *indices = nullptr);
- /** Static function to check if given info will lead to a valid configuration of @ref GCPoolingLayer
- *
- * @param[in] input Source tensor info. Data types supported: F16/F32.
- * @param[in] output Destination tensor info. Data types supported: Same as @p input.
- * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo.
- * @param[in] indices (optional) The indices of the maximal values. Data type supported: U32.
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices = nullptr);
-
- void run() override final;
-
-private:
- std::unique_ptr<IGCKernel> _kernel;
- GCFillBorderKernel _border_handler;
- GCTensorShiftKernel _shift_handler;
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCPOOLINGLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h
deleted file mode 100644
index 8e44d3bc70..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2016-2021 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCSCALE_H
-#define ARM_COMPUTE_GCSCALE_H
-
-#include "arm_compute/core/KernelDescriptors.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-#include <cstdint>
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to run @ref GCScaleKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCScale : public IGCSimpleFunction
-{
-public:
- /** Initialize the function's source, destination, interpolation type and border_mode.
- *
- * @param[in,out] input Source tensor. Data types supported: F16. (Written to only for @p border_mode != UNDEFINED)
- * @param[out] output Destination tensor. Data types supported: Same as @p input
- * All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane.
- * @param[in] info @ref ScaleKernelInfo descriptor to be used to configure
- */
- void configure(IGCTensor *input, IGCTensor *output, const ScaleKernelInfo &info);
-};
-}
-#endif /*ARM_COMPUTE_GCSCALE_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h
deleted file mode 100644
index 083b07c57c..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCSOFTMAXLAYER_H
-#define ARM_COMPUTE_GCSOFTMAXLAYER_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to compute a SoftmaxLayer.
- *
- * Softmax is calculated by :
- * @f[ out = exp(x - max(x)) / sum(exp(x - max(x))) @f]
- *
- * This function runs the following kernels:
- * -# @ref GCLogits1DMaxKernel
- * -# @ref GCLogits1DShiftExpSumKernel
- * -# @ref GCLogits1DNormKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCSoftmaxLayer : public IFunction
-{
-public:
- /** Constructor */
- GCSoftmaxLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
- /** Set the input and output tensors.
- *
- * @param[in] input Source tensor. Data types supported: F16/F32
- * @param[out] output Destination tensor. Data types supported: same as @p input
- * @param[in] beta (Optional) A scaling factor for the exponent. Only beta = 1 is supported
- * @param[in] axis (Optional) The dimension in which to apply the function. E.g. for input of shape 4x5x6 and
- * axis=1, softmax will be applied to 4x6=24 vectors of size 5. Defaults to 0
- *
- * @note The value of @p axis must be always 0 for GLES
- */
- void configure(const IGCTensor *input, IGCTensor *output, float beta = 1.0f, int32_t axis = 0);
-
- // Inherited methods overridden:
- void run() override;
-
-private:
- MemoryGroup _memory_group;
- GCLogits1DMaxKernel _max_kernel;
- GCLogits1DShiftExpSumKernel _shift_exp_sum_kernel;
- GCLogits1DNormKernel _norm_kernel;
- GCTensor _max;
- GCTensor _sum;
- GCTensor _tmp;
-};
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_GCSOFTMAXLAYER_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h
deleted file mode 100644
index d25a322f4f..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCTENSORSHIFT_H
-#define ARM_COMPUTE_GCTENSORSHIFT_H
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-#include <memory>
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to execute shift function for tensor. This function applies to fix alignment issue on OpenGL ES:
- *
- * @note This alignment issue is introduced by limits of compute shader which requires 32/64/128bit alignment for data access on OpenGL ES
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCTensorShift : public IGCSimpleFunction
-{
-public:
- /** Initialise the kernel's input, output.
- *
- * @param[in,out] input Source tensor. Data types supported: F16/F32.
- */
- void configure(IGCTensor *input);
-};
-}
-#endif /* ARM_COMPUTE_GCTENSORSHIFT_H */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h
deleted file mode 100644
index 84e303aa25..0000000000
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GCTRANSPOSE_H
-#define ARM_COMPUTE_GCTRANSPOSE_H
-
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-namespace arm_compute
-{
-class IGCTensor;
-
-/** Basic function to transpose a matrix on OpenGL ES. This function calls the following OpenGL ES kernel:
- *
- * -# @ref GCTransposeKernel
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.05 release
- *
- */
-class GCTranspose : public IGCSimpleFunction
-{
-public:
- /** Initialise the kernel's inputs and output
- *
- * @param[in] input Input tensor. Data types supported: F16/F32
- * @param[out] output Output tensor. Data type supported: Same as @p input
- */
- void configure(const IGCTensor *input, IGCTensor *output);
-};
-}
-
-#endif /* ARM_COMPUTE_GCTRANSPOSE_H */
diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox
index 3b340ebe5e..9579673048 100644
--- a/docs/00_introduction.dox
+++ b/docs/00_introduction.dox
@@ -30,7 +30,7 @@ namespace arm_compute
The Computer Vision and Machine Learning library is a set of functions optimised for both Arm CPUs and GPUs using SIMD technologies.
Several builds of the library are available using various configurations:
- - OS: Android or Linux.
+ - OS: Linux, Android, macOS or bare metal.
- Architecture: armv7a (32bit) or arm64-v8a (64bit).
- Technology: Neon / OpenCL / Neon and OpenCL.
- Debug / Asserts / Release: Use a build with asserts enabled to debug your application and enable extra validation. Once you are sure your application works as expected you can switch to a release build of the library for maximum performance.
@@ -62,7 +62,6 @@ This archive contains:
- The arm_compute header and source files
- The latest Khronos OpenCL 1.2 C headers from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a>
- The latest Khronos cl2.hpp from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a> (API version 2.1 when this document was written)
- - The latest Khronos OpenGL ES 3.1 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos OpenGL ES registry</a>
- The latest Khronos EGL 1.5 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos EGL registry</a>
- The sources for a stub version of libOpenCL.so, libGLESv1_CM.so, libGLESv2.so and libEGL.so to help you build your application.
- An examples folder containing a few examples to compile and link against the library.
@@ -129,7 +128,8 @@ v21.05 Public major release
- NEThreshold
- NEWarpAffine
- NEWarpPerspective
-
+ - Remove all GLES kernels / functions / tests / examples
+
v21.02 Public major release
- Various bug fixes.
- Various optimisations.
@@ -200,7 +200,7 @@ v20.11 Public major release
- @ref NELogSoftmaxLayer
- @ref CLSoftmaxLayer
- @ref CLLogSoftmaxLayer
- - @ref GCSoftmaxLayer
+ - GCSoftmaxLayer
- New OpenCL kernels / functions:
- @ref CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel
- @ref CLLogicalNot
@@ -535,9 +535,9 @@ v20.08 Public major release
- NEGEMMMatrixAccumulateBiasesKernel
- Deprecated functions / interfaces:
- Non-descriptor based interfaces for NEThreshold, @ref CLThreshold
- - Non-descriptor based interfaces for @ref NEScale, @ref CLScale and @ref GCScale
- - In @ref NESoftmaxLayer, @ref NELogSoftmaxLayer, @ref CLSoftmaxLayer, @ref CLLogSoftmaxLayer and @ref GCSoftmaxLayer :
- The default "axis" value for @ref CLSoftmaxLayer, @ref CLLogSoftmaxLayer and @ref GCSoftmaxLayer is changed from 1 to 0.
+ - Non-descriptor based interfaces for @ref NEScale, @ref CLScale and GCScale
+ - In @ref NESoftmaxLayer, @ref NELogSoftmaxLayer, @ref CLSoftmaxLayer, @ref CLLogSoftmaxLayer and GCSoftmaxLayer :
+ The default "axis" value for @ref CLSoftmaxLayer, @ref CLLogSoftmaxLayer and GCSoftmaxLayer is changed from 1 to 0.
Only axis 0 is supported.
The default "axis" value for @ref NESoftmaxLayer, @ref NELogSoftmaxLayer is changed from 1 to 0.
Only axis 0 is supported.
@@ -845,7 +845,7 @@ v19.05 Public major release
- @ref CLFFTConvolutionLayer
- @ref CLGEMMDeconvolutionLayer
- New OpenGLES kernels / functions:
- - @ref GCConcatenateLayer
+ - GCConcatenateLayer
- Deprecated functions/interfaces
- GCDepthConcatenateLayer
- NEWidthConcatenateLayer
@@ -1151,7 +1151,7 @@ v18.02 Public major release
- @ref NEWinogradLayerTransformWeightsKernel / NEWinogradLayer
- Renamed NEWinogradLayerKernel into NEWinogradLayerBatchedGEMMKernel
- New GLES kernels / functions:
- - @ref GCTensorShiftKernel / @ref GCTensorShift
+ - GCTensorShiftKernel / GCTensorShift
v18.01 Public maintenance release
- Various bug fixes
@@ -1159,16 +1159,16 @@ v18.01 Public maintenance release
- Added @ref CLDeconvolutionLayerUpsampleKernel / @ref CLDeconvolutionLayer @ref CLDeconvolutionLayerUpsample
- Added CLPermuteKernel / @ref CLPermute
- Added method to clean the programs cache in the CL Kernel library.
- - Added @ref GCArithmeticAdditionKernel / @ref GCArithmeticAddition
- - Added @ref GCDepthwiseConvolutionLayer3x3Kernel / @ref GCDepthwiseConvolutionLayer3x3
- - Added @ref GCNormalizePlanarYUVLayerKernel / @ref GCNormalizePlanarYUVLayer
- - Added @ref GCScaleKernel / @ref GCScale
- - Added @ref GCWeightsReshapeKernel / @ref GCConvolutionLayer
+ - Added GCArithmeticAdditionKernel / GCArithmeticAddition
+ - Added GCDepthwiseConvolutionLayer3x3Kernel / GCDepthwiseConvolutionLayer3x3
+ - Added GCNormalizePlanarYUVLayerKernel / GCNormalizePlanarYUVLayer
+ - Added GCScaleKernel / GCScale
+ - Added GCWeightsReshapeKernel / GCConvolutionLayer
- Added FP16 support to the following GLES compute kernels:
- - @ref GCCol2ImKernel
- - @ref GCGEMMInterleave4x4Kernel
- - @ref GCGEMMTranspose1xWKernel
- - @ref GCIm2ColKernel
+ - GCCol2ImKernel
+ - GCGEMMInterleave4x4Kernel
+ - GCGEMMTranspose1xWKernel
+ - GCIm2ColKernel
- Refactored Neon Winograd (NEWinogradLayerKernel)
- Added @ref NEDirectConvolutionLayerOutputStageKernel
- Added QASYMM8 support to the following Neon kernels:
@@ -1195,23 +1195,23 @@ v17.12 Public major release
- Added new kernels / functions for GLES compute
- New OpenGL ES kernels / functions
- - @ref GCAbsoluteDifferenceKernel / @ref GCAbsoluteDifference
- - @ref GCActivationLayerKernel / @ref GCActivationLayer
- - @ref GCBatchNormalizationLayerKernel / @ref GCBatchNormalizationLayer
- - @ref GCCol2ImKernel
- - @ref GCDepthConcatenateLayerKernel / GCDepthConcatenateLayer
- - @ref GCDirectConvolutionLayerKernel / @ref GCDirectConvolutionLayer
- - @ref GCDropoutLayerKernel / @ref GCDropoutLayer
- - @ref GCFillBorderKernel / @ref GCFillBorder
- - @ref GCGEMMInterleave4x4Kernel / @ref GCGEMMInterleave4x4
- - @ref GCGEMMMatrixAccumulateBiasesKernel / @ref GCGEMMMatrixAdditionKernel / @ref GCGEMMMatrixMultiplyKernel / @ref GCGEMM
- - @ref GCGEMMTranspose1xWKernel / @ref GCGEMMTranspose1xW
- - @ref GCIm2ColKernel
- - @ref GCNormalizationLayerKernel / @ref GCNormalizationLayer
- - @ref GCPixelWiseMultiplicationKernel / @ref GCPixelWiseMultiplication
- - @ref GCPoolingLayerKernel / @ref GCPoolingLayer
- - @ref GCLogits1DMaxKernel / @ref GCLogits1DShiftExpSumKernel / @ref GCLogits1DNormKernel / @ref GCSoftmaxLayer
- - @ref GCTransposeKernel / @ref GCTranspose
+ - GCAbsoluteDifferenceKernel / GCAbsoluteDifference
+ - GCActivationLayerKernel / GCActivationLayer
+ - GCBatchNormalizationLayerKernel / GCBatchNormalizationLayer
+ - GCCol2ImKernel
+ - GCDepthConcatenateLayerKernel / GCDepthConcatenateLayer
+ - GCDirectConvolutionLayerKernel / GCDirectConvolutionLayer
+ - GCDropoutLayerKernel / GCDropoutLayer
+ - GCFillBorderKernel / GCFillBorder
+ - GCGEMMInterleave4x4Kernel / GCGEMMInterleave4x4
+ - GCGEMMMatrixAccumulateBiasesKernel / GCGEMMMatrixAdditionKernel / GCGEMMMatrixMultiplyKernel / GCGEMM
+ - GCGEMMTranspose1xWKernel / GCGEMMTranspose1xW
+ - GCIm2ColKernel
+ - GCNormalizationLayerKernel / GCNormalizationLayer
+ - GCPixelWiseMultiplicationKernel / GCPixelWiseMultiplication
+ - GCPoolingLayerKernel / GCPoolingLayer
+ - GCLogits1DMaxKernel / GCLogits1DShiftExpSumKernel / GCLogits1DNormKernel / GCSoftmaxLayer
+ - GCTransposeKernel / GCTranspose
- New Neon kernels / functions
- arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore
@@ -1432,10 +1432,7 @@ To see the build options available simply run ```scons -h```:
neon: Enable Neon support (yes|no)
default: False
- gles_compute: Enable OpenGL ES Compute Shader support (yes|no)
- default: False
-
- embed_kernels: Embed OpenCL kernels and OpenGL ES compute shaders in library binary (yes|no)
+ embed_kernels: Embed OpenCL kernels in library binary (yes|no)
default: True
compress_kernels: Compress embedded OpenCL kernels in library binary. Note embed_kernels should be enabled as well (yes|no)
@@ -1534,15 +1531,15 @@ To see the build options available simply run ```scons -h```:
@note If you want to natively compile for 32bit on a 64bit Arm device running a 64bit OS then you will have to use cross-compile too.
-There is also an 'embed_only' option which will generate all the .embed files for the OpenCL kernels and / or OpenGLES compute shaders. This might be useful if using a different build system to compile the library.
+There is also an 'embed_only' option which will generate all the .embed files for the OpenCL kernels. This might be useful if using a different build system to compile the library.
In addittion the option 'compress_kernels' will compress the embedded OpenCL kernel files using zlib and inject them in the library. This is useful for reducing the binary size. Note, this option is only available for Android when 'embed_kernels' is enabled.
@b Werror: If you are compiling using the same toolchains as the ones used in this guide then there shouldn't be any warning and therefore you should be able to keep Werror=1. If with a different compiler version the library fails to build because of warnings interpreted as errors then, if you are sure the warnings are not important, you might want to try to build with Werror=0 (But please do report the issue on Github).
-@b opencl / @b neon / @b gles_compute: Choose which SIMD technology you want to target. (Neon for Arm Cortex-A CPUs or OpenCL / GLES_COMPUTE for Arm Mali GPUs)
+@b opencl / @b neon: Choose which SIMD technology you want to target. (Neon for Arm Cortex-A CPUs or OpenCL for Arm Mali GPUs)
-@b embed_kernels: For OpenCL / GLES_COMPUTE only: set embed_kernels=1 if you want the OpenCL / GLES_COMPUTE kernels to be built in the library's binaries instead of being read from separate ".cl" / ".cs" files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL / GLES_COMPUTE kernel files by calling CLKernelLibrary::init() / GCKernelLibrary::init(). By default the path is set to "./cl_kernels" / "./cs_shaders".
+@b embed_kernels: For OpenCL only: set embed_kernels=1 if you want the OpenCL kernels to be built in the library's binaries instead of being read from separate ".cl" / ".cs" files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL kernel files by calling CLKernelLibrary::init(). By default the path is set to "./cl_kernels".
@b set_soname: Do you want to build the versioned version of the library ?
@@ -1612,10 +1609,6 @@ To cross-compile the library in asserts mode, with OpenCL only support, for Linu
scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
-To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit:
-
- scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a
-
You can also compile the library natively on an Arm device by using <b>build=native</b>:
scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
@@ -1659,14 +1652,6 @@ To cross compile an OpenCL example for Linux 64bit:
aarch64-linux-gnu-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++14 -L. -larm_compute -larm_compute_core -o cl_convolution -DARM_COMPUTE_CL
-To cross compile a GLES example for Linux 32bit:
-
- arm-linux-gnueabihf-g++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude/ -L. -larm_compute -larm_compute_core -std=c++14 -mfpu=neon -DARM_COMPUTE_GC -Iinclude/linux/ -o gc_absdiff
-
-To cross compile a GLES example for Linux 64bit:
-
- aarch64-linux-gnu-g++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude/ -L. -larm_compute -larm_compute_core -std=c++14 -DARM_COMPUTE_GC -Iinclude/linux/ -o gc_absdiff
-
(notice the only difference with the 32 bit command is that we don't need the -mfpu option and the compiler's name is different)
To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the examples against arm_compute_graph.so too.
@@ -1697,10 +1682,6 @@ To compile natively (i.e directly on an Arm device) for OpenCL for Linux 32bit o
g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++14 -larm_compute -larm_compute_core -o cl_convolution -DARM_COMPUTE_CL
-To compile natively (i.e directly on an Arm device) for GLES for Linux 32bit or Linux 64bit:
-
- g++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude/ -L. -larm_compute -larm_compute_core -std=c++14 -DARM_COMPUTE_GC -Iinclude/linux/ -o gc_absdiff
-
To compile natively the examples with the Graph API, such as graph_lenet.cpp, you need to link the examples against arm_compute_graph.so too.
i.e. to natively compile the "graph_lenet" example for Linux 32bit:
@@ -1780,10 +1761,6 @@ To cross-compile the library in asserts mode, with OpenCL only support, for Andr
CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=android arch=arm64-v8a
-To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit:
-
- CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=android arch=arm64-v8a
-
@subsubsection S3_3_2_examples How to manually build the examples ?
The examples get automatically built by scons as part of the build process of the library described above. This section just describes how you can build and link your own application against our library.
@@ -1806,13 +1783,6 @@ To cross compile an OpenCL example:
#64 bit:
aarch64-linux-android-clang++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++14 -larm_compute-static -larm_compute_core-static -L. -o cl_convolution_aarch64 -static-libstdc++ -pie -DARM_COMPUTE_CL
-To cross compile a GLES example:
-
- #32 bit:
- arm-linux-androideabi-clang++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude -std=c++14 -larm_compute-static -larm_compute_core-static -L. -o gc_absdiff_arm -static-libstdc++ -pie -DARM_COMPUTE_GC
- #64 bit:
- aarch64-linux-android-clang++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude -std=c++14 -larm_compute-static -larm_compute_core-static -L. -o gc_absdiff_aarch64 -static-libstdc++ -pie -DARM_COMPUTE_GC
-
To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
#32 bit:
diff --git a/docs/06_functions_list.dox b/docs/06_functions_list.dox
index 19485a8ac1..1f4794f131 100644
--- a/docs/06_functions_list.dox
+++ b/docs/06_functions_list.dox
@@ -284,36 +284,7 @@ namespace arm_compute
- @ref CLWarpPerspective
- @ref CLWinogradInputTransform
-@section S6_3 GLES Compute functions
-
-- @ref IFunction
- - @ref GCBatchNormalizationLayer
- - @ref GCConcatenateLayer
- - @ref GCConvolutionLayer
- - @ref GCConvolutionLayerReshapeWeights
- - @ref GCDepthwiseConvolutionLayer3x3
- - @ref GCDirectConvolutionLayer
- - @ref GCDropoutLayer
- - @ref GCFullyConnectedLayer
- - @ref GCGEMM
- - @ref GCNormalizationLayer
- - @ref GCNormalizePlanarYUVLayer
- - @ref GCPoolingLayer
- - @ref GCSoftmaxLayer
- - @ref IGCSimpleFunction
- - @ref GCAbsoluteDifference
- - @ref GCActivationLayer
- - @ref GCArithmeticAddition
- - @ref GCFillBorder
- - @ref GCFullyConnectedLayerReshapeWeights
- - @ref GCGEMMInterleave4x4
- - @ref GCGEMMTranspose1xW
- - @ref GCPixelWiseMultiplication
- - @ref GCScale
- - @ref GCTensorShift
- - @ref GCTranspose
-
-@section S6_4 CPP functions
+@section S6_3 CPP functions
- @ref IFunction
- @ref CPPDetectionOutputLayer
diff --git a/docs/ComputeLibrary.dir b/docs/ComputeLibrary.dir
index 8b77ed4f02..de4968c0ab 100644
--- a/docs/ComputeLibrary.dir
+++ b/docs/ComputeLibrary.dir
@@ -43,26 +43,6 @@
* @brief All experimental interfaces
*/
-/** @dir arm_compute/core/GLES_COMPUTE
- * @brief OpenGLES backend core: kernels and utilities.
- */
-
-/** @file arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h
- * @brief Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context.
- */
-
-/** @file arm_compute/core/GLES_COMPUTE/GCKernels.h
- * @brief Includes all the GLES kernels at once
- */
-
-/** @file arm_compute/core/GLES_COMPUTE/OpenGLES.h
- * @brief Wrapper to configure the Khronos EGL and OpenGL ES C header
- */
-
-/** @dir arm_compute/core/GLES_COMPUTE/kernels
- * @brief Folder containing all the GLES kernels
- */
-
/** @dir src/core/NEON
* @brief Neon backend core: kernels and utilities.
*/
@@ -95,10 +75,6 @@
* @brief OpenCL specific operations
*/
-/** @dir arm_compute/graph/backends/GLES
- * @brief OpenGLES specific operations
- */
-
/** @dir arm_compute/graph/backends/NEON
* @brief Neon specific operations
*/
@@ -171,22 +147,6 @@
* @brief Experimental runtime interface.
*/
-/** @dir arm_compute/runtime/GLES_COMPUTE
- * @brief OpenGLES backend runtime interface.
- */
-
-/** @file arm_compute/runtime/GLES_COMPUTE/GCFunctions.h
- * @brief Includes all the OpenGLES functions at once
- */
-
-/** @file arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
- * @brief Interface to enqueue GLES kernels and get/set the GLES CommandQueue.
- */
-
-/** @dir arm_compute/runtime/GLES_COMPUTE/functions
- * @brief Folder containing all the GLES functions.
- */
-
/** @dir arm_compute/runtime/NEON
* @brief Neon backend runtime interface.
*/
@@ -221,7 +181,6 @@
* @details Examples have the following structure:
*
* -# cl_*.cpp --> OpenCL examples
- * -# gc_*.cpp --> GLES compute shaders examples
* -# graph_*.cpp --> Graph examples
* -# neoncl_*.cpp --> Neon / OpenCL interoperability examples
* -# neon_*.cpp --> Neon examples
@@ -295,10 +254,6 @@
* @brief OpenCL accessors.
*/
-/** @dir tests/GLES_COMPUTE
- * @brief GLES accessors.
- */
-
/** @dir tests/NEON
* @brief Neon accessors.
*/
@@ -311,10 +266,6 @@
* @brief OpenCL benchmarking tests.
*/
-/** @dir tests/benchmark/GLES_COMPUTE
- * @brief GLES benchmarking tests.
- */
-
/** @dir tests/benchmark/NEON
* @brief Neon benchmarking tests.
*/
@@ -347,10 +298,6 @@
* @brief C++ validation tests.
*/
-/** @dir tests/validation/GLES_COMPUTE
- * @brief GLES validation tests.
- */
-
/** @dir tests/validation/NEON
* @brief Neon validation tests.
*/
diff --git a/docs/Doxyfile b/docs/Doxyfile
index 51548dc2d4..fa16a5414b 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -869,7 +869,6 @@ EXCLUDE = ./arm_compute/core/NEON/kernels/assembly/ \
./src/core/NEON/kernels/convolution/ \
./src/core/NEON/kernels/NELKTrackerKernel.cpp \
./src/core/NEON/kernels/NEL2NormalizeLayerKernel.cpp \
- ./src/core/GLES_COMPUTE/cs_shaders/ \
./tests/datasets/ \
./tests/benchmark/fixtures/ \
./tests/validation/fixtures/
diff --git a/examples/SConscript b/examples/SConscript
index c7bc7dfb36..8ee688e76d 100644
--- a/examples/SConscript
+++ b/examples/SConscript
@@ -128,15 +128,6 @@ if env['neon']:
alias = examples_env.Alias(example, prog)
Default(alias)
-if env['gles_compute']:
- for file in Glob("./gc_*.cpp"):
- example = os.path.basename(os.path.splitext(str(file))[0])
- prog = examples_env.Program(example, ["{}.cpp".format(example), utils], CPPDEFINES=['ARM_COMPUTE_GC'], LIBS = examples_libs + arm_compute_libs)
- Depends(prog, arm_compute_dependency)
- prog = install_bin(prog)
- alias = examples_env.Alias(example, prog)
- Default(alias)
-
if env['external_tests_dir']:
for file in Glob(env['external_tests_dir'] + "/examples/graph_*.cpp"):
example = os.path.basename(os.path.splitext(str(file))[0])
diff --git a/examples/gc_absdiff.cpp b/examples/gc_absdiff.cpp
deleted file mode 100644
index 701e43f820..0000000000
--- a/examples/gc_absdiff.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_GC /* Needed by Utils.cpp to handle OpenGL ES exceptions properly */
-#error "This example needs to be built with -DARM_COMPUTE_GC"
-#endif /* ARM_COMPUTE_GC */
-
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCFunctions.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "utils/ImageLoader.h"
-#include "utils/Utils.h"
-
-using namespace arm_compute;
-using namespace utils;
-
-class GCAbsDiffExample : public Example
-{
-public:
- bool do_setup(int argc, char **argv) override
- {
- PPMLoader ppm1{};
- PPMLoader ppm2{};
-
- GCScheduler::get().default_init();
- if(argc < 2)
- {
- // Print help
- std::cout << "Usage: " << argv[0] << " [input0_image.ppm] [input1_image.ppm] \n\n";
- std::cout << "No input_image provided, creating two dummy 640x480 images\n";
- // Create two empty grayscale 640x480 images
- src1.allocator()->init(TensorInfo(640, 480, Format::U8));
- src2.allocator()->init(TensorInfo(640, 480, Format::U8));
- }
- else if(argc < 3)
- {
- // Print help
- std::cout << "Usage: " << argv[0] << " [input0_image.ppm] [input1_image.ppm] \n\n";
- std::cout << "Only one input_image provided, creating a dummy 640x480 image\n";
- ppm1.open(argv[1]);
- ppm1.init_image(src1, Format::U8);
- // Create an empty grayscale 640x480 image
- src2.allocator()->init(TensorInfo(640, 480, Format::U8));
- }
- else
- {
- ppm1.open(argv[1]);
- ppm1.init_image(src1, Format::U8);
- ppm2.open(argv[2]);
- ppm2.init_image(src2, Format::U8);
- }
-
- // Configure the temporary and destination images
- dst.allocator()->init(*src1.info());
-
- absdiff.configure(&src1, &src2, &dst);
-
- // Allocate all the images
- src1.allocator()->allocate();
- src2.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill the input image with the content of the PPM image if a filename was provided:
- if(ppm1.is_open())
- {
- ppm1.fill_image(src1);
- output_filename = std::string(argv[1]) + "_out.ppm";
- }
- if(ppm2.is_open())
- {
- ppm2.fill_image(src2);
- }
-
- return true;
- }
- void do_run() override
- {
- // Execute the functions:
- absdiff.run();
- }
- void do_teardown() override
- {
- // Save the result to file:
- if(!output_filename.empty())
- {
- // save_to_ppm maps and unmaps the image to store as PPM
- // The GCTensor::map call inside the save_to_ppm will block until all pending operations on that image have completed
- save_to_ppm(dst, output_filename);
- }
- }
-
-private:
- GCImage src1{}, src2{}, dst{};
- GCAbsoluteDifference absdiff{};
- std::string output_filename{};
-};
-
-/** Main program for absdiff test
- *
- * @param[in] argc Number of arguments
- * @param[in] argv Arguments ( [optional] Path to the first PPM image to process, [optional] Path the the second PPM image to process )
- */
-int main(int argc, char **argv)
-{
- return utils::run_example<GCAbsDiffExample>(argc, argv);
-}
diff --git a/examples/gc_dc.cpp b/examples/gc_dc.cpp
deleted file mode 100644
index ac235fd2a1..0000000000
--- a/examples/gc_dc.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_GC
-#error "This example needs to be built with -DARM_COMPUTE_GC"
-#endif /* ARM_COMPUTE_GC */
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCFunctions.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "half/half.hpp"
-#include "utils/Utils.h"
-
-using namespace arm_compute;
-using namespace utils;
-
-class GCDCExample : public Example
-{
-public:
- bool do_setup(int argc, char **argv) override
- {
- ARM_COMPUTE_UNUSED(argc);
- ARM_COMPUTE_UNUSED(argv);
-
- // init instance
- GCScheduler::get().default_init();
-
- const TensorShape src_shape = TensorShape{ 11U /* W */, 13U /* H */, 4U /* C */, 3U /* N */ };
- const unsigned int kernel_size = 3;
- const int stride_x = 1;
- const int stride_y = 1;
- const int pad_x = 0;
- const int pad_y = 0;
- const unsigned int num_kernels = 256;
- const DataType data_type = DataType::F16;
-
- // generate shape
- const TensorShape weights_shape(kernel_size, kernel_size, src_shape.z(), num_kernels);
- const TensorShape bias_shape(num_kernels);
- const PadStrideInfo pad_info(stride_x, stride_y, pad_x, pad_y, DimensionRoundingType::FLOOR);
-
- // output shape should be 9*11*256*3 (W*H*C*N)
- const TensorShape dst_shape = get_output_shape(src_shape, weights_shape, pad_info);
-
- // create tensors
- src.allocator()->init(TensorInfo(src_shape, 1, data_type));
- weights.allocator()->init(TensorInfo(weights_shape, 1, data_type));
- bias.allocator()->init(TensorInfo(bias_shape, 1, data_type));
- dst.allocator()->init(TensorInfo(dst_shape, 1, data_type));
-
- // configure layer
- conv.configure(&src, &weights, &bias, &dst, pad_info);
-
- // allocate tensors
- src.allocator()->allocate();
- weights.allocator()->allocate();
- bias.allocator()->allocate();
- dst.allocator()->allocate();
-
- // To demonstrate how to fill tensor with some values...
- src.map();
- Window window;
- window.use_tensor_dimensions(src_shape);
- Iterator it(&src, window);
- execute_window_loop(window, [&](const Coordinates &)
- {
- *reinterpret_cast<half_float::half *>(it.ptr()) = half_float::half(1.f);
- });
- src.unmap();
-
- return true;
- }
- void do_run() override
- {
- // run the layer
- conv.run();
- }
- void do_teardown() override
- {
- // check result
- dst.map();
- // do something
- dst.unmap();
- }
-
-private:
- GCTensor src{}, weights{}, bias{}, dst{};
- GCDirectConvolutionLayer conv{};
-
- TensorShape get_output_shape(TensorShape in_shape, TensorShape kernel_shape, const PadStrideInfo &info)
- {
- TensorShape out_shape(in_shape);
- const std::pair<unsigned int, unsigned int> scaled_dims = scaled_dimensions(in_shape.x(),
- in_shape.y(),
- kernel_shape.x(),
- kernel_shape.y(),
- info);
- out_shape.set(0, scaled_dims.first);
- out_shape.set(1, scaled_dims.second);
- out_shape.set(2, kernel_shape[3]);
- return out_shape;
- }
-};
-
-/** Main program for directconvolution test
- *
- * @param[in] argc Number of arguments
- * @param[in] argv Arguments
- */
-int main(int argc, char **argv)
-{
- return utils::run_example<GCDCExample>(argc, argv);
-}
diff --git a/include/linux/EGL/egl.h b/include/linux/EGL/egl.h
deleted file mode 100644
index 13ccde3558..0000000000
--- a/include/linux/EGL/egl.h
+++ /dev/null
@@ -1,303 +0,0 @@
-#ifndef __egl_h_
-#define __egl_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision: 28371 $ on $Date: 2014-10-01 09:16:09 -0700 (Wed, 01 Oct 2014) $
-*/
-
-#include <EGL/eglplatform.h>
-
-/* Generated on date 20141001 */
-
-/* Generated C header for:
- * API: egl
- * Versions considered: .*
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef EGL_VERSION_1_0
-#define EGL_VERSION_1_0 1
-typedef unsigned int EGLBoolean;
-typedef void *EGLDisplay;
-#include <KHR/khrplatform.h>
-#include <EGL/eglplatform.h>
-typedef void *EGLConfig;
-typedef void *EGLSurface;
-typedef void *EGLContext;
-typedef void (*__eglMustCastToProperFunctionPointerType)(void);
-#define EGL_ALPHA_SIZE 0x3021
-#define EGL_BAD_ACCESS 0x3002
-#define EGL_BAD_ALLOC 0x3003
-#define EGL_BAD_ATTRIBUTE 0x3004
-#define EGL_BAD_CONFIG 0x3005
-#define EGL_BAD_CONTEXT 0x3006
-#define EGL_BAD_CURRENT_SURFACE 0x3007
-#define EGL_BAD_DISPLAY 0x3008
-#define EGL_BAD_MATCH 0x3009
-#define EGL_BAD_NATIVE_PIXMAP 0x300A
-#define EGL_BAD_NATIVE_WINDOW 0x300B
-#define EGL_BAD_PARAMETER 0x300C
-#define EGL_BAD_SURFACE 0x300D
-#define EGL_BLUE_SIZE 0x3022
-#define EGL_BUFFER_SIZE 0x3020
-#define EGL_CONFIG_CAVEAT 0x3027
-#define EGL_CONFIG_ID 0x3028
-#define EGL_CORE_NATIVE_ENGINE 0x305B
-#define EGL_DEPTH_SIZE 0x3025
-#define EGL_DONT_CARE ((EGLint)-1)
-#define EGL_DRAW 0x3059
-#define EGL_EXTENSIONS 0x3055
-#define EGL_FALSE 0
-#define EGL_GREEN_SIZE 0x3023
-#define EGL_HEIGHT 0x3056
-#define EGL_LARGEST_PBUFFER 0x3058
-#define EGL_LEVEL 0x3029
-#define EGL_MAX_PBUFFER_HEIGHT 0x302A
-#define EGL_MAX_PBUFFER_PIXELS 0x302B
-#define EGL_MAX_PBUFFER_WIDTH 0x302C
-#define EGL_NATIVE_RENDERABLE 0x302D
-#define EGL_NATIVE_VISUAL_ID 0x302E
-#define EGL_NATIVE_VISUAL_TYPE 0x302F
-#define EGL_NONE 0x3038
-#define EGL_NON_CONFORMANT_CONFIG 0x3051
-#define EGL_NOT_INITIALIZED 0x3001
-#define EGL_NO_CONTEXT ((EGLContext)0)
-#define EGL_NO_DISPLAY ((EGLDisplay)0)
-#define EGL_NO_SURFACE ((EGLSurface)0)
-#define EGL_PBUFFER_BIT 0x0001
-#define EGL_PIXMAP_BIT 0x0002
-#define EGL_READ 0x305A
-#define EGL_RED_SIZE 0x3024
-#define EGL_SAMPLES 0x3031
-#define EGL_SAMPLE_BUFFERS 0x3032
-#define EGL_SLOW_CONFIG 0x3050
-#define EGL_STENCIL_SIZE 0x3026
-#define EGL_SUCCESS 0x3000
-#define EGL_SURFACE_TYPE 0x3033
-#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
-#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
-#define EGL_TRANSPARENT_RED_VALUE 0x3037
-#define EGL_TRANSPARENT_RGB 0x3052
-#define EGL_TRANSPARENT_TYPE 0x3034
-#define EGL_TRUE 1
-#define EGL_VENDOR 0x3053
-#define EGL_VERSION 0x3054
-#define EGL_WIDTH 0x3057
-#define EGL_WINDOW_BIT 0x0004
-EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
-EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
-EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
-EGLAPI EGLint EGLAPIENTRY eglGetError (void);
-EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);
-EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
-EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
-EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
-#endif /* EGL_VERSION_1_0 */
-
-#ifndef EGL_VERSION_1_1
-#define EGL_VERSION_1_1 1
-#define EGL_BACK_BUFFER 0x3084
-#define EGL_BIND_TO_TEXTURE_RGB 0x3039
-#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
-#define EGL_CONTEXT_LOST 0x300E
-#define EGL_MIN_SWAP_INTERVAL 0x303B
-#define EGL_MAX_SWAP_INTERVAL 0x303C
-#define EGL_MIPMAP_TEXTURE 0x3082
-#define EGL_MIPMAP_LEVEL 0x3083
-#define EGL_NO_TEXTURE 0x305C
-#define EGL_TEXTURE_2D 0x305F
-#define EGL_TEXTURE_FORMAT 0x3080
-#define EGL_TEXTURE_RGB 0x305D
-#define EGL_TEXTURE_RGBA 0x305E
-#define EGL_TEXTURE_TARGET 0x3081
-EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
-#endif /* EGL_VERSION_1_1 */
-
-#ifndef EGL_VERSION_1_2
-#define EGL_VERSION_1_2 1
-typedef unsigned int EGLenum;
-typedef void *EGLClientBuffer;
-#define EGL_ALPHA_FORMAT 0x3088
-#define EGL_ALPHA_FORMAT_NONPRE 0x308B
-#define EGL_ALPHA_FORMAT_PRE 0x308C
-#define EGL_ALPHA_MASK_SIZE 0x303E
-#define EGL_BUFFER_PRESERVED 0x3094
-#define EGL_BUFFER_DESTROYED 0x3095
-#define EGL_CLIENT_APIS 0x308D
-#define EGL_COLORSPACE 0x3087
-#define EGL_COLORSPACE_sRGB 0x3089
-#define EGL_COLORSPACE_LINEAR 0x308A
-#define EGL_COLOR_BUFFER_TYPE 0x303F
-#define EGL_CONTEXT_CLIENT_TYPE 0x3097
-#define EGL_DISPLAY_SCALING 10000
-#define EGL_HORIZONTAL_RESOLUTION 0x3090
-#define EGL_LUMINANCE_BUFFER 0x308F
-#define EGL_LUMINANCE_SIZE 0x303D
-#define EGL_OPENGL_ES_BIT 0x0001
-#define EGL_OPENVG_BIT 0x0002
-#define EGL_OPENGL_ES_API 0x30A0
-#define EGL_OPENVG_API 0x30A1
-#define EGL_OPENVG_IMAGE 0x3096
-#define EGL_PIXEL_ASPECT_RATIO 0x3092
-#define EGL_RENDERABLE_TYPE 0x3040
-#define EGL_RENDER_BUFFER 0x3086
-#define EGL_RGB_BUFFER 0x308E
-#define EGL_SINGLE_BUFFER 0x3085
-#define EGL_SWAP_BEHAVIOR 0x3093
-#define EGL_UNKNOWN ((EGLint)-1)
-#define EGL_VERTICAL_RESOLUTION 0x3091
-EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
-EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
-#endif /* EGL_VERSION_1_2 */
-
-#ifndef EGL_VERSION_1_3
-#define EGL_VERSION_1_3 1
-#define EGL_CONFORMANT 0x3042
-#define EGL_CONTEXT_CLIENT_VERSION 0x3098
-#define EGL_MATCH_NATIVE_PIXMAP 0x3041
-#define EGL_OPENGL_ES2_BIT 0x0004
-#define EGL_VG_ALPHA_FORMAT 0x3088
-#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
-#define EGL_VG_ALPHA_FORMAT_PRE 0x308C
-#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
-#define EGL_VG_COLORSPACE 0x3087
-#define EGL_VG_COLORSPACE_sRGB 0x3089
-#define EGL_VG_COLORSPACE_LINEAR 0x308A
-#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
-#endif /* EGL_VERSION_1_3 */
-
-#ifndef EGL_VERSION_1_4
-#define EGL_VERSION_1_4 1
-#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
-#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
-#define EGL_MULTISAMPLE_RESOLVE 0x3099
-#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
-#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
-#define EGL_OPENGL_API 0x30A2
-#define EGL_OPENGL_BIT 0x0008
-#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
-EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
-#endif /* EGL_VERSION_1_4 */
-
-#ifndef EGL_VERSION_1_5
-#define EGL_VERSION_1_5 1
-typedef void *EGLSync;
-typedef intptr_t EGLAttrib;
-typedef khronos_utime_nanoseconds_t EGLTime;
-typedef void *EGLImage;
-#define EGL_CONTEXT_MAJOR_VERSION 0x3098
-#define EGL_CONTEXT_MINOR_VERSION 0x30FB
-#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
-#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
-#define EGL_NO_RESET_NOTIFICATION 0x31BE
-#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
-#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
-#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
-#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
-#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
-#define EGL_OPENGL_ES3_BIT 0x00000040
-#define EGL_CL_EVENT_HANDLE 0x309C
-#define EGL_SYNC_CL_EVENT 0x30FE
-#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
-#define EGL_SYNC_TYPE 0x30F7
-#define EGL_SYNC_STATUS 0x30F1
-#define EGL_SYNC_CONDITION 0x30F8
-#define EGL_SIGNALED 0x30F2
-#define EGL_UNSIGNALED 0x30F3
-#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
-#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
-#define EGL_TIMEOUT_EXPIRED 0x30F5
-#define EGL_CONDITION_SATISFIED 0x30F6
-#define EGL_NO_SYNC ((EGLSync)0)
-#define EGL_SYNC_FENCE 0x30F9
-#define EGL_GL_COLORSPACE 0x309D
-#define EGL_GL_COLORSPACE_SRGB 0x3089
-#define EGL_GL_COLORSPACE_LINEAR 0x308A
-#define EGL_GL_RENDERBUFFER 0x30B9
-#define EGL_GL_TEXTURE_2D 0x30B1
-#define EGL_GL_TEXTURE_LEVEL 0x30BC
-#define EGL_GL_TEXTURE_3D 0x30B2
-#define EGL_GL_TEXTURE_ZOFFSET 0x30BD
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
-#define EGL_IMAGE_PRESERVED 0x30D2
-#define EGL_NO_IMAGE ((EGLImage)0)
-EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
-EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
-#endif /* EGL_VERSION_1_5 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/linux/EGL/eglext.h b/include/linux/EGL/eglext.h
deleted file mode 100644
index d8e5ab537e..0000000000
--- a/include/linux/EGL/eglext.h
+++ /dev/null
@@ -1,804 +0,0 @@
-#ifndef __eglext_h_
-#define __eglext_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision: 28371 $ on $Date: 2014-10-01 09:16:09 -0700 (Wed, 01 Oct 2014) $
-*/
-
-#include <EGL/eglplatform.h>
-
-#define EGL_EGLEXT_VERSION 20141001
-
-/* Generated C header for:
- * API: egl
- * Versions considered: .*
- * Versions emitted: _nomatch_^
- * Default extensions included: egl
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef EGL_KHR_cl_event
-#define EGL_KHR_cl_event 1
-#define EGL_CL_EVENT_HANDLE_KHR 0x309C
-#define EGL_SYNC_CL_EVENT_KHR 0x30FE
-#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF
-#endif /* EGL_KHR_cl_event */
-
-#ifndef EGL_KHR_cl_event2
-#define EGL_KHR_cl_event2 1
-typedef void *EGLSyncKHR;
-typedef intptr_t EGLAttribKHR;
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
-#endif
-#endif /* EGL_KHR_cl_event2 */
-
-#ifndef EGL_KHR_client_get_all_proc_addresses
-#define EGL_KHR_client_get_all_proc_addresses 1
-#endif /* EGL_KHR_client_get_all_proc_addresses */
-
-#ifndef EGL_KHR_config_attribs
-#define EGL_KHR_config_attribs 1
-#define EGL_CONFORMANT_KHR 0x3042
-#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020
-#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040
-#endif /* EGL_KHR_config_attribs */
-
-#ifndef EGL_KHR_create_context
-#define EGL_KHR_create_context 1
-#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
-#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
-#define EGL_CONTEXT_FLAGS_KHR 0x30FC
-#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
-#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
-#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
-#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
-#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
-#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
-#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
-#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
-#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
-#endif /* EGL_KHR_create_context */
-
-#ifndef EGL_KHR_fence_sync
-#define EGL_KHR_fence_sync 1
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
-#define EGL_SYNC_CONDITION_KHR 0x30F8
-#define EGL_SYNC_FENCE_KHR 0x30F9
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_fence_sync */
-
-#ifndef EGL_KHR_get_all_proc_addresses
-#define EGL_KHR_get_all_proc_addresses 1
-#endif /* EGL_KHR_get_all_proc_addresses */
-
-#ifndef EGL_KHR_gl_colorspace
-#define EGL_KHR_gl_colorspace 1
-#define EGL_GL_COLORSPACE_KHR 0x309D
-#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089
-#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A
-#endif /* EGL_KHR_gl_colorspace */
-
-#ifndef EGL_KHR_gl_renderbuffer_image
-#define EGL_KHR_gl_renderbuffer_image 1
-#define EGL_GL_RENDERBUFFER_KHR 0x30B9
-#endif /* EGL_KHR_gl_renderbuffer_image */
-
-#ifndef EGL_KHR_gl_texture_2D_image
-#define EGL_KHR_gl_texture_2D_image 1
-#define EGL_GL_TEXTURE_2D_KHR 0x30B1
-#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC
-#endif /* EGL_KHR_gl_texture_2D_image */
-
-#ifndef EGL_KHR_gl_texture_3D_image
-#define EGL_KHR_gl_texture_3D_image 1
-#define EGL_GL_TEXTURE_3D_KHR 0x30B2
-#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD
-#endif /* EGL_KHR_gl_texture_3D_image */
-
-#ifndef EGL_KHR_gl_texture_cubemap_image
-#define EGL_KHR_gl_texture_cubemap_image 1
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8
-#endif /* EGL_KHR_gl_texture_cubemap_image */
-
-#ifndef EGL_KHR_image
-#define EGL_KHR_image 1
-typedef void *EGLImageKHR;
-#define EGL_NATIVE_PIXMAP_KHR 0x30B0
-#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
-typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
-#endif
-#endif /* EGL_KHR_image */
-
-#ifndef EGL_KHR_image_base
-#define EGL_KHR_image_base 1
-#define EGL_IMAGE_PRESERVED_KHR 0x30D2
-#endif /* EGL_KHR_image_base */
-
-#ifndef EGL_KHR_image_pixmap
-#define EGL_KHR_image_pixmap 1
-#endif /* EGL_KHR_image_pixmap */
-
-#ifndef EGL_KHR_lock_surface
-#define EGL_KHR_lock_surface 1
-#define EGL_READ_SURFACE_BIT_KHR 0x0001
-#define EGL_WRITE_SURFACE_BIT_KHR 0x0002
-#define EGL_LOCK_SURFACE_BIT_KHR 0x0080
-#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100
-#define EGL_MATCH_FORMAT_KHR 0x3043
-#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0
-#define EGL_FORMAT_RGB_565_KHR 0x30C1
-#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2
-#define EGL_FORMAT_RGBA_8888_KHR 0x30C3
-#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4
-#define EGL_LOCK_USAGE_HINT_KHR 0x30C5
-#define EGL_BITMAP_POINTER_KHR 0x30C6
-#define EGL_BITMAP_PITCH_KHR 0x30C7
-#define EGL_BITMAP_ORIGIN_KHR 0x30C8
-#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9
-#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
-#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB
-#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
-#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
-#define EGL_LOWER_LEFT_KHR 0x30CE
-#define EGL_UPPER_LEFT_KHR 0x30CF
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);
-#endif
-#endif /* EGL_KHR_lock_surface */
-
-#ifndef EGL_KHR_lock_surface2
-#define EGL_KHR_lock_surface2 1
-#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
-#endif /* EGL_KHR_lock_surface2 */
-
-#ifndef EGL_KHR_lock_surface3
-#define EGL_KHR_lock_surface3 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
-#endif
-#endif /* EGL_KHR_lock_surface3 */
-
-#ifndef EGL_KHR_platform_android
-#define EGL_KHR_platform_android 1
-#define EGL_PLATFORM_ANDROID_KHR 0x3141
-#endif /* EGL_KHR_platform_android */
-
-#ifndef EGL_KHR_platform_gbm
-#define EGL_KHR_platform_gbm 1
-#define EGL_PLATFORM_GBM_KHR 0x31D7
-#endif /* EGL_KHR_platform_gbm */
-
-#ifndef EGL_KHR_platform_wayland
-#define EGL_KHR_platform_wayland 1
-#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
-#endif /* EGL_KHR_platform_wayland */
-
-#ifndef EGL_KHR_platform_x11
-#define EGL_KHR_platform_x11 1
-#define EGL_PLATFORM_X11_KHR 0x31D5
-#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6
-#endif /* EGL_KHR_platform_x11 */
-
-#ifndef EGL_KHR_reusable_sync
-#define EGL_KHR_reusable_sync 1
-typedef khronos_utime_nanoseconds_t EGLTimeKHR;
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_SYNC_STATUS_KHR 0x30F1
-#define EGL_SIGNALED_KHR 0x30F2
-#define EGL_UNSIGNALED_KHR 0x30F3
-#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
-#define EGL_CONDITION_SATISFIED_KHR 0x30F6
-#define EGL_SYNC_TYPE_KHR 0x30F7
-#define EGL_SYNC_REUSABLE_KHR 0x30FA
-#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001
-#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
-#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_reusable_sync */
-
-#ifndef EGL_KHR_stream
-#define EGL_KHR_stream 1
-typedef void *EGLStreamKHR;
-typedef khronos_uint64_t EGLuint64KHR;
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
-#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
-#define EGL_PRODUCER_FRAME_KHR 0x3212
-#define EGL_CONSUMER_FRAME_KHR 0x3213
-#define EGL_STREAM_STATE_KHR 0x3214
-#define EGL_STREAM_STATE_CREATED_KHR 0x3215
-#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
-#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
-#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
-#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
-#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
-#define EGL_BAD_STREAM_KHR 0x321B
-#define EGL_BAD_STATE_KHR 0x321C
-typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_stream */
-
-#ifndef EGL_KHR_stream_consumer_gltexture
-#define EGL_KHR_stream_consumer_gltexture 1
-#ifdef EGL_KHR_stream
-#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_consumer_gltexture */
-
-#ifndef EGL_KHR_stream_cross_process_fd
-#define EGL_KHR_stream_cross_process_fd 1
-typedef int EGLNativeFileDescriptorKHR;
-#ifdef EGL_KHR_stream
-#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
-typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_cross_process_fd */
-
-#ifndef EGL_KHR_stream_fifo
-#define EGL_KHR_stream_fifo 1
-#ifdef EGL_KHR_stream
-#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
-#define EGL_STREAM_TIME_NOW_KHR 0x31FD
-#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
-#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_fifo */
-
-#ifndef EGL_KHR_stream_producer_aldatalocator
-#define EGL_KHR_stream_producer_aldatalocator 1
-#ifdef EGL_KHR_stream
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_producer_aldatalocator */
-
-#ifndef EGL_KHR_stream_producer_eglsurface
-#define EGL_KHR_stream_producer_eglsurface 1
-#ifdef EGL_KHR_stream
-#define EGL_STREAM_BIT_KHR 0x0800
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_producer_eglsurface */
-
-#ifndef EGL_KHR_surfaceless_context
-#define EGL_KHR_surfaceless_context 1
-#endif /* EGL_KHR_surfaceless_context */
-
-#ifndef EGL_KHR_vg_parent_image
-#define EGL_KHR_vg_parent_image 1
-#define EGL_VG_PARENT_IMAGE_KHR 0x30BA
-#endif /* EGL_KHR_vg_parent_image */
-
-#ifndef EGL_KHR_wait_sync
-#define EGL_KHR_wait_sync 1
-typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
-#endif
-#endif /* EGL_KHR_wait_sync */
-
-#ifndef EGL_ANDROID_blob_cache
-#define EGL_ANDROID_blob_cache 1
-typedef khronos_ssize_t EGLsizeiANDROID;
-typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
-typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
-typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-#endif
-#endif /* EGL_ANDROID_blob_cache */
-
-#ifndef EGL_ANDROID_framebuffer_target
-#define EGL_ANDROID_framebuffer_target 1
-#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147
-#endif /* EGL_ANDROID_framebuffer_target */
-
-#ifndef EGL_ANDROID_image_native_buffer
-#define EGL_ANDROID_image_native_buffer 1
-#define EGL_NATIVE_BUFFER_ANDROID 0x3140
-#endif /* EGL_ANDROID_image_native_buffer */
-
-#ifndef EGL_ANDROID_native_fence_sync
-#define EGL_ANDROID_native_fence_sync 1
-#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
-#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
-#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
-#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
-typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
-#endif
-#endif /* EGL_ANDROID_native_fence_sync */
-
-#ifndef EGL_ANDROID_recordable
-#define EGL_ANDROID_recordable 1
-#define EGL_RECORDABLE_ANDROID 0x3142
-#endif /* EGL_ANDROID_recordable */
-
-#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
-#define EGL_ANGLE_d3d_share_handle_client_buffer 1
-#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
-#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */
-
-#ifndef EGL_ANGLE_query_surface_pointer
-#define EGL_ANGLE_query_surface_pointer 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
-#endif
-#endif /* EGL_ANGLE_query_surface_pointer */
-
-#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
-#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
-#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */
-
-#ifndef EGL_ARM_pixmap_multisample_discard
-#define EGL_ARM_pixmap_multisample_discard 1
-#define EGL_DISCARD_SAMPLES_ARM 0x3286
-#endif /* EGL_ARM_pixmap_multisample_discard */
-
-#ifndef EGL_EXT_buffer_age
-#define EGL_EXT_buffer_age 1
-#define EGL_BUFFER_AGE_EXT 0x313D
-#endif /* EGL_EXT_buffer_age */
-
-#ifndef EGL_EXT_client_extensions
-#define EGL_EXT_client_extensions 1
-#endif /* EGL_EXT_client_extensions */
-
-#ifndef EGL_EXT_create_context_robustness
-#define EGL_EXT_create_context_robustness 1
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
-#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
-#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
-#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
-#endif /* EGL_EXT_create_context_robustness */
-
-#ifndef EGL_EXT_device_base
-#define EGL_EXT_device_base 1
-typedef void *EGLDeviceEXT;
-#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0))
-#define EGL_BAD_DEVICE_EXT 0x322B
-#define EGL_DEVICE_EXT 0x322C
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
-EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-#endif
-#endif /* EGL_EXT_device_base */
-
-#ifndef EGL_EXT_device_drm
-#define EGL_EXT_device_drm 1
-#define EGL_DRM_DEVICE_FILE_EXT 0x3233
-#endif /* EGL_EXT_device_drm */
-
-#ifndef EGL_EXT_device_openwf
-#define EGL_EXT_device_openwf 1
-#define EGL_OPENWF_DEVICE_ID_EXT 0x3237
-#endif /* EGL_EXT_device_openwf */
-
-#ifndef EGL_EXT_image_dma_buf_import
-#define EGL_EXT_image_dma_buf_import 1
-#define EGL_LINUX_DMA_BUF_EXT 0x3270
-#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
-#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
-#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
-#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
-#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
-#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
-#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
-#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
-#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
-#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
-#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
-#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
-#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
-#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
-#define EGL_ITU_REC601_EXT 0x327F
-#define EGL_ITU_REC709_EXT 0x3280
-#define EGL_ITU_REC2020_EXT 0x3281
-#define EGL_YUV_FULL_RANGE_EXT 0x3282
-#define EGL_YUV_NARROW_RANGE_EXT 0x3283
-#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
-#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
-#endif /* EGL_EXT_image_dma_buf_import */
-
-#ifndef EGL_EXT_multiview_window
-#define EGL_EXT_multiview_window 1
-#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134
-#endif /* EGL_EXT_multiview_window */
-
-#ifndef EGL_EXT_output_base
-#define EGL_EXT_output_base 1
-typedef void *EGLOutputLayerEXT;
-typedef void *EGLOutputPortEXT;
-#define EGL_NO_OUTPUT_LAYER_EXT ((EGLOutputLayerEXT)0)
-#define EGL_NO_OUTPUT_PORT_EXT ((EGLOutputPortEXT)0)
-#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D
-#define EGL_BAD_OUTPUT_PORT_EXT 0x322E
-#define EGL_SWAP_INTERVAL_EXT 0x322F
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
-EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
-EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
-EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
-#endif
-#endif /* EGL_EXT_output_base */
-
-#ifndef EGL_EXT_output_drm
-#define EGL_EXT_output_drm 1
-#define EGL_DRM_CRTC_EXT 0x3234
-#define EGL_DRM_PLANE_EXT 0x3235
-#define EGL_DRM_CONNECTOR_EXT 0x3236
-#endif /* EGL_EXT_output_drm */
-
-#ifndef EGL_EXT_output_openwf
-#define EGL_EXT_output_openwf 1
-#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238
-#define EGL_OPENWF_PORT_ID_EXT 0x3239
-#endif /* EGL_EXT_output_openwf */
-
-#ifndef EGL_EXT_platform_base
-#define EGL_EXT_platform_base 1
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
-#endif
-#endif /* EGL_EXT_platform_base */
-
-#ifndef EGL_EXT_platform_device
-#define EGL_EXT_platform_device 1
-#define EGL_PLATFORM_DEVICE_EXT 0x313F
-#endif /* EGL_EXT_platform_device */
-
-#ifndef EGL_EXT_platform_wayland
-#define EGL_EXT_platform_wayland 1
-#define EGL_PLATFORM_WAYLAND_EXT 0x31D8
-#endif /* EGL_EXT_platform_wayland */
-
-#ifndef EGL_EXT_platform_x11
-#define EGL_EXT_platform_x11 1
-#define EGL_PLATFORM_X11_EXT 0x31D5
-#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6
-#endif /* EGL_EXT_platform_x11 */
-
-#ifndef EGL_EXT_protected_surface
-#define EGL_EXT_protected_surface 1
-#define EGL_PROTECTED_CONTENT_EXT 0x32C0
-#endif /* EGL_EXT_protected_surface */
-
-#ifndef EGL_EXT_stream_consumer_egloutput
-#define EGL_EXT_stream_consumer_egloutput 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
-#endif
-#endif /* EGL_EXT_stream_consumer_egloutput */
-
-#ifndef EGL_EXT_swap_buffers_with_damage
-#define EGL_EXT_swap_buffers_with_damage 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-#endif
-#endif /* EGL_EXT_swap_buffers_with_damage */
-
-#ifndef EGL_HI_clientpixmap
-#define EGL_HI_clientpixmap 1
-struct EGLClientPixmapHI {
- void *pData;
- EGLint iWidth;
- EGLint iHeight;
- EGLint iStride;
-};
-#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
-#endif
-#endif /* EGL_HI_clientpixmap */
-
-#ifndef EGL_HI_colorformats
-#define EGL_HI_colorformats 1
-#define EGL_COLOR_FORMAT_HI 0x8F70
-#define EGL_COLOR_RGB_HI 0x8F71
-#define EGL_COLOR_RGBA_HI 0x8F72
-#define EGL_COLOR_ARGB_HI 0x8F73
-#endif /* EGL_HI_colorformats */
-
-#ifndef EGL_IMG_context_priority
-#define EGL_IMG_context_priority 1
-#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
-#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
-#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
-#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
-#endif /* EGL_IMG_context_priority */
-
-#ifndef EGL_MESA_drm_image
-#define EGL_MESA_drm_image 1
-#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0
-#define EGL_DRM_BUFFER_USE_MESA 0x31D1
-#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
-#define EGL_DRM_BUFFER_MESA 0x31D3
-#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
-#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001
-#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002
-typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
-#endif
-#endif /* EGL_MESA_drm_image */
-
-#ifndef EGL_MESA_platform_gbm
-#define EGL_MESA_platform_gbm 1
-#define EGL_PLATFORM_GBM_MESA 0x31D7
-#endif /* EGL_MESA_platform_gbm */
-
-#ifndef EGL_NOK_swap_region
-#define EGL_NOK_swap_region 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#endif
-#endif /* EGL_NOK_swap_region */
-
-#ifndef EGL_NOK_swap_region2
-#define EGL_NOK_swap_region2 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#endif
-#endif /* EGL_NOK_swap_region2 */
-
-#ifndef EGL_NOK_texture_from_pixmap
-#define EGL_NOK_texture_from_pixmap 1
-#define EGL_Y_INVERTED_NOK 0x307F
-#endif /* EGL_NOK_texture_from_pixmap */
-
-#ifndef EGL_NV_3dvision_surface
-#define EGL_NV_3dvision_surface 1
-#define EGL_AUTO_STEREO_NV 0x3136
-#endif /* EGL_NV_3dvision_surface */
-
-#ifndef EGL_NV_coverage_sample
-#define EGL_NV_coverage_sample 1
-#define EGL_COVERAGE_BUFFERS_NV 0x30E0
-#define EGL_COVERAGE_SAMPLES_NV 0x30E1
-#endif /* EGL_NV_coverage_sample */
-
-#ifndef EGL_NV_coverage_sample_resolve
-#define EGL_NV_coverage_sample_resolve 1
-#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
-#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
-#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
-#endif /* EGL_NV_coverage_sample_resolve */
-
-#ifndef EGL_NV_cuda_event
-#define EGL_NV_cuda_event 1
-#define EGL_CUDA_EVENT_HANDLE_NV 0x323B
-#define EGL_SYNC_CUDA_EVENT_NV 0x323C
-#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D
-#endif /* EGL_NV_cuda_event */
-
-#ifndef EGL_NV_depth_nonlinear
-#define EGL_NV_depth_nonlinear 1
-#define EGL_DEPTH_ENCODING_NV 0x30E2
-#define EGL_DEPTH_ENCODING_NONE_NV 0
-#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
-#endif /* EGL_NV_depth_nonlinear */
-
-#ifndef EGL_NV_device_cuda
-#define EGL_NV_device_cuda 1
-#define EGL_CUDA_DEVICE_NV 0x323A
-#endif /* EGL_NV_device_cuda */
-
-#ifndef EGL_NV_native_query
-#define EGL_NV_native_query 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
-#endif
-#endif /* EGL_NV_native_query */
-
-#ifndef EGL_NV_post_convert_rounding
-#define EGL_NV_post_convert_rounding 1
-#endif /* EGL_NV_post_convert_rounding */
-
-#ifndef EGL_NV_post_sub_buffer
-#define EGL_NV_post_sub_buffer 1
-#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
-#endif
-#endif /* EGL_NV_post_sub_buffer */
-
-#ifndef EGL_NV_stream_sync
-#define EGL_NV_stream_sync 1
-#define EGL_SYNC_NEW_FRAME_NV 0x321F
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
-#endif
-#endif /* EGL_NV_stream_sync */
-
-#ifndef EGL_NV_sync
-#define EGL_NV_sync 1
-typedef void *EGLSyncNV;
-typedef khronos_utime_nanoseconds_t EGLTimeNV;
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
-#define EGL_SYNC_STATUS_NV 0x30E7
-#define EGL_SIGNALED_NV 0x30E8
-#define EGL_UNSIGNALED_NV 0x30E9
-#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
-#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
-#define EGL_ALREADY_SIGNALED_NV 0x30EA
-#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
-#define EGL_CONDITION_SATISFIED_NV 0x30EC
-#define EGL_SYNC_TYPE_NV 0x30ED
-#define EGL_SYNC_CONDITION_NV 0x30EE
-#define EGL_SYNC_FENCE_NV 0x30EF
-#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
-typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
-EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_NV_sync */
-
-#ifndef EGL_NV_system_time
-#define EGL_NV_system_time 1
-typedef khronos_utime_nanoseconds_t EGLuint64NV;
-#ifdef KHRONOS_SUPPORT_INT64
-typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
-typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);
-EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_NV_system_time */
-
-#ifndef EGL_TIZEN_image_native_buffer
-#define EGL_TIZEN_image_native_buffer 1
-#define EGL_NATIVE_BUFFER_TIZEN 0x32A0
-#endif /* EGL_TIZEN_image_native_buffer */
-
-#ifndef EGL_TIZEN_image_native_surface
-#define EGL_TIZEN_image_native_surface 1
-#define EGL_NATIVE_SURFACE_TIZEN 0x32A1
-#endif /* EGL_TIZEN_image_native_surface */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/linux/EGL/eglplatform.h b/include/linux/EGL/eglplatform.h
deleted file mode 100644
index 914a7ef592..0000000000
--- a/include/linux/EGL/eglplatform.h
+++ /dev/null
@@ -1,121 +0,0 @@
-#ifndef __eglplatform_h_
-#define __eglplatform_h_
-
-/*
-** Copyright (c) 2007-2019 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Platform-specific types and definitions for egl.h
- * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "EGL" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-/* Macros used in EGL function prototype declarations.
- *
- * EGL functions should be prototyped as:
- *
- * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
- * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
- *
- * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
- */
-
-#ifndef EGLAPI
-#define EGLAPI KHRONOS_APICALL
-#endif
-
-#ifndef EGLAPIENTRY
-#define EGLAPIENTRY KHRONOS_APIENTRY
-#endif
-#define EGLAPIENTRYP EGLAPIENTRY*
-
-/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
- * are aliases of window-system-dependent types, such as X Display * or
- * Windows Device Context. They must be defined in platform-specific
- * code below. The EGL-prefixed versions of Native*Type are the same
- * types, renamed in EGL 1.3 so all types in the API start with "EGL".
- *
- * Khronos STRONGLY RECOMMENDS that you use the default definitions
- * provided below, since these changes affect both binary and source
- * portability of applications using EGL running on different EGL
- * implementations.
- */
-
-#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#include <windows.h>
-
-typedef HDC EGLNativeDisplayType;
-typedef HBITMAP EGLNativePixmapType;
-typedef HWND EGLNativeWindowType;
-
-#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
-
-typedef int EGLNativeDisplayType;
-typedef void *EGLNativeWindowType;
-typedef void *EGLNativePixmapType;
-
-#elif (defined(__arm__) || defined(__aarch64__)) && defined(__gnu_linux__) /* ARM Linux Mali */
-
-typedef int EGLNativeDisplayType;
-typedef void *EGLNativeWindowType;
-typedef void *EGLNativePixmapType;
-
-#elif defined(__unix__)
-
-/* X11 (tentative) */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef Display *EGLNativeDisplayType;
-typedef Pixmap EGLNativePixmapType;
-typedef Window EGLNativeWindowType;
-
-#else
-#error "Platform not recognized"
-#endif
-
-/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-typedef EGLNativeDisplayType NativeDisplayType;
-typedef EGLNativePixmapType NativePixmapType;
-typedef EGLNativeWindowType NativeWindowType;
-
-
-/* Define EGLint. This must be a signed integral type large enough to contain
- * all legal attribute names and values passed into and out of EGL, whether
- * their type is boolean, bitmask, enumerant (symbolic constant), integer,
- * handle, or other. While in general a 32-bit integer will suffice, if
- * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
- * integer type.
- */
-typedef khronos_int32_t EGLint;
-
-#endif /* __eglplatform_h */
diff --git a/include/linux/GLES/gl.h b/include/linux/GLES/gl.h
deleted file mode 100644
index 5b8d85a920..0000000000
--- a/include/linux/GLES/gl.h
+++ /dev/null
@@ -1,770 +0,0 @@
-#ifndef __gl_h_
-#define __gl_h_
-
-/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
-
-#include <GLES/glplatform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef khronos_int32_t GLclampx;
-
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
-
-
-/*************************************************************/
-
-/* OpenGL ES core versions */
-#define GL_VERSION_ES_CM_1_0 1
-#define GL_VERSION_ES_CL_1_0 1
-#define GL_VERSION_ES_CM_1_1 1
-#define GL_VERSION_ES_CL_1_1 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
-#define GL_FALSE 0
-#define GL_TRUE 1
-
-/* BeginMode */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-
-/* BlendingFactorDest */
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* ClipPlaneName */
-#define GL_CLIP_PLANE0 0x3000
-#define GL_CLIP_PLANE1 0x3001
-#define GL_CLIP_PLANE2 0x3002
-#define GL_CLIP_PLANE3 0x3003
-#define GL_CLIP_PLANE4 0x3004
-#define GL_CLIP_PLANE5 0x3005
-
-/* ColorMaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* ColorMaterialParameter */
-/* GL_AMBIENT_AND_DIFFUSE */
-
-/* ColorPointerType */
-/* GL_UNSIGNED_BYTE */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* CullFaceMode */
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
-#define GL_FOG 0x0B60
-#define GL_LIGHTING 0x0B50
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_ALPHA_TEST 0x0BC0
-#define GL_BLEND 0x0BE2
-#define GL_COLOR_LOGIC_OP 0x0BF2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-/* GL_LIGHT0 */
-/* GL_LIGHT1 */
-/* GL_LIGHT2 */
-/* GL_LIGHT3 */
-/* GL_LIGHT4 */
-/* GL_LIGHT5 */
-/* GL_LIGHT6 */
-/* GL_LIGHT7 */
-#define GL_POINT_SMOOTH 0x0B10
-#define GL_LINE_SMOOTH 0x0B20
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_COLOR_MATERIAL 0x0B57
-#define GL_NORMALIZE 0x0BA1
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_VERTEX_ARRAY 0x8074
-#define GL_NORMAL_ARRAY 0x8075
-#define GL_COLOR_ARRAY 0x8076
-#define GL_TEXTURE_COORD_ARRAY 0x8078
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_STACK_OVERFLOW 0x0503
-#define GL_STACK_UNDERFLOW 0x0504
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* FogMode */
-/* GL_LINEAR */
-#define GL_EXP 0x0800
-#define GL_EXP2 0x0801
-
-/* FogParameter */
-#define GL_FOG_DENSITY 0x0B62
-#define GL_FOG_START 0x0B63
-#define GL_FOG_END 0x0B64
-#define GL_FOG_MODE 0x0B65
-#define GL_FOG_COLOR 0x0B66
-
-/* FrontFaceDirection */
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-
-/* GetPName */
-#define GL_CURRENT_COLOR 0x0B00
-#define GL_CURRENT_NORMAL 0x0B02
-#define GL_CURRENT_TEXTURE_COORDS 0x0B03
-#define GL_POINT_SIZE 0x0B11
-#define GL_POINT_SIZE_MIN 0x8126
-#define GL_POINT_SIZE_MAX 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
-#define GL_POINT_DISTANCE_ATTENUATION 0x8129
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_LINE_WIDTH 0x0B21
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_SHADE_MODEL 0x0B54
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_MATRIX_MODE 0x0BA0
-#define GL_VIEWPORT 0x0BA2
-#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
-#define GL_PROJECTION_STACK_DEPTH 0x0BA4
-#define GL_TEXTURE_STACK_DEPTH 0x0BA5
-#define GL_MODELVIEW_MATRIX 0x0BA6
-#define GL_PROJECTION_MATRIX 0x0BA7
-#define GL_TEXTURE_MATRIX 0x0BA8
-#define GL_ALPHA_TEST_FUNC 0x0BC1
-#define GL_ALPHA_TEST_REF 0x0BC2
-#define GL_BLEND_DST 0x0BE0
-#define GL_BLEND_SRC 0x0BE1
-#define GL_LOGIC_OP_MODE 0x0BF0
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_LIGHTS 0x0D31
-#define GL_MAX_CLIP_PLANES 0x0D32
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
-#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_VERTEX_ARRAY_SIZE 0x807A
-#define GL_VERTEX_ARRAY_TYPE 0x807B
-#define GL_VERTEX_ARRAY_STRIDE 0x807C
-#define GL_NORMAL_ARRAY_TYPE 0x807E
-#define GL_NORMAL_ARRAY_STRIDE 0x807F
-#define GL_COLOR_ARRAY_SIZE 0x8081
-#define GL_COLOR_ARRAY_TYPE 0x8082
-#define GL_COLOR_ARRAY_STRIDE 0x8083
-#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
-#define GL_VERTEX_ARRAY_POINTER 0x808E
-#define GL_NORMAL_ARRAY_POINTER 0x808F
-#define GL_COLOR_ARRAY_POINTER 0x8090
-#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-
-/* GetTextureParameter */
-/* GL_TEXTURE_MAG_FILTER */
-/* GL_TEXTURE_MIN_FILTER */
-/* GL_TEXTURE_WRAP_S */
-/* GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* HintTarget */
-#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
-#define GL_POINT_SMOOTH_HINT 0x0C51
-#define GL_LINE_SMOOTH_HINT 0x0C52
-#define GL_FOG_HINT 0x0C54
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-
-/* LightModelParameter */
-#define GL_LIGHT_MODEL_AMBIENT 0x0B53
-#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
-
-/* LightParameter */
-#define GL_AMBIENT 0x1200
-#define GL_DIFFUSE 0x1201
-#define GL_SPECULAR 0x1202
-#define GL_POSITION 0x1203
-#define GL_SPOT_DIRECTION 0x1204
-#define GL_SPOT_EXPONENT 0x1205
-#define GL_SPOT_CUTOFF 0x1206
-#define GL_CONSTANT_ATTENUATION 0x1207
-#define GL_LINEAR_ATTENUATION 0x1208
-#define GL_QUADRATIC_ATTENUATION 0x1209
-
-/* DataType */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-
-/* LogicOp */
-#define GL_CLEAR 0x1500
-#define GL_AND 0x1501
-#define GL_AND_REVERSE 0x1502
-#define GL_COPY 0x1503
-#define GL_AND_INVERTED 0x1504
-#define GL_NOOP 0x1505
-#define GL_XOR 0x1506
-#define GL_OR 0x1507
-#define GL_NOR 0x1508
-#define GL_EQUIV 0x1509
-#define GL_INVERT 0x150A
-#define GL_OR_REVERSE 0x150B
-#define GL_COPY_INVERTED 0x150C
-#define GL_OR_INVERTED 0x150D
-#define GL_NAND 0x150E
-#define GL_SET 0x150F
-
-/* MaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* MaterialParameter */
-#define GL_EMISSION 0x1600
-#define GL_SHININESS 0x1601
-#define GL_AMBIENT_AND_DIFFUSE 0x1602
-/* GL_AMBIENT */
-/* GL_DIFFUSE */
-/* GL_SPECULAR */
-
-/* MatrixMode */
-#define GL_MODELVIEW 0x1700
-#define GL_PROJECTION 0x1701
-#define GL_TEXTURE 0x1702
-
-/* NormalPointerType */
-/* GL_BYTE */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* PixelFormat */
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-
-/* PixelStoreParameter */
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-
-/* PixelType */
-/* GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-
-/* ShadingModel */
-#define GL_FLAT 0x1D00
-#define GL_SMOOTH 0x1D01
-
-/* StencilFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* StencilOp */
-/* GL_ZERO */
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-/* GL_INVERT */
-
-/* StringName */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* TexCoordPointerType */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-/* GL_BYTE */
-
-/* TextureEnvMode */
-#define GL_MODULATE 0x2100
-#define GL_DECAL 0x2101
-/* GL_BLEND */
-#define GL_ADD 0x0104
-/* GL_REPLACE */
-
-/* TextureEnvParameter */
-#define GL_TEXTURE_ENV_MODE 0x2200
-#define GL_TEXTURE_ENV_COLOR 0x2201
-
-/* TextureEnvTarget */
-#define GL_TEXTURE_ENV 0x2300
-
-/* TextureMagFilter */
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-
-/* TextureMinFilter */
-/* GL_NEAREST */
-/* GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_GENERATE_MIPMAP 0x8191
-
-/* TextureTarget */
-/* GL_TEXTURE_2D */
-
-/* TextureUnit */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-
-/* TextureWrapMode */
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-
-/* VertexPointerType */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-/* GL_BYTE */
-
-/* LightName */
-#define GL_LIGHT0 0x4000
-#define GL_LIGHT1 0x4001
-#define GL_LIGHT2 0x4002
-#define GL_LIGHT3 0x4003
-#define GL_LIGHT4 0x4004
-#define GL_LIGHT5 0x4005
-#define GL_LIGHT6 0x4006
-#define GL_LIGHT7 0x4007
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
-#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
-#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
-#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
-
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-
-/* Texture combine + dot3 */
-#define GL_SUBTRACT 0x84E7
-#define GL_COMBINE 0x8570
-#define GL_COMBINE_RGB 0x8571
-#define GL_COMBINE_ALPHA 0x8572
-#define GL_RGB_SCALE 0x8573
-#define GL_ADD_SIGNED 0x8574
-#define GL_INTERPOLATE 0x8575
-#define GL_CONSTANT 0x8576
-#define GL_PRIMARY_COLOR 0x8577
-#define GL_PREVIOUS 0x8578
-#define GL_OPERAND0_RGB 0x8590
-#define GL_OPERAND1_RGB 0x8591
-#define GL_OPERAND2_RGB 0x8592
-#define GL_OPERAND0_ALPHA 0x8598
-#define GL_OPERAND1_ALPHA 0x8599
-#define GL_OPERAND2_ALPHA 0x859A
-
-#define GL_ALPHA_SCALE 0x0D1C
-
-#define GL_SRC0_RGB 0x8580
-#define GL_SRC1_RGB 0x8581
-#define GL_SRC2_RGB 0x8582
-#define GL_SRC0_ALPHA 0x8588
-#define GL_SRC1_ALPHA 0x8589
-#define GL_SRC2_ALPHA 0x858A
-
-#define GL_DOT3_RGB 0x86AE
-#define GL_DOT3_RGBA 0x86AF
-
-/*------------------------------------------------------------------------*
- * required OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* OES_read_format */
-#ifndef GL_OES_read_format
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif
-
-/* OES_point_size_array */
-#ifndef GL_OES_point_size_array
-#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
-#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
-#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
-#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
-#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
-#endif
-
-/* GL_OES_point_sprite */
-#ifndef GL_OES_point_sprite
-#define GL_POINT_SPRITE_OES 0x8861
-#define GL_COORD_REPLACE_OES 0x8862
-#endif
-
-/*************************************************************/
-
-/* Available only in Common profile */
-GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
-GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
-GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
-GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glLineWidth (GLfloat width);
-GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
-GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
-GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
-GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glPointSize (GLfloat size);
-GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
-GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
-
-/* Available in both Common and Common-Lite profiles */
-GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
-GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
-GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
-GL_API void GL_APIENTRY glClear (GLbitfield mask);
-GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
-GL_API void GL_APIENTRY glClearStencil (GLint s);
-GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
-GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
-GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glCullFace (GLenum mode);
-GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_API void GL_APIENTRY glDepthFunc (GLenum func);
-GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
-GL_API void GL_APIENTRY glDisable (GLenum cap);
-GL_API void GL_APIENTRY glDisableClientState (GLenum array);
-GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
-GL_API void GL_APIENTRY glEnable (GLenum cap);
-GL_API void GL_APIENTRY glEnableClientState (GLenum array);
-GL_API void GL_APIENTRY glFinish (void);
-GL_API void GL_APIENTRY glFlush (void);
-GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glFrontFace (GLenum mode);
-GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
-GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
-GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_API GLenum GL_APIENTRY glGetError (void);
-GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params);
-GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
-GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
-GL_API void GL_APIENTRY glLoadIdentity (void);
-GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
-GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
-GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
-GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
-GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
-GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glPointSizex (GLfixed size);
-GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
-GL_API void GL_APIENTRY glPopMatrix (void);
-GL_API void GL_APIENTRY glPushMatrix (void);
-GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
-GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
-GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glShadeModel (GLenum mode);
-GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_API void GL_APIENTRY glStencilMask (GLuint mask);
-GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
-GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-/*------------------------------------------------------------------------*
- * Required OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_read_format */
-#ifndef GL_OES_read_format
-#define GL_OES_read_format 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_point_size_array */
-#ifndef GL_OES_point_size_array
-#define GL_OES_point_size_array 1
-GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-/* GL_OES_point_sprite */
-#ifndef GL_OES_point_sprite
-#define GL_OES_point_sprite 1
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl_h_ */
-
diff --git a/include/linux/GLES/glext.h b/include/linux/GLES/glext.h
deleted file mode 100644
index 5b46ae6d05..0000000000
--- a/include/linux/GLES/glext.h
+++ /dev/null
@@ -1,1278 +0,0 @@
-#ifndef __glext_h_
-#define __glext_h_
-
-/* $Revision: 19260 $ on $Date:: 2012-09-20 11:30:36 -0700 #$ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-#ifndef GL_APIENTRYP
-# define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_blend_equation_separate */
-#ifndef GL_OES_blend_equation_separate
-/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */
-#define GL_BLEND_EQUATION_RGB_OES 0x8009
-#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
-#endif
-
-/* GL_OES_blend_func_separate */
-#ifndef GL_OES_blend_func_separate
-#define GL_BLEND_DST_RGB_OES 0x80C8
-#define GL_BLEND_SRC_RGB_OES 0x80C9
-#define GL_BLEND_DST_ALPHA_OES 0x80CA
-#define GL_BLEND_SRC_ALPHA_OES 0x80CB
-#endif
-
-/* GL_OES_blend_subtract */
-#ifndef GL_OES_blend_subtract
-#define GL_BLEND_EQUATION_OES 0x8009
-#define GL_FUNC_ADD_OES 0x8006
-#define GL_FUNC_SUBTRACT_OES 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
-#endif
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES 0x8D64
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif
-
-/* GL_OES_draw_texture */
-#ifndef GL_OES_draw_texture
-#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT 0x1405
-#endif
-
-/* GL_OES_fixed_point */
-#ifndef GL_OES_fixed_point
-#define GL_FIXED_OES 0x140C
-#endif
-
-/* GL_OES_framebuffer_object */
-#ifndef GL_OES_framebuffer_object
-#define GL_NONE_OES 0
-#define GL_FRAMEBUFFER_OES 0x8D40
-#define GL_RENDERBUFFER_OES 0x8D41
-#define GL_RGBA4_OES 0x8056
-#define GL_RGB5_A1_OES 0x8057
-#define GL_RGB565_OES 0x8D62
-#define GL_DEPTH_COMPONENT16_OES 0x81A5
-#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
-#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
-#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
-#define GL_DEPTH_ATTACHMENT_OES 0x8D00
-#define GL_STENCIL_ATTACHMENT_OES 0x8D20
-#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
-#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
-#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
-#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
-#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-#endif
-
-/* GL_OES_matrix_get */
-#ifndef GL_OES_matrix_get
-#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
-#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
-#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
-#endif
-
-/* GL_OES_matrix_palette */
-#ifndef GL_OES_matrix_palette
-#define GL_MAX_VERTEX_UNITS_OES 0x86A4
-#define GL_MAX_PALETTE_MATRICES_OES 0x8842
-#define GL_MATRIX_PALETTE_OES 0x8840
-#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
-#define GL_WEIGHT_ARRAY_OES 0x86AD
-#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
-#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
-#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
-#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
-#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
-#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
-#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
-#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
-#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
-#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif
-
-/* GL_OES_required_internalformat */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES 0x8051
-#define GL_RGBA8_OES 0x8058
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES 0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES 0x8D47
-#endif
-
-/* GL_OES_stencil8 */
-#ifndef GL_OES_stencil8
-#define GL_STENCIL_INDEX8_OES 0x8D48
-#endif
-
-/* GL_OES_stencil_wrap */
-#ifndef GL_OES_stencil_wrap
-#define GL_INCR_WRAP_OES 0x8507
-#define GL_DECR_WRAP_OES 0x8508
-#endif
-
-/* GL_OES_texture_cube_map */
-#ifndef GL_OES_texture_cube_map
-#define GL_NORMAL_MAP_OES 0x8511
-#define GL_REFLECTION_MAP_OES 0x8512
-#define GL_TEXTURE_CUBE_MAP_OES 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
-#define GL_TEXTURE_GEN_MODE_OES 0x2500
-#define GL_TEXTURE_GEN_STR_OES 0x8D60
-#endif
-
-/* GL_OES_texture_mirrored_repeat */
-#ifndef GL_OES_texture_mirrored_repeat
-#define GL_MIRRORED_REPEAT_OES 0x8370
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD 0x87F9
-#define GL_3DC_XY_AMD 0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD 0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_copy_texture_levels */
-/* No new tokens introduced by this extension. */
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
-#define GL_MAX_SAMPLES_APPLE 0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
-#endif
-
-/* GL_APPLE_sync */
-#ifndef GL_APPLE_sync
-
-/* These types are defined with reference to <inttypes.h>
- * in the Apple extension spec, but here we use the Khronos
- * portable types in khrplatform.h, and assume those types
- * are always defined.
- * If any other extensions using these types are defined,
- * the typedefs must move out of this block and be shared.
- */
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef struct __GLsync *GLsync;
-
-#define GL_SYNC_OBJECT_APPLE 0x8A53
-#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
-#define GL_OBJECT_TYPE_APPLE 0x9112
-#define GL_SYNC_CONDITION_APPLE 0x9113
-#define GL_SYNC_STATUS_APPLE 0x9114
-#define GL_SYNC_FLAGS_APPLE 0x9115
-#define GL_SYNC_FENCE_APPLE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
-#define GL_UNSIGNALED_APPLE 0x9118
-#define GL_SIGNALED_APPLE 0x9119
-#define GL_ALREADY_SIGNALED_APPLE 0x911A
-#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
-#define GL_CONDITION_SATISFIED_APPLE 0x911C
-#define GL_WAIT_FAILED_APPLE 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
-#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
-#endif
-
-/* GL_APPLE_texture_2D_limited_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_rgba8 */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT 0x1800
-#define GL_DEPTH_EXT 0x1801
-#define GL_STENCIL_EXT 0x1802
-#endif
-
-/* GL_EXT_map_buffer_range */
-#ifndef GL_EXT_map_buffer_range
-#define GL_MAP_READ_BIT_EXT 0x0001
-#define GL_MAP_WRITE_BIT_EXT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
-/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
-#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
-#define GL_MAX_SAMPLES_EXT 0x8D57
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-/* reuse GL_NO_ERROR */
-#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_SRGB_EXT 0x8C40
-#define GL_SRGB_ALPHA_EXT 0x8C42
-#define GL_SRGB8_ALPHA8_EXT 0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_EXT_texture_lod_bias */
-#ifndef GL_EXT_texture_lod_bias
-#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
-#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
-#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
-#define GL_ALPHA8_EXT 0x803C
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_RGBA32F_EXT 0x8814
-#define GL_RGB32F_EXT 0x8815
-#define GL_ALPHA32F_EXT 0x8816
-#define GL_LUMINANCE32F_EXT 0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
-/* reuse GL_RGBA16F_EXT */
-#define GL_RGB16F_EXT 0x881B
-#define GL_ALPHA16F_EXT 0x881C
-#define GL_LUMINANCE16F_EXT 0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
-#define GL_RGB10_A2_EXT 0x8059
-#define GL_RGB10_EXT 0x8052
-#define GL_BGRA8_EXT 0x93A1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#endif
-
-/* GL_IMG_texture_env_enhanced_fixed_function */
-#ifndef GL_IMG_texture_env_enhanced_fixed_function
-#define GL_MODULATE_COLOR_IMG 0x8C04
-#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05
-#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06
-#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07
-#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08
-#define GL_ADD_BLEND_IMG 0x8C09
-#define GL_DOT3_RGBA_IMG 0x86AF
-#endif
-
-/* GL_IMG_user_clip_plane */
-#ifndef GL_IMG_user_clip_plane
-#define GL_CLIP_PLANE0_IMG 0x3000
-#define GL_CLIP_PLANE1_IMG 0x3001
-#define GL_CLIP_PLANE2_IMG 0x3002
-#define GL_CLIP_PLANE3_IMG 0x3003
-#define GL_CLIP_PLANE4_IMG 0x3004
-#define GL_CLIP_PLANE5_IMG 0x3005
-#define GL_MAX_CLIP_PLANES_IMG 0x0D32
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
-#define GL_MAX_SAMPLES_IMG 0x9135
-#define GL_TEXTURE_SAMPLES_IMG 0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
-#define GL_TEXTURE_TYPE_QCOM 0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
-#define GL_TEXTURE_TARGET_QCOM 0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
-#define GL_STATE_RESTORE 0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM 0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_blend_equation_separate */
-#ifndef GL_OES_blend_equation_separate
-#define GL_OES_blend_equation_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
-#endif
-
-/* GL_OES_blend_func_separate */
-#ifndef GL_OES_blend_func_separate
-#define GL_OES_blend_func_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-#endif
-
-/* GL_OES_blend_subtract */
-#ifndef GL_OES_blend_subtract
-#define GL_OES_blend_subtract 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
-#endif
-
-/* GL_OES_byte_coordinates */
-#ifndef GL_OES_byte_coordinates
-#define GL_OES_byte_coordinates 1
-#endif
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_draw_texture */
-#ifndef GL_OES_draw_texture
-#define GL_OES_draw_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
-GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
-GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
-GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
-GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
-GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif
-
-/* GL_OES_extended_matrix_palette */
-#ifndef GL_OES_extended_matrix_palette
-#define GL_OES_extended_matrix_palette 1
-#endif
-
-/* GL_OES_fbo_render_mipmap */
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif
-
-/* GL_OES_fixed_point */
-#ifndef GL_OES_fixed_point
-#define GL_OES_fixed_point 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref);
-GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth);
-GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
-GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar);
-GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]);
-GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
-GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
-GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
-GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
-GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
-GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
-GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
-GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
-#endif
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref);
-typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
-typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar);
-typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]);
-typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
-typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
-typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
-typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
-typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
-typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
-typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
-typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-#endif
-
-/* GL_OES_framebuffer_object */
-#ifndef GL_OES_framebuffer_object
-#define GL_OES_framebuffer_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
-GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
-GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers);
-GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers);
-GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params);
-GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
-GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
-GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers);
-GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers);
-GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
-GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
-#endif
-typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
-typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
-typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers);
-typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers);
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params);
-typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
-typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
-typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers);
-typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers);
-typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params);
-#endif
-
-/* GL_OES_matrix_get */
-#ifndef GL_OES_matrix_get
-#define GL_OES_matrix_get 1
-#endif
-
-/* GL_OES_matrix_palette */
-#ifndef GL_OES_matrix_palette
-#define GL_OES_matrix_palette 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
-GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
-GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
-typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
-typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#endif
-
-/* GL_OES_required_internalformat */
-#ifndef GL_OES_required_internalformat
-#define GL_OES_required_internalformat 1
-#endif
-
-/* GL_OES_query_matrix */
-#ifndef GL_OES_query_matrix
-#define GL_OES_query_matrix 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]);
-#endif
-typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]);
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif
-
-/* GL_OES_single_precision */
-#ifndef GL_OES_single_precision
-#define GL_OES_single_precision 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar);
-GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
-GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]);
-GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar);
-typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
-typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]);
-typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#endif
-
-/* GL_OES_stencil8 */
-#ifndef GL_OES_stencil8
-#define GL_OES_stencil8 1
-#endif
-
-/* GL_OES_stencil_wrap */
-#ifndef GL_OES_stencil_wrap
-#define GL_OES_stencil_wrap 1
-#endif
-
-/* GL_OES_texture_cube_map */
-#ifndef GL_OES_texture_cube_map
-#define GL_OES_texture_cube_map 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
-GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
-typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
-typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
-#endif
-
-/* GL_OES_texture_env_crossbar */
-#ifndef GL_OES_texture_env_crossbar
-#define GL_OES_texture_env_crossbar 1
-#endif
-
-/* GL_OES_texture_mirrored_repeat */
-#ifndef GL_OES_texture_mirrored_repeat
-#define GL_OES_texture_mirrored_repeat 1
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_copy_texture_levels */
-#ifndef GL_APPLE_copy_texture_levels
-#define GL_APPLE_copy_texture_levels 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#endif
-
-/* GL_APPLE_sync */
-#ifndef GL_APPLE_sync
-#define GL_APPLE_sync 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
-GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
-GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
-GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
-GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
-typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
-typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-
-/* GL_APPLE_texture_2D_limited_npot */
-#ifndef GL_APPLE_texture_2D_limited_npot
-#define GL_APPLE_texture_2D_limited_npot 1
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_rgba8 */
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-
-/* GL_EXT_map_buffer_range */
-#ifndef GL_EXT_map_buffer_range
-#define GL_EXT_map_buffer_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY *glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
-GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
-GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif
-
-/* GL_EXT_texture_lod_bias */
-#ifndef GL_EXT_texture_lod_bias
-#define GL_EXT_texture_lod_bias 1
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_texture_env_enhanced_fixed_function */
-#ifndef GL_IMG_texture_env_enhanced_fixed_function
-#define GL_IMG_texture_env_enhanced_fixed_function 1
-#endif
-
-/* GL_IMG_user_clip_plane */
-#ifndef GL_IMG_user_clip_plane
-#define GL_IMG_user_clip_plane 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glClipPlanefIMG (GLenum, const GLfloat *);
-GL_API void GL_APIENTRY glClipPlanexIMG (GLenum, const GLfixed *);
-#endif
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
-
-/* NV_fence */
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
-GL_API void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
-GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint);
-GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint);
-GL_API void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
-GL_API void GL_APIENTRY glFinishFenceNV (GLuint);
-GL_API void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
-#endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_driver_control */
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
-
-/* GL_QCOM_extended_get2 */
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __glext_h_ */
-
diff --git a/include/linux/GLES/glplatform.h b/include/linux/GLES/glplatform.h
deleted file mode 100644
index 2db6ee2ca6..0000000000
--- a/include/linux/GLES/glplatform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __glplatform_h_
-#define __glplatform_h_
-
-/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_API
-#define GL_API KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __glplatform_h_ */
diff --git a/include/linux/GLES2/gl2.h b/include/linux/GLES2/gl2.h
deleted file mode 100644
index b7fe76ee1c..0000000000
--- a/include/linux/GLES2/gl2.h
+++ /dev/null
@@ -1,620 +0,0 @@
-#ifndef __gl2_h_
-#define __gl2_h_
-
-/* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */
-
-#include <GLES2/gl2platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
-
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-
-/* GL types for handling large vertex buffer objects */
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_2_0 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
-#define GL_FALSE 0
-#define GL_TRUE 1
-
-/* BeginMode */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction (not supported in ES20) */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* BlendingFactorDest */
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-
-/* BlendSubtract */
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-
-/* Separate Blend Functions */
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-
-/* CullFaceMode */
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* FrontFaceDirection */
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-
-/* GetPName */
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-/* GL_SCISSOR_TEST */
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-/* GL_POLYGON_OFFSET_FILL */
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-
-/* GetTextureParameter */
-/* GL_TEXTURE_MAG_FILTER */
-/* GL_TEXTURE_MIN_FILTER */
-/* GL_TEXTURE_WRAP_S */
-/* GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-
-/* DataType */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-
-/* PixelFormat */
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-
-/* PixelType */
-/* GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-
-/* StencilFunction */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-
-/* StencilOp */
-/* GL_ZERO */
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-
-/* StringName */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* TextureMagFilter */
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-
-/* TextureMinFilter */
-/* GL_NEAREST */
-/* GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-
-/* TextureTarget */
-/* GL_TEXTURE_2D */
-#define GL_TEXTURE 0x1702
-
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-
-/* TextureUnit */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-
-/* TextureWrapMode */
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-
-/* Uniform Types */
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-
-/* Vertex Arrays */
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-
-/* Shader Source */
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-
-/* Shader Binary */
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-
-/* Shader Precision-Specified Types */
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-
-/* Framebuffer Object. */
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-
-#define GL_NONE 0
-
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-
-/*-------------------------------------------------------------------------
- * GL core functions.
- *-----------------------------------------------------------------------*/
-
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2_h_ */
diff --git a/include/linux/GLES2/gl2ext.h b/include/linux/GLES2/gl2ext.h
deleted file mode 100644
index f7e7a61369..0000000000
--- a/include/linux/GLES2/gl2ext.h
+++ /dev/null
@@ -1,1809 +0,0 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_
-
-/* $Revision: 19436 $ on $Date:: 2012-10-10 10:37:04 -0700 #$ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-#ifndef GL_APIENTRYP
-# define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES 0x8D64
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif
-
-/* GL_OES_depth_texture */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_SAMPLER_EXTERNAL_OES 0x8D66
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT 0x1405
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif
-
-/* GL_OES_required_internalformat */
-#ifndef GL_OES_required_internalformat
-#define GL_ALPHA8_OES 0x803C
-#define GL_DEPTH_COMPONENT16_OES 0x81A5
-/* reuse GL_DEPTH_COMPONENT24_OES */
-/* reuse GL_DEPTH24_STENCIL8_OES */
-/* reuse GL_DEPTH_COMPONENT32_OES */
-#define GL_LUMINANCE4_ALPHA4_OES 0x8043
-#define GL_LUMINANCE8_ALPHA8_OES 0x8045
-#define GL_LUMINANCE8_OES 0x8040
-#define GL_RGBA4_OES 0x8056
-#define GL_RGB5_A1_OES 0x8057
-#define GL_RGB565_OES 0x8D62
-/* reuse GL_RGB8_OES */
-/* reuse GL_RGBA8_OES */
-/* reuse GL_RGB10_EXT */
-/* reuse GL_RGB10_A2_EXT */
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES 0x8051
-#define GL_RGBA8_OES 0x8058
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES 0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES 0x8D47
-#endif
-
-#ifndef GL_OES_surfaceless_context
-#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_TEXTURE_WRAP_R_OES 0x8072
-#define GL_TEXTURE_3D_OES 0x806F
-#define GL_TEXTURE_BINDING_3D_OES 0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
-#define GL_SAMPLER_3D_OES 0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
-#endif
-
-/* GL_OES_texture_float */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_HALF_FLOAT_OES 0x8D61
-#endif
-
-/* GL_OES_texture_half_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
-#endif
-
-/* GL_OES_vertex_half_float */
-/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
-#define GL_INT_10_10_10_2_OES 0x8DF7
-#endif
-
-/*------------------------------------------------------------------------*
- * KHR extension tokens
- *------------------------------------------------------------------------*/
-
-#ifndef GL_KHR_debug
-typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
-#define GL_DEBUG_SOURCE_API 0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
-#define GL_DEBUG_SOURCE_APPLICATION 0x824A
-#define GL_DEBUG_SOURCE_OTHER 0x824B
-#define GL_DEBUG_TYPE_ERROR 0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
-#define GL_DEBUG_TYPE_PORTABILITY 0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
-#define GL_DEBUG_TYPE_OTHER 0x8251
-#define GL_DEBUG_TYPE_MARKER 0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
-#define GL_DEBUG_TYPE_POP_GROUP 0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
-#define GL_BUFFER 0x82E0
-#define GL_SHADER 0x82E1
-#define GL_PROGRAM 0x82E2
-#define GL_QUERY 0x82E3
-/* PROGRAM_PIPELINE only in GL */
-#define GL_SAMPLER 0x82E6
-/* DISPLAY_LIST only in GL */
-#define GL_MAX_LABEL_LENGTH 0x82E8
-#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
-#define GL_DEBUG_LOGGED_MESSAGES 0x9145
-#define GL_DEBUG_SEVERITY_HIGH 0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
-#define GL_DEBUG_SEVERITY_LOW 0x9148
-#define GL_DEBUG_OUTPUT 0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
-#define GL_STACK_OVERFLOW 0x0503
-#define GL_STACK_UNDERFLOW 0x0504
-#endif
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
-#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
-#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
-#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
-#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
-#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
-#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
-#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
-#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
-#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
-#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
-#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
-#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
-#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD 0x87F9
-#define GL_3DC_XY_AMD 0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD 0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-#endif
-
-/* GL_AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_COUNTER_TYPE_AMD 0x8BC0
-#define GL_COUNTER_RANGE_AMD 0x8BC1
-#define GL_UNSIGNED_INT64_AMD 0x8BC2
-#define GL_PERCENTAGE_AMD 0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
-#define GL_PERFMON_RESULT_AMD 0x8BC6
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD 0x8740
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
-#define GL_MAX_SAMPLES_ANGLE 0x8D57
-#endif
-
-/* GL_ANGLE_instanced_arrays */
-#ifndef GL_ANGLE_instanced_arrays
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
-#endif
-
-/* GL_ANGLE_pack_reverse_row_order */
-#ifndef GL_ANGLE_pack_reverse_row_order
-#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
-#endif
-
-/* GL_ANGLE_texture_compression_dxt3 */
-#ifndef GL_ANGLE_texture_compression_dxt3
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
-#endif
-
-/* GL_ANGLE_texture_compression_dxt5 */
-#ifndef GL_ANGLE_texture_compression_dxt5
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
-#endif
-
-/* GL_ANGLE_texture_usage */
-#ifndef GL_ANGLE_texture_usage
-#define GL_TEXTURE_USAGE_ANGLE 0x93A2
-#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
-#endif
-
-/* GL_ANGLE_translated_shader_source */
-#ifndef GL_ANGLE_translated_shader_source
-#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_copy_texture_levels */
-/* No new tokens introduced by this extension. */
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
-#define GL_MAX_SAMPLES_APPLE 0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
-#endif
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_RGB_422_APPLE 0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
-#endif
-
-/* GL_APPLE_sync */
-#ifndef GL_APPLE_sync
-
-#ifndef __gl3_h_
-/* These types are defined with reference to <inttypes.h>
- * in the Apple extension spec, but here we use the Khronos
- * portable types in khrplatform.h, and assume those types
- * are always defined.
- * If any other extensions using these types are defined,
- * the typedefs must move out of this block and be shared.
- */
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef struct __GLsync *GLsync;
-#endif
-
-#define GL_SYNC_OBJECT_APPLE 0x8A53
-#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
-#define GL_OBJECT_TYPE_APPLE 0x9112
-#define GL_SYNC_CONDITION_APPLE 0x9113
-#define GL_SYNC_STATUS_APPLE 0x9114
-#define GL_SYNC_FLAGS_APPLE 0x9115
-#define GL_SYNC_FENCE_APPLE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
-#define GL_UNSIGNALED_APPLE 0x9118
-#define GL_SIGNALED_APPLE 0x9119
-#define GL_ALREADY_SIGNALED_APPLE 0x911A
-#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
-#define GL_CONDITION_SATISFIED_APPLE 0x911C
-#define GL_WAIT_FAILED_APPLE 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
-#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_program_binary */
-#ifndef GL_ARM_mali_program_binary
-#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
-#endif
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_MALI_SHADER_BINARY_ARM 0x8F60
-#endif
-
-/* GL_ARM_rgba8 */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_RGBA16F_EXT 0x881A
-#define GL_RGB16F_EXT 0x881B
-#define GL_RG16F_EXT 0x822F
-#define GL_R16F_EXT 0x822D
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
-#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
-#define GL_PROGRAM_OBJECT_EXT 0x8B40
-#define GL_SHADER_OBJECT_EXT 0x8B48
-#define GL_BUFFER_OBJECT_EXT 0x9151
-#define GL_QUERY_OBJECT_EXT 0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
-#endif
-
-/* GL_EXT_debug_marker */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT 0x1800
-#define GL_DEPTH_EXT 0x1801
-#define GL_STENCIL_EXT 0x1802
-#endif
-
-/* GL_EXT_map_buffer_range */
-#ifndef GL_EXT_map_buffer_range
-#define GL_MAP_READ_BIT_EXT 0x0001
-#define GL_MAP_WRITE_BIT_EXT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
-/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
-#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
-#define GL_MAX_SAMPLES_EXT 0x8D57
-#endif
-
-/* GL_EXT_multiview_draw_buffers */
-#ifndef GL_EXT_multiview_draw_buffers
-#define GL_COLOR_ATTACHMENT_EXT 0x90F0
-#define GL_MULTIVIEW_EXT 0x90F1
-#define GL_DRAW_BUFFER_EXT 0x0C01
-#define GL_READ_BUFFER_EXT 0x0C02
-#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
-#define GL_CURRENT_QUERY_EXT 0x8865
-#define GL_QUERY_RESULT_EXT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-/* reuse GL_NO_ERROR */
-#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
-#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
-#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE_EXT 0x8258
-#define GL_ACTIVE_PROGRAM_EXT 0x8259
-#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
-#endif
-
-/* GL_EXT_shader_framebuffer_fetch */
-#ifndef GL_EXT_shader_framebuffer_fetch
-#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
-#endif
-
-/* GL_EXT_shader_texture_lod */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
-#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
-#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
-#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_SRGB_EXT 0x8C40
-#define GL_SRGB_ALPHA_EXT 0x8C42
-#define GL_SRGB8_ALPHA8_EXT 0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_RED_EXT 0x1903
-#define GL_RG_EXT 0x8227
-#define GL_R8_EXT 0x8229
-#define GL_RG8_EXT 0x822B
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
-#define GL_ALPHA8_EXT 0x803C
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_RGBA32F_EXT 0x8814
-#define GL_RGB32F_EXT 0x8815
-#define GL_ALPHA32F_EXT 0x8816
-#define GL_LUMINANCE32F_EXT 0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
-/* reuse GL_RGBA16F_EXT */
-/* reuse GL_RGB16F_EXT */
-#define GL_ALPHA16F_EXT 0x881C
-#define GL_LUMINANCE16F_EXT 0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
-#define GL_RGB10_A2_EXT 0x8059
-#define GL_RGB10_EXT 0x8052
-#define GL_BGRA8_EXT 0x93A1
-#define GL_R8_EXT 0x8229
-#define GL_RG8_EXT 0x822B
-#define GL_R32F_EXT 0x822E
-#define GL_RG32F_EXT 0x8230
-#define GL_R16F_EXT 0x822D
-#define GL_RG16F_EXT 0x822F
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_SHADER_BINARY_DMP 0x9250
-#endif
-
-/*------------------------------------------------------------------------*
- * FJ extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_FJ_shader_binary_GCCSO */
-#ifndef GL_FJ_shader_binary_GCCSO
-#define GCCSO_SHADER_BINARY_FJ 0x9260
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_SGX_BINARY_IMG 0x8C0A
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
-#define GL_MAX_SAMPLES_IMG 0x9135
-#define GL_TEXTURE_SAMPLES_IMG 0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_COVERAGE_COMPONENT_NV 0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
-#define GL_COVERAGE_BUFFERS_NV 0x8ED3
-#define GL_COVERAGE_SAMPLES_NV 0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV 0x8000
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_MAX_DRAW_BUFFERS_NV 0x8824
-#define GL_DRAW_BUFFER0_NV 0x8825
-#define GL_DRAW_BUFFER1_NV 0x8826
-#define GL_DRAW_BUFFER2_NV 0x8827
-#define GL_DRAW_BUFFER3_NV 0x8828
-#define GL_DRAW_BUFFER4_NV 0x8829
-#define GL_DRAW_BUFFER5_NV 0x882A
-#define GL_DRAW_BUFFER6_NV 0x882B
-#define GL_DRAW_BUFFER7_NV 0x882C
-#define GL_DRAW_BUFFER8_NV 0x882D
-#define GL_DRAW_BUFFER9_NV 0x882E
-#define GL_DRAW_BUFFER10_NV 0x882F
-#define GL_DRAW_BUFFER11_NV 0x8830
-#define GL_DRAW_BUFFER12_NV 0x8831
-#define GL_DRAW_BUFFER13_NV 0x8832
-#define GL_DRAW_BUFFER14_NV 0x8833
-#define GL_DRAW_BUFFER15_NV 0x8834
-#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
-#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
-#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
-#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
-#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
-#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
-#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
-#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
-#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
-#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
-#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
-#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
-#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
-#define GL_COLOR_ATTACHMENT13_NV 0x8CED
-#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
-#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
-#endif
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
-/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_READ_BUFFER_NV 0x0C02
-#endif
-
-/* GL_NV_read_buffer_front */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_compression_s3tc_update */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_npot_2D_mipmap */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_ALPHA_TEST_QCOM 0x0BC0
-#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
-#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
-#endif
-
-/* GL_QCOM_binning_control */
-#ifndef GL_QCOM_binning_control
-#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
-#define GL_CPU_OPTIMIZED_QCOM 0x8FB1
-#define GL_GPU_OPTIMIZED_QCOM 0x8FB2
-#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
-#endif
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
-#define GL_TEXTURE_TYPE_QCOM 0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
-#define GL_TEXTURE_TARGET_QCOM 0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
-#define GL_STATE_RESTORE 0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM 0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_SHADER_BINARY_VIV 0x8FC4
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_depth_texture */
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif
-
-/* GL_OES_fbo_render_mipmap */
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif
-
-/* GL_OES_fragment_precision_high */
-#ifndef GL_OES_fragment_precision_high
-#define GL_OES_fragment_precision_high 1
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_OES_get_program_binary 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#endif
-
-/* GL_OES_required_internalformat */
-#ifndef GL_OES_required_internalformat
-#define GL_OES_required_internalformat 1
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_OES_standard_derivatives 1
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#endif
-
-#ifndef GL_OES_surfaceless_context
-#define GL_OES_surfaceless_context 1
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_OES_texture_3D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-
-/* GL_OES_texture_float */
-#ifndef GL_OES_texture_float
-#define GL_OES_texture_float 1
-#endif
-
-/* GL_OES_texture_float_linear */
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_OES_texture_half_float 1
-#endif
-
-/* GL_OES_texture_half_float_linear */
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif
-
-/* GL_OES_texture_npot */
-#ifndef GL_OES_texture_npot
-#define GL_OES_texture_npot 1
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
-
-/* GL_OES_vertex_half_float */
-#ifndef GL_OES_vertex_half_float
-#define GL_OES_vertex_half_float 1
-#endif
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_OES_vertex_type_10_10_10_2 1
-#endif
-
-/*------------------------------------------------------------------------*
- * KHR extension functions
- *------------------------------------------------------------------------*/
-
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
-GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GL_APICALL void GL_APIENTRY glPopDebugGroup (void);
-GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
-typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
-typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params);
-#endif
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_KHR_texture_compression_astc_ldr 1
-#endif
-
-
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#endif
-
-/* AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-
-#ifndef GL_ANGLE_instanced_arrays
-#define GL_ANGLE_instanced_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
-#endif
-typedef void (GL_APIENTRYP PFLGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFLGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-typedef void (GL_APIENTRYP PFLGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
-#endif
-
-/* GL_ANGLE_pack_reverse_row_order */
-#ifndef GL_ANGLE_pack_reverse_row_order
-#define GL_ANGLE_pack_reverse_row_order 1
-#endif
-
-/* GL_ANGLE_texture_compression_dxt3 */
-#ifndef GL_ANGLE_texture_compression_dxt3
-#define GL_ANGLE_texture_compression_dxt3 1
-#endif
-
-/* GL_ANGLE_texture_compression_dxt5 */
-#ifndef GL_ANGLE_texture_compression_dxt5
-#define GL_ANGLE_texture_compression_dxt5 1
-#endif
-
-/* GL_ANGLE_texture_usage */
-#ifndef GL_ANGLE_texture_usage
-#define GL_ANGLE_texture_usage 1
-#endif
-
-#ifndef GL_ANGLE_translated_shader_source
-#define GL_ANGLE_translated_shader_source 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#endif
-typedef void (GL_APIENTRYP PFLGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_copy_texture_levels */
-#ifndef GL_APPLE_copy_texture_levels
-#define GL_APPLE_copy_texture_levels 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#endif
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
-#endif
-
-/* GL_APPLE_sync */
-#ifndef GL_APPLE_sync
-#define GL_APPLE_sync 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
-typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
-typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_program_binary */
-#ifndef GL_ARM_mali_program_binary
-#define GL_ARM_mali_program_binary 1
-#endif
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_ARM_mali_shader_binary 1
-#endif
-
-/* GL_ARM_rgba8 */
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_EXT_color_buffer_half_float 1
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_EXT_debug_label 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-
-/* GL_EXT_debug_marker */
-#ifndef GL_EXT_debug_marker
-#define GL_EXT_debug_marker 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
-#endif
-typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-
-/* GL_EXT_map_buffer_range */
-#ifndef GL_EXT_map_buffer_range
-#define GL_EXT_map_buffer_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/* GL_EXT_multiview_draw_buffers */
-#ifndef GL_EXT_multiview_draw_buffers
-#define GL_EXT_multiview_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
-GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
-GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
-#endif
-typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
-typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_EXT_occlusion_query_boolean 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
-#endif
-typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
-typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
-typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
-typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_EXT_separate_shader_objects 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
-GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
-typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
-typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
-typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-
-/* GL_EXT_shader_framebuffer_fetch */
-#ifndef GL_EXT_shader_framebuffer_fetch
-#define GL_EXT_shader_framebuffer_fetch 1
-#endif
-
-/* GL_EXT_shader_texture_lod */
-#ifndef GL_EXT_shader_texture_lod
-#define GL_EXT_shader_texture_lod 1
-#endif
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_EXT_shadow_samplers 1
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_EXT_texture_rg 1
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_EXT_unpack_subimage 1
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_DMP_shader_binary 1
-#endif
-
-/*------------------------------------------------------------------------*
- * FJ extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_FJ_shader_binary_GCCSO */
-#ifndef GL_FJ_shader_binary_GCCSO
-#define GL_FJ_shader_binary_GCCSO 1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_NV_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
-#endif
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_NV_fbo_color_attachments 1
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
-GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
-GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
-GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
-GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
-GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
-GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
-#endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_NV_read_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
-#endif
-typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
-#endif
-
-/* GL_NV_read_buffer_front */
-#ifndef GL_NV_read_buffer_front
-#define GL_NV_read_buffer_front 1
-#endif
-
-/* GL_NV_read_depth */
-#ifndef GL_NV_read_depth
-#define GL_NV_read_depth 1
-#endif
-
-/* GL_NV_read_depth_stencil */
-#ifndef GL_NV_read_depth_stencil
-#define GL_NV_read_depth_stencil 1
-#endif
-
-/* GL_NV_read_stencil */
-#ifndef GL_NV_read_stencil
-#define GL_NV_read_stencil 1
-#endif
-
-/* GL_NV_texture_compression_s3tc_update */
-#ifndef GL_NV_texture_compression_s3tc_update
-#define GL_NV_texture_compression_s3tc_update 1
-#endif
-
-/* GL_NV_texture_npot_2D_mipmap */
-#ifndef GL_NV_texture_npot_2D_mipmap
-#define GL_NV_texture_npot_2D_mipmap 1
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_QCOM_alpha_test 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
-#endif
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
-#endif
-
-/* GL_QCOM_binning_control */
-#ifndef GL_QCOM_binning_control
-#define GL_QCOM_binning_control 1
-#endif
-
-/* GL_QCOM_driver_control */
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
-
-/* GL_QCOM_extended_get2 */
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_VIV_shader_binary 1
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2ext_h_ */
diff --git a/include/linux/GLES2/gl2platform.h b/include/linux/GLES2/gl2platform.h
deleted file mode 100644
index c9fa3c4d64..0000000000
--- a/include/linux/GLES2/gl2platform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __gl2platform_h_
-#define __gl2platform_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_APICALL
-#define GL_APICALL KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __gl2platform_h_ */
diff --git a/include/linux/GLES3/gl3.h b/include/linux/GLES3/gl3.h
deleted file mode 100644
index 9c79862c0d..0000000000
--- a/include/linux/GLES3/gl3.h
+++ /dev/null
@@ -1,1061 +0,0 @@
-#ifndef __gl3_h_
-#define __gl3_h_
-
-/*
- * gl3.h last updated on $Date: 2013-02-12 14:37:24 -0800 (Tue, 12 Feb 2013) $
- */
-
-#include <GLES3/gl3platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2007-2013 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
-
-/* OpenGL ES 2.0 */
-
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
-
-/* OpenGL ES 3.0 */
-
-typedef unsigned short GLhalf;
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef struct __GLsync *GLsync;
-
-/*-------------------------------------------------------------------------
- * Token definitions
- *-----------------------------------------------------------------------*/
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_3_0 1
-#define GL_ES_VERSION_2_0 1
-
-/* OpenGL ES 2.0 */
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
-#define GL_FALSE 0
-#define GL_TRUE 1
-
-/* BeginMode */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-
-/* BlendingFactorDest */
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-
-/* BlendSubtract */
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-
-/* Separate Blend Functions */
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-
-/* CullFaceMode */
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* FrontFaceDirection */
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-
-/* GetPName */
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-/* GL_SCISSOR_TEST */
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-/* GL_POLYGON_OFFSET_FILL */
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-
-/* GetTextureParameter */
-/* GL_TEXTURE_MAG_FILTER */
-/* GL_TEXTURE_MIN_FILTER */
-/* GL_TEXTURE_WRAP_S */
-/* GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-
-/* DataType */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-
-/* PixelFormat */
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-
-/* PixelType */
-/* GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-
-/* StencilFunction */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-
-/* StencilOp */
-/* GL_ZERO */
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-
-/* StringName */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* TextureMagFilter */
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-
-/* TextureMinFilter */
-/* GL_NEAREST */
-/* GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-
-/* TextureTarget */
-/* GL_TEXTURE_2D */
-#define GL_TEXTURE 0x1702
-
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-
-/* TextureUnit */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-
-/* TextureWrapMode */
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-
-/* Uniform Types */
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-
-/* Vertex Arrays */
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-
-/* Shader Source */
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-
-/* Shader Binary */
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-
-/* Shader Precision-Specified Types */
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-
-/* Framebuffer Object. */
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-
-#define GL_NONE 0
-
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-
-/* OpenGL ES 3.0 */
-
-#define GL_READ_BUFFER 0x0C02
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_PACK_ROW_LENGTH 0x0D02
-#define GL_PACK_SKIP_ROWS 0x0D03
-#define GL_PACK_SKIP_PIXELS 0x0D04
-#define GL_COLOR 0x1800
-#define GL_DEPTH 0x1801
-#define GL_STENCIL 0x1802
-#define GL_RED 0x1903
-#define GL_RGB8 0x8051
-#define GL_RGBA8 0x8058
-#define GL_RGB10_A2 0x8059
-#define GL_TEXTURE_BINDING_3D 0x806A
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_DEPTH_COMPONENT24 0x81A6
-#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-#define GL_TEXTURE_COMPARE_MODE 0x884C
-#define GL_TEXTURE_COMPARE_FUNC 0x884D
-#define GL_CURRENT_QUERY 0x8865
-#define GL_QUERY_RESULT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE 0x8867
-#define GL_BUFFER_MAPPED 0x88BC
-#define GL_BUFFER_MAP_POINTER 0x88BD
-#define GL_STREAM_READ 0x88E1
-#define GL_STREAM_COPY 0x88E2
-#define GL_STATIC_READ 0x88E5
-#define GL_STATIC_COPY 0x88E6
-#define GL_DYNAMIC_READ 0x88E9
-#define GL_DYNAMIC_COPY 0x88EA
-#define GL_MAX_DRAW_BUFFERS 0x8824
-#define GL_DRAW_BUFFER0 0x8825
-#define GL_DRAW_BUFFER1 0x8826
-#define GL_DRAW_BUFFER2 0x8827
-#define GL_DRAW_BUFFER3 0x8828
-#define GL_DRAW_BUFFER4 0x8829
-#define GL_DRAW_BUFFER5 0x882A
-#define GL_DRAW_BUFFER6 0x882B
-#define GL_DRAW_BUFFER7 0x882C
-#define GL_DRAW_BUFFER8 0x882D
-#define GL_DRAW_BUFFER9 0x882E
-#define GL_DRAW_BUFFER10 0x882F
-#define GL_DRAW_BUFFER11 0x8830
-#define GL_DRAW_BUFFER12 0x8831
-#define GL_DRAW_BUFFER13 0x8832
-#define GL_DRAW_BUFFER14 0x8833
-#define GL_DRAW_BUFFER15 0x8834
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-#define GL_SAMPLER_3D 0x8B5F
-#define GL_SAMPLER_2D_SHADOW 0x8B62
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-#define GL_PIXEL_PACK_BUFFER 0x88EB
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-#define GL_FLOAT_MAT2x3 0x8B65
-#define GL_FLOAT_MAT2x4 0x8B66
-#define GL_FLOAT_MAT3x2 0x8B67
-#define GL_FLOAT_MAT3x4 0x8B68
-#define GL_FLOAT_MAT4x2 0x8B69
-#define GL_FLOAT_MAT4x3 0x8B6A
-#define GL_SRGB 0x8C40
-#define GL_SRGB8 0x8C41
-#define GL_SRGB8_ALPHA8 0x8C43
-#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-#define GL_MAJOR_VERSION 0x821B
-#define GL_MINOR_VERSION 0x821C
-#define GL_NUM_EXTENSIONS 0x821D
-#define GL_RGBA32F 0x8814
-#define GL_RGB32F 0x8815
-#define GL_RGBA16F 0x881A
-#define GL_RGB16F 0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
-#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-#define GL_TEXTURE_2D_ARRAY 0x8C1A
-#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
-#define GL_R11F_G11F_B10F 0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
-#define GL_RGB9_E5 0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
-#define GL_RASTERIZER_DISCARD 0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS 0x8C8C
-#define GL_SEPARATE_ATTRIBS 0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
-#define GL_RGBA32UI 0x8D70
-#define GL_RGB32UI 0x8D71
-#define GL_RGBA16UI 0x8D76
-#define GL_RGB16UI 0x8D77
-#define GL_RGBA8UI 0x8D7C
-#define GL_RGB8UI 0x8D7D
-#define GL_RGBA32I 0x8D82
-#define GL_RGB32I 0x8D83
-#define GL_RGBA16I 0x8D88
-#define GL_RGB16I 0x8D89
-#define GL_RGBA8I 0x8D8E
-#define GL_RGB8I 0x8D8F
-#define GL_RED_INTEGER 0x8D94
-#define GL_RGB_INTEGER 0x8D98
-#define GL_RGBA_INTEGER 0x8D99
-#define GL_SAMPLER_2D_ARRAY 0x8DC1
-#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
-#define GL_UNSIGNED_INT_VEC2 0x8DC6
-#define GL_UNSIGNED_INT_VEC3 0x8DC7
-#define GL_UNSIGNED_INT_VEC4 0x8DC8
-#define GL_INT_SAMPLER_2D 0x8DCA
-#define GL_INT_SAMPLER_3D 0x8DCB
-#define GL_INT_SAMPLER_CUBE 0x8DCC
-#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-#define GL_BUFFER_ACCESS_FLAGS 0x911F
-#define GL_BUFFER_MAP_LENGTH 0x9120
-#define GL_BUFFER_MAP_OFFSET 0x9121
-#define GL_DEPTH_COMPONENT32F 0x8CAC
-#define GL_DEPTH32F_STENCIL8 0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
-#define GL_FRAMEBUFFER_DEFAULT 0x8218
-#define GL_FRAMEBUFFER_UNDEFINED 0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
-#define GL_DEPTH_STENCIL 0x84F9
-#define GL_UNSIGNED_INT_24_8 0x84FA
-#define GL_DEPTH24_STENCIL8 0x88F0
-#define GL_UNSIGNED_NORMALIZED 0x8C17
-#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING
-#define GL_READ_FRAMEBUFFER 0x8CA8
-#define GL_DRAW_FRAMEBUFFER 0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
-#define GL_RENDERBUFFER_SAMPLES 0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-#define GL_COLOR_ATTACHMENT1 0x8CE1
-#define GL_COLOR_ATTACHMENT2 0x8CE2
-#define GL_COLOR_ATTACHMENT3 0x8CE3
-#define GL_COLOR_ATTACHMENT4 0x8CE4
-#define GL_COLOR_ATTACHMENT5 0x8CE5
-#define GL_COLOR_ATTACHMENT6 0x8CE6
-#define GL_COLOR_ATTACHMENT7 0x8CE7
-#define GL_COLOR_ATTACHMENT8 0x8CE8
-#define GL_COLOR_ATTACHMENT9 0x8CE9
-#define GL_COLOR_ATTACHMENT10 0x8CEA
-#define GL_COLOR_ATTACHMENT11 0x8CEB
-#define GL_COLOR_ATTACHMENT12 0x8CEC
-#define GL_COLOR_ATTACHMENT13 0x8CED
-#define GL_COLOR_ATTACHMENT14 0x8CEE
-#define GL_COLOR_ATTACHMENT15 0x8CEF
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#define GL_MAX_SAMPLES 0x8D57
-#define GL_HALF_FLOAT 0x140B
-#define GL_MAP_READ_BIT 0x0001
-#define GL_MAP_WRITE_BIT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_RG8 0x822B
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#define GL_VERTEX_ARRAY_BINDING 0x85B5
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGB8_SNORM 0x8F96
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_SIGNED_NORMALIZED 0x8F9C
-#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
-#define GL_COPY_READ_BUFFER 0x8F36
-#define GL_COPY_WRITE_BUFFER 0x8F37
-#define GL_COPY_READ_BUFFER_BINDING GL_COPY_READ_BUFFER
-#define GL_COPY_WRITE_BUFFER_BINDING GL_COPY_WRITE_BUFFER
-#define GL_UNIFORM_BUFFER 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING 0x8A28
-#define GL_UNIFORM_BUFFER_START 0x8A29
-#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
-#define GL_UNIFORM_TYPE 0x8A37
-#define GL_UNIFORM_SIZE 0x8A38
-#define GL_UNIFORM_NAME_LENGTH 0x8A39
-#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
-#define GL_UNIFORM_OFFSET 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-#define GL_INVALID_INDEX 0xFFFFFFFFu
-#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
-#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
-#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
-#define GL_OBJECT_TYPE 0x9112
-#define GL_SYNC_CONDITION 0x9113
-#define GL_SYNC_STATUS 0x9114
-#define GL_SYNC_FLAGS 0x9115
-#define GL_SYNC_FENCE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
-#define GL_UNSIGNALED 0x9118
-#define GL_SIGNALED 0x9119
-#define GL_ALREADY_SIGNALED 0x911A
-#define GL_TIMEOUT_EXPIRED 0x911B
-#define GL_CONDITION_SATISFIED 0x911C
-#define GL_WAIT_FAILED 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
-#define GL_ANY_SAMPLES_PASSED 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-#define GL_SAMPLER_BINDING 0x8919
-#define GL_RGB10_A2UI 0x906F
-#define GL_TEXTURE_SWIZZLE_R 0x8E42
-#define GL_TEXTURE_SWIZZLE_G 0x8E43
-#define GL_TEXTURE_SWIZZLE_B 0x8E44
-#define GL_TEXTURE_SWIZZLE_A 0x8E45
-#define GL_GREEN 0x1904
-#define GL_BLUE 0x1905
-#define GL_INT_2_10_10_10_REV 0x8D9F
-#define GL_TRANSFORM_FEEDBACK 0x8E22
-#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
-#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
-#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
-#define GL_PROGRAM_BINARY_LENGTH 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS 0x87FF
-#define GL_COMPRESSED_R11_EAC 0x9270
-#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
-#define GL_COMPRESSED_RG11_EAC 0x9272
-#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
-#define GL_COMPRESSED_RGB8_ETC2 0x9274
-#define GL_COMPRESSED_SRGB8_ETC2 0x9275
-#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
-#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
-#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
-#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
-#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
-#define GL_MAX_ELEMENT_INDEX 0x8D6B
-#define GL_NUM_SAMPLE_COUNTS 0x9380
-#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-
-/*-------------------------------------------------------------------------
- * Entrypoint definitions
- *-----------------------------------------------------------------------*/
-
-/* OpenGL ES 2.0 */
-
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat depth);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-/* OpenGL ES 3.0 */
-
-GL_APICALL void GL_APIENTRY glReadBuffer (GLenum mode);
-GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint* ids);
-GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint* ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQuery (GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint* params);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid** params);
-GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum* bufs);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GL_APICALL GLvoid* GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint* arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint* arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint* data);
-GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode);
-GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params);
-GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint* v);
-GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint* v);
-GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint* params);
-GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint* value);
-GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value);
-GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GL_APICALL const GLubyte* GL_APIENTRY glGetStringi (GLenum name, GLuint index);
-GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices);
-GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
-GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar* uniformBlockName);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName);
-GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount);
-GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64* params);
-GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
-GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64* data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64* params);
-GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint* samplers);
-GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint* samplers);
-GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
-GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint* param);
-GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat* param);
-GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint* ids);
-GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint* ids);
-GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id);
-GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary);
-GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments);
-GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/linux/GLES3/gl31.h b/include/linux/GLES3/gl31.h
deleted file mode 100644
index 987724a349..0000000000
--- a/include/linux/GLES3/gl31.h
+++ /dev/null
@@ -1,1187 +0,0 @@
-#ifndef __gl31_h_
-#define __gl31_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
-*/
-
-#include <GLES3/gl3platform.h>
-#ifndef GL_APIENTRYP
-#define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/* Generated on date 20140620 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2.[0-9]|3.[01]
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_ES_VERSION_2_0
-#define GL_ES_VERSION_2_0 1
-#include <KHR/khrplatform.h>
-typedef khronos_int8_t GLbyte;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
-typedef void GLvoid;
-typedef struct __GLsync *GLsync;
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef unsigned int GLenum;
-typedef unsigned int GLuint;
-typedef char GLchar;
-typedef khronos_float_t GLfloat;
-typedef khronos_ssize_t GLsizeiptr;
-typedef khronos_intptr_t GLintptr;
-typedef unsigned int GLbitfield;
-typedef int GLint;
-typedef unsigned char GLboolean;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_TEXTURE 0x1702
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-#define GL_NONE 0
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#endif /* GL_ES_VERSION_2_0 */
-
-#ifndef GL_ES_VERSION_3_0
-#define GL_ES_VERSION_3_0 1
-typedef unsigned short GLhalf;
-#define GL_READ_BUFFER 0x0C02
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_PACK_ROW_LENGTH 0x0D02
-#define GL_PACK_SKIP_ROWS 0x0D03
-#define GL_PACK_SKIP_PIXELS 0x0D04
-#define GL_COLOR 0x1800
-#define GL_DEPTH 0x1801
-#define GL_STENCIL 0x1802
-#define GL_RED 0x1903
-#define GL_RGB8 0x8051
-#define GL_RGBA8 0x8058
-#define GL_RGB10_A2 0x8059
-#define GL_TEXTURE_BINDING_3D 0x806A
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_DEPTH_COMPONENT24 0x81A6
-#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-#define GL_TEXTURE_COMPARE_MODE 0x884C
-#define GL_TEXTURE_COMPARE_FUNC 0x884D
-#define GL_CURRENT_QUERY 0x8865
-#define GL_QUERY_RESULT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE 0x8867
-#define GL_BUFFER_MAPPED 0x88BC
-#define GL_BUFFER_MAP_POINTER 0x88BD
-#define GL_STREAM_READ 0x88E1
-#define GL_STREAM_COPY 0x88E2
-#define GL_STATIC_READ 0x88E5
-#define GL_STATIC_COPY 0x88E6
-#define GL_DYNAMIC_READ 0x88E9
-#define GL_DYNAMIC_COPY 0x88EA
-#define GL_MAX_DRAW_BUFFERS 0x8824
-#define GL_DRAW_BUFFER0 0x8825
-#define GL_DRAW_BUFFER1 0x8826
-#define GL_DRAW_BUFFER2 0x8827
-#define GL_DRAW_BUFFER3 0x8828
-#define GL_DRAW_BUFFER4 0x8829
-#define GL_DRAW_BUFFER5 0x882A
-#define GL_DRAW_BUFFER6 0x882B
-#define GL_DRAW_BUFFER7 0x882C
-#define GL_DRAW_BUFFER8 0x882D
-#define GL_DRAW_BUFFER9 0x882E
-#define GL_DRAW_BUFFER10 0x882F
-#define GL_DRAW_BUFFER11 0x8830
-#define GL_DRAW_BUFFER12 0x8831
-#define GL_DRAW_BUFFER13 0x8832
-#define GL_DRAW_BUFFER14 0x8833
-#define GL_DRAW_BUFFER15 0x8834
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-#define GL_SAMPLER_3D 0x8B5F
-#define GL_SAMPLER_2D_SHADOW 0x8B62
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-#define GL_PIXEL_PACK_BUFFER 0x88EB
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-#define GL_FLOAT_MAT2x3 0x8B65
-#define GL_FLOAT_MAT2x4 0x8B66
-#define GL_FLOAT_MAT3x2 0x8B67
-#define GL_FLOAT_MAT3x4 0x8B68
-#define GL_FLOAT_MAT4x2 0x8B69
-#define GL_FLOAT_MAT4x3 0x8B6A
-#define GL_SRGB 0x8C40
-#define GL_SRGB8 0x8C41
-#define GL_SRGB8_ALPHA8 0x8C43
-#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-#define GL_MAJOR_VERSION 0x821B
-#define GL_MINOR_VERSION 0x821C
-#define GL_NUM_EXTENSIONS 0x821D
-#define GL_RGBA32F 0x8814
-#define GL_RGB32F 0x8815
-#define GL_RGBA16F 0x881A
-#define GL_RGB16F 0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
-#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-#define GL_TEXTURE_2D_ARRAY 0x8C1A
-#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
-#define GL_R11F_G11F_B10F 0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
-#define GL_RGB9_E5 0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
-#define GL_RASTERIZER_DISCARD 0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS 0x8C8C
-#define GL_SEPARATE_ATTRIBS 0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
-#define GL_RGBA32UI 0x8D70
-#define GL_RGB32UI 0x8D71
-#define GL_RGBA16UI 0x8D76
-#define GL_RGB16UI 0x8D77
-#define GL_RGBA8UI 0x8D7C
-#define GL_RGB8UI 0x8D7D
-#define GL_RGBA32I 0x8D82
-#define GL_RGB32I 0x8D83
-#define GL_RGBA16I 0x8D88
-#define GL_RGB16I 0x8D89
-#define GL_RGBA8I 0x8D8E
-#define GL_RGB8I 0x8D8F
-#define GL_RED_INTEGER 0x8D94
-#define GL_RGB_INTEGER 0x8D98
-#define GL_RGBA_INTEGER 0x8D99
-#define GL_SAMPLER_2D_ARRAY 0x8DC1
-#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
-#define GL_UNSIGNED_INT_VEC2 0x8DC6
-#define GL_UNSIGNED_INT_VEC3 0x8DC7
-#define GL_UNSIGNED_INT_VEC4 0x8DC8
-#define GL_INT_SAMPLER_2D 0x8DCA
-#define GL_INT_SAMPLER_3D 0x8DCB
-#define GL_INT_SAMPLER_CUBE 0x8DCC
-#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-#define GL_BUFFER_ACCESS_FLAGS 0x911F
-#define GL_BUFFER_MAP_LENGTH 0x9120
-#define GL_BUFFER_MAP_OFFSET 0x9121
-#define GL_DEPTH_COMPONENT32F 0x8CAC
-#define GL_DEPTH32F_STENCIL8 0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
-#define GL_FRAMEBUFFER_DEFAULT 0x8218
-#define GL_FRAMEBUFFER_UNDEFINED 0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
-#define GL_DEPTH_STENCIL 0x84F9
-#define GL_UNSIGNED_INT_24_8 0x84FA
-#define GL_DEPTH24_STENCIL8 0x88F0
-#define GL_UNSIGNED_NORMALIZED 0x8C17
-#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_READ_FRAMEBUFFER 0x8CA8
-#define GL_DRAW_FRAMEBUFFER 0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
-#define GL_RENDERBUFFER_SAMPLES 0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-#define GL_COLOR_ATTACHMENT1 0x8CE1
-#define GL_COLOR_ATTACHMENT2 0x8CE2
-#define GL_COLOR_ATTACHMENT3 0x8CE3
-#define GL_COLOR_ATTACHMENT4 0x8CE4
-#define GL_COLOR_ATTACHMENT5 0x8CE5
-#define GL_COLOR_ATTACHMENT6 0x8CE6
-#define GL_COLOR_ATTACHMENT7 0x8CE7
-#define GL_COLOR_ATTACHMENT8 0x8CE8
-#define GL_COLOR_ATTACHMENT9 0x8CE9
-#define GL_COLOR_ATTACHMENT10 0x8CEA
-#define GL_COLOR_ATTACHMENT11 0x8CEB
-#define GL_COLOR_ATTACHMENT12 0x8CEC
-#define GL_COLOR_ATTACHMENT13 0x8CED
-#define GL_COLOR_ATTACHMENT14 0x8CEE
-#define GL_COLOR_ATTACHMENT15 0x8CEF
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#define GL_MAX_SAMPLES 0x8D57
-#define GL_HALF_FLOAT 0x140B
-#define GL_MAP_READ_BIT 0x0001
-#define GL_MAP_WRITE_BIT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_RG8 0x822B
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#define GL_VERTEX_ARRAY_BINDING 0x85B5
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGB8_SNORM 0x8F96
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_SIGNED_NORMALIZED 0x8F9C
-#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
-#define GL_COPY_READ_BUFFER 0x8F36
-#define GL_COPY_WRITE_BUFFER 0x8F37
-#define GL_COPY_READ_BUFFER_BINDING 0x8F36
-#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
-#define GL_UNIFORM_BUFFER 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING 0x8A28
-#define GL_UNIFORM_BUFFER_START 0x8A29
-#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
-#define GL_UNIFORM_TYPE 0x8A37
-#define GL_UNIFORM_SIZE 0x8A38
-#define GL_UNIFORM_NAME_LENGTH 0x8A39
-#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
-#define GL_UNIFORM_OFFSET 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-#define GL_INVALID_INDEX 0xFFFFFFFFu
-#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
-#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
-#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
-#define GL_OBJECT_TYPE 0x9112
-#define GL_SYNC_CONDITION 0x9113
-#define GL_SYNC_STATUS 0x9114
-#define GL_SYNC_FLAGS 0x9115
-#define GL_SYNC_FENCE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
-#define GL_UNSIGNALED 0x9118
-#define GL_SIGNALED 0x9119
-#define GL_ALREADY_SIGNALED 0x911A
-#define GL_TIMEOUT_EXPIRED 0x911B
-#define GL_CONDITION_SATISFIED 0x911C
-#define GL_WAIT_FAILED 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
-#define GL_ANY_SAMPLES_PASSED 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-#define GL_SAMPLER_BINDING 0x8919
-#define GL_RGB10_A2UI 0x906F
-#define GL_TEXTURE_SWIZZLE_R 0x8E42
-#define GL_TEXTURE_SWIZZLE_G 0x8E43
-#define GL_TEXTURE_SWIZZLE_B 0x8E44
-#define GL_TEXTURE_SWIZZLE_A 0x8E45
-#define GL_GREEN 0x1904
-#define GL_BLUE 0x1905
-#define GL_INT_2_10_10_10_REV 0x8D9F
-#define GL_TRANSFORM_FEEDBACK 0x8E22
-#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
-#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
-#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
-#define GL_PROGRAM_BINARY_LENGTH 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS 0x87FF
-#define GL_COMPRESSED_R11_EAC 0x9270
-#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
-#define GL_COMPRESSED_RG11_EAC 0x9272
-#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
-#define GL_COMPRESSED_RGB8_ETC2 0x9274
-#define GL_COMPRESSED_SRGB8_ETC2 0x9275
-#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
-#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
-#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
-#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
-#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
-#define GL_MAX_ELEMENT_INDEX 0x8D6B
-#define GL_NUM_SAMPLE_COUNTS 0x9380
-#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-GL_APICALL void GL_APIENTRY glReadBuffer (GLenum mode);
-GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQuery (GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
-GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
-GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
-GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
-GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
-GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
-GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
-GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index);
-GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
-GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
-GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
-GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
-GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
-GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
-GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id);
-GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-#endif /* GL_ES_VERSION_3_0 */
-
-#ifndef GL_ES_VERSION_3_1
-#define GL_ES_VERSION_3_1 1
-#define GL_COMPUTE_SHADER 0x91B9
-#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
-#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
-#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
-#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
-#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
-#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
-#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
-#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
-#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
-#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
-#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
-#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
-#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
-#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
-#define GL_COMPUTE_SHADER_BIT 0x00000020
-#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
-#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
-#define GL_MAX_UNIFORM_LOCATIONS 0x826E
-#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
-#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
-#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
-#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
-#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
-#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
-#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
-#define GL_UNIFORM 0x92E1
-#define GL_UNIFORM_BLOCK 0x92E2
-#define GL_PROGRAM_INPUT 0x92E3
-#define GL_PROGRAM_OUTPUT 0x92E4
-#define GL_BUFFER_VARIABLE 0x92E5
-#define GL_SHADER_STORAGE_BLOCK 0x92E6
-#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
-#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
-#define GL_ACTIVE_RESOURCES 0x92F5
-#define GL_MAX_NAME_LENGTH 0x92F6
-#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
-#define GL_NAME_LENGTH 0x92F9
-#define GL_TYPE 0x92FA
-#define GL_ARRAY_SIZE 0x92FB
-#define GL_OFFSET 0x92FC
-#define GL_BLOCK_INDEX 0x92FD
-#define GL_ARRAY_STRIDE 0x92FE
-#define GL_MATRIX_STRIDE 0x92FF
-#define GL_IS_ROW_MAJOR 0x9300
-#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
-#define GL_BUFFER_BINDING 0x9302
-#define GL_BUFFER_DATA_SIZE 0x9303
-#define GL_NUM_ACTIVE_VARIABLES 0x9304
-#define GL_ACTIVE_VARIABLES 0x9305
-#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
-#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
-#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
-#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
-#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
-#define GL_LOCATION 0x930E
-#define GL_VERTEX_SHADER_BIT 0x00000001
-#define GL_FRAGMENT_SHADER_BIT 0x00000002
-#define GL_ALL_SHADER_BITS 0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE 0x8258
-#define GL_ACTIVE_PROGRAM 0x8259
-#define GL_PROGRAM_PIPELINE_BINDING 0x825A
-#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
-#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
-#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
-#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
-#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
-#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
-#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
-#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
-#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
-#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
-#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
-#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
-#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
-#define GL_MAX_IMAGE_UNITS 0x8F38
-#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
-#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
-#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
-#define GL_IMAGE_BINDING_NAME 0x8F3A
-#define GL_IMAGE_BINDING_LEVEL 0x8F3B
-#define GL_IMAGE_BINDING_LAYERED 0x8F3C
-#define GL_IMAGE_BINDING_LAYER 0x8F3D
-#define GL_IMAGE_BINDING_ACCESS 0x8F3E
-#define GL_IMAGE_BINDING_FORMAT 0x906E
-#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
-#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
-#define GL_UNIFORM_BARRIER_BIT 0x00000004
-#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
-#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
-#define GL_COMMAND_BARRIER_BIT 0x00000040
-#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
-#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
-#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
-#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
-#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
-#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
-#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
-#define GL_IMAGE_2D 0x904D
-#define GL_IMAGE_3D 0x904E
-#define GL_IMAGE_CUBE 0x9050
-#define GL_IMAGE_2D_ARRAY 0x9053
-#define GL_INT_IMAGE_2D 0x9058
-#define GL_INT_IMAGE_3D 0x9059
-#define GL_INT_IMAGE_CUBE 0x905B
-#define GL_INT_IMAGE_2D_ARRAY 0x905E
-#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
-#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
-#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
-#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
-#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
-#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
-#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
-#define GL_READ_ONLY 0x88B8
-#define GL_WRITE_ONLY 0x88B9
-#define GL_READ_WRITE 0x88BA
-#define GL_SHADER_STORAGE_BUFFER 0x90D2
-#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
-#define GL_SHADER_STORAGE_BUFFER_START 0x90D4
-#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
-#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
-#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
-#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
-#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
-#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
-#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
-#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
-#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
-#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
-#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
-#define GL_STENCIL_INDEX 0x1901
-#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
-#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
-#define GL_SAMPLE_POSITION 0x8E50
-#define GL_SAMPLE_MASK 0x8E51
-#define GL_SAMPLE_MASK_VALUE 0x8E52
-#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
-#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
-#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
-#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
-#define GL_MAX_INTEGER_SAMPLES 0x9110
-#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
-#define GL_TEXTURE_SAMPLES 0x9106
-#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
-#define GL_TEXTURE_WIDTH 0x1000
-#define GL_TEXTURE_HEIGHT 0x1001
-#define GL_TEXTURE_DEPTH 0x8071
-#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
-#define GL_TEXTURE_RED_SIZE 0x805C
-#define GL_TEXTURE_GREEN_SIZE 0x805D
-#define GL_TEXTURE_BLUE_SIZE 0x805E
-#define GL_TEXTURE_ALPHA_SIZE 0x805F
-#define GL_TEXTURE_DEPTH_SIZE 0x884A
-#define GL_TEXTURE_STENCIL_SIZE 0x88F1
-#define GL_TEXTURE_SHARED_SIZE 0x8C3F
-#define GL_TEXTURE_RED_TYPE 0x8C10
-#define GL_TEXTURE_GREEN_TYPE 0x8C11
-#define GL_TEXTURE_BLUE_TYPE 0x8C12
-#define GL_TEXTURE_ALPHA_TYPE 0x8C13
-#define GL_TEXTURE_DEPTH_TYPE 0x8C16
-#define GL_TEXTURE_COMPRESSED 0x86A1
-#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
-#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
-#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
-#define GL_VERTEX_ATTRIB_BINDING 0x82D4
-#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
-#define GL_VERTEX_BINDING_DIVISOR 0x82D6
-#define GL_VERTEX_BINDING_OFFSET 0x82D7
-#define GL_VERTEX_BINDING_STRIDE 0x82D8
-#define GL_VERTEX_BINDING_BUFFER 0x8F4F
-#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
-#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
-#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
-GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect);
-GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
-GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
-GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
-GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
-GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
-GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers);
-GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
-GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
-GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
-GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
-GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
-#endif /* GL_ES_VERSION_3_1 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/linux/GLES3/gl3ext.h b/include/linux/GLES3/gl3ext.h
deleted file mode 100644
index 4d4ea96c4d..0000000000
--- a/include/linux/GLES3/gl3ext.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __gl3ext_h_
-#define __gl3ext_h_
-
-/* $Revision: 17809 $ on $Date:: 2012-05-14 08:03:36 -0700 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* OpenGL ES 3 Extensions
- *
- * After an OES extension's interactions with OpenGl ES 3.0 have been documented,
- * its tokens and function definitions should be added to this file in a manner
- * that does not conflict with gl2ext.h or gl3.h.
- *
- * Tokens and function definitions for extensions that have become standard
- * features in OpenGL ES 3.0 will not be added to this file.
- *
- * Applications using OpenGL-ES-2-only extensions should include gl2ext.h
- */
-
-#endif /* __gl3ext_h_ */
-
diff --git a/include/linux/GLES3/gl3platform.h b/include/linux/GLES3/gl3platform.h
deleted file mode 100644
index 1bd1a850fa..0000000000
--- a/include/linux/GLES3/gl3platform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __gl3platform_h_
-#define __gl3platform_h_
-
-/* $Revision: 18437 $ on $Date:: 2012-07-08 23:31:39 -0700 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_APICALL
-#define GL_APICALL KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __gl3platform_h_ */
diff --git a/include/linux/KHR/khrplatform.h b/include/linux/KHR/khrplatform.h
deleted file mode 100644
index 11e873ea96..0000000000
--- a/include/linux/KHR/khrplatform.h
+++ /dev/null
@@ -1,273 +0,0 @@
-#ifndef __khrplatform_h_
-#define __khrplatform_h_
-
-/*
-** Copyright (c) 2008-2009 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Khronos platform-specific types and definitions.
- *
- * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
- *
- * Adopters may modify this file to suit their platform. Adopters are
- * encouraged to submit platform specific modifications to the Khronos
- * group so that they can be included in future versions of this file.
- * Please submit changes by sending them to the public Khronos Bugzilla
- * (http://khronos.org/bugzilla) by filing a bug against product
- * "Khronos (general)" component "Registry".
- *
- * A predefined template which fills in some of the bug fields can be
- * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
- * must create a Bugzilla login first.
- *
- *
- * See the Implementer's Guidelines for information about where this file
- * should be located on your system and for more details of its use:
- * http://www.khronos.org/registry/implementers_guide.pdf
- *
- * This file should be included as
- * #include <KHR/khrplatform.h>
- * by Khronos client API header files that use its types and defines.
- *
- * The types in khrplatform.h should only be used to define API-specific types.
- *
- * Types defined in khrplatform.h:
- * khronos_int8_t signed 8 bit
- * khronos_uint8_t unsigned 8 bit
- * khronos_int16_t signed 16 bit
- * khronos_uint16_t unsigned 16 bit
- * khronos_int32_t signed 32 bit
- * khronos_uint32_t unsigned 32 bit
- * khronos_int64_t signed 64 bit
- * khronos_uint64_t unsigned 64 bit
- * khronos_intptr_t signed same number of bits as a pointer
- * khronos_uintptr_t unsigned same number of bits as a pointer
- * khronos_ssize_t signed size
- * khronos_usize_t unsigned size
- * khronos_float_t signed 32 bit floating point
- * khronos_time_ns_t unsigned 64 bit time in nanoseconds
- * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
- * nanoseconds
- * khronos_stime_nanoseconds_t signed time interval in nanoseconds
- * khronos_boolean_enum_t enumerated boolean type. This should
- * only be used as a base type when a client API's boolean type is
- * an enum. Client APIs which use an integer or other type for
- * booleans cannot use this as the base type for their boolean.
- *
- * Tokens defined in khrplatform.h:
- *
- * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
- *
- * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
- * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
- *
- * Calling convention macros defined in this file:
- * KHRONOS_APICALL
- * KHRONOS_APIENTRY
- * KHRONOS_APIATTRIBUTES
- *
- * These may be used in function prototypes as:
- *
- * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
- * int arg1,
- * int arg2) KHRONOS_APIATTRIBUTES;
- */
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APICALL
- *-------------------------------------------------------------------------
- * This precedes the return type of the function in the function prototype.
- */
-#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
-# if defined (_DLL_EXPORTS)
-# define KHRONOS_APICALL __declspec(dllexport)
-# else
-# define KHRONOS_APICALL __declspec(dllimport)
-# endif
-#elif defined (__SYMBIAN32__)
-# define KHRONOS_APICALL IMPORT_C
-#else
-# define KHRONOS_APICALL
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIENTRY
- *-------------------------------------------------------------------------
- * This follows the return type of the function and precedes the function
- * name in the function prototype.
- */
-#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
- /* Win32 but not WinCE */
-# define KHRONOS_APIENTRY __stdcall
-#else
-# define KHRONOS_APIENTRY
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIATTRIBUTES
- *-------------------------------------------------------------------------
- * This follows the closing parenthesis of the function prototype arguments.
- */
-#if defined (__ARMCC_2__)
-#define KHRONOS_APIATTRIBUTES __softfp
-#else
-#define KHRONOS_APIATTRIBUTES
-#endif
-
-/*-------------------------------------------------------------------------
- * basic type definitions
- *-----------------------------------------------------------------------*/
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-
-
-/*
- * Using <stdint.h>
- */
-#include <stdint.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(__VMS ) || defined(__sgi)
-
-/*
- * Using <inttypes.h>
- */
-#include <inttypes.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-
-/*
- * Win32
- */
-typedef __int32 khronos_int32_t;
-typedef unsigned __int32 khronos_uint32_t;
-typedef __int64 khronos_int64_t;
-typedef unsigned __int64 khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(__sun__) || defined(__digital__)
-
-/*
- * Sun or Digital
- */
-typedef int khronos_int32_t;
-typedef unsigned int khronos_uint32_t;
-#if defined(__arch64__) || defined(_LP64)
-typedef long int khronos_int64_t;
-typedef unsigned long int khronos_uint64_t;
-#else
-typedef long long int khronos_int64_t;
-typedef unsigned long long int khronos_uint64_t;
-#endif /* __arch64__ */
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif 0
-
-/*
- * Hypothetical platform with no float or int64 support
- */
-typedef int khronos_int32_t;
-typedef unsigned int khronos_uint32_t;
-#define KHRONOS_SUPPORT_INT64 0
-#define KHRONOS_SUPPORT_FLOAT 0
-
-#else
-
-/*
- * Generic fallback
- */
-#include <stdint.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#endif
-
-
-/*
- * Types that are (so far) the same on all platforms
- */
-typedef signed char khronos_int8_t;
-typedef unsigned char khronos_uint8_t;
-typedef signed short int khronos_int16_t;
-typedef unsigned short int khronos_uint16_t;
-typedef signed long int khronos_intptr_t;
-typedef unsigned long int khronos_uintptr_t;
-typedef signed long int khronos_ssize_t;
-typedef unsigned long int khronos_usize_t;
-
-#if KHRONOS_SUPPORT_FLOAT
-/*
- * Float type
- */
-typedef float khronos_float_t;
-#endif
-
-#if KHRONOS_SUPPORT_INT64
-/* Time types
- *
- * These types can be used to represent a time interval in nanoseconds or
- * an absolute Unadjusted System Time. Unadjusted System Time is the number
- * of nanoseconds since some arbitrary system event (e.g. since the last
- * time the system booted). The Unadjusted System Time is an unsigned
- * 64 bit value that wraps back to 0 every 584 years. Time intervals
- * may be either signed or unsigned.
- */
-typedef khronos_uint64_t khronos_utime_nanoseconds_t;
-typedef khronos_int64_t khronos_stime_nanoseconds_t;
-#endif
-
-/*
- * Dummy value used to pad enum types to 32 bits.
- */
-#ifndef KHRONOS_MAX_ENUM
-#define KHRONOS_MAX_ENUM 0x7FFFFFFF
-#endif
-
-/*
- * Enumerated boolean type
- *
- * Values other than zero should be considered to be true. Therefore
- * comparisons should not be made against KHRONOS_TRUE.
- */
-typedef enum {
- KHRONOS_FALSE = 0,
- KHRONOS_TRUE = 1,
- KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
-} khronos_boolean_enum_t;
-
-#endif /* __khrplatform_h_ */
diff --git a/scripts/include_functions_kernels.py b/scripts/include_functions_kernels.py
index 19f140ea3b..721855ee27 100644
--- a/scripts/include_functions_kernels.py
+++ b/scripts/include_functions_kernels.py
@@ -11,16 +11,14 @@ Target = collections.namedtuple('Target', 'name prefix basepath')
core_targets = [
Target("NEON", "NE", src_path), # Neon kernels are under src
Target("CL", "CL", src_path), # CL kernels are under src
- Target("CPP", "CPP", armcv_path), # CPP kernels are under arm_compute
- Target("GLES_COMPUTE", "GC", armcv_path) # GLES kernels are under arm_compute
+ Target("CPP", "CPP", armcv_path) # CPP kernels are under arm_compute
]
# All functions are under arm_compute
runtime_targets = [
Target("NEON", "NE", armcv_path),
Target("CL", "CL", armcv_path),
- Target("CPP", "CPP", armcv_path),
- Target("GLES_COMPUTE", "GC", armcv_path)
+ Target("CPP", "CPP", armcv_path)
]
core_path = "/core/"
diff --git a/src/core/GLES_COMPUTE/GCCoreRuntimeContext.cpp b/src/core/GLES_COMPUTE/GCCoreRuntimeContext.cpp
deleted file mode 100644
index a374c59989..0000000000
--- a/src/core/GLES_COMPUTE/GCCoreRuntimeContext.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h"
-
-namespace arm_compute
-{
-GCCoreRuntimeContext::GCCoreRuntimeContext()
- : _kernel_lib(nullptr)
-{
-}
-
-GCCoreRuntimeContext::GCCoreRuntimeContext(GCKernelLibrary *kernel_lib)
- : _kernel_lib(kernel_lib)
-{
-}
-
-GCKernelLibrary *GCCoreRuntimeContext::kernel_library() const
-{
- return _kernel_lib;
-}
-} // namespace arm_compute
diff --git a/src/core/GLES_COMPUTE/GCHelpers.cpp b/src/core/GLES_COMPUTE/GCHelpers.cpp
deleted file mode 100644
index 0c9ed8218c..0000000000
--- a/src/core/GLES_COMPUTE/GCHelpers.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h"
-
-namespace arm_compute
-{
-GPUTarget get_target_from_device()
-{
- const std::string device_name = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
-
- return get_target_from_name(device_name);
-}
-
-GCKernel create_opengl_kernel(GCCoreRuntimeContext *ctx, const std::string &kernel_name, const std::set<std::string> &build_opts)
-{
- if(ctx && ctx->kernel_library())
- {
- // New api going through the core context
- return ctx->kernel_library()->create_kernel(kernel_name, build_opts);
- }
- else
- {
- // Legacy code through the singleton
- return GCKernelLibrary::get().create_kernel(kernel_name, build_opts);
- }
-}
-} // namespace arm_compute
diff --git a/src/core/GLES_COMPUTE/GCKernelLibrary.cpp b/src/core/GLES_COMPUTE/GCKernelLibrary.cpp
deleted file mode 100644
index ffcc8c8088..0000000000
--- a/src/core/GLES_COMPUTE/GCKernelLibrary.cpp
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Copyright (c) 2017-2021 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/Utils.h"
-
-#include <fstream>
-#include <iomanip>
-#include <regex>
-#include <utility>
-#include <vector>
-
-using namespace arm_compute;
-
-GCProgram::GCProgram()
- : _name(), _source()
-{
-}
-
-GCProgram::GCProgram(std::string name, std::string source)
- : _name(std::move(name)), _source(std::move(source))
-{
-}
-
-GLuint GCProgram::link_program(GLuint shader)
-{
- GLuint program = ARM_COMPUTE_GL_CHECK(glCreateProgram());
-
- GLint rvalue;
- GLsizei length;
-
- ARM_COMPUTE_GL_CHECK(glAttachShader(program, shader));
- ARM_COMPUTE_GL_CHECK(glLinkProgram(program));
- ARM_COMPUTE_GL_CHECK(glDetachShader(program, shader));
- ARM_COMPUTE_GL_CHECK(glDeleteShader(shader));
-
- // Check if there were some issues when linking the shader.
- ARM_COMPUTE_GL_CHECK(glGetProgramiv(program, GL_LINK_STATUS, &rvalue));
-
- if(rvalue == 0)
- {
- ARM_COMPUTE_GL_CHECK(glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length));
-
- std::vector<GLchar> log(length);
- ARM_COMPUTE_GL_CHECK(glGetProgramInfoLog(program, length, nullptr, log.data()));
- ARM_COMPUTE_ERROR_VAR("Error: Linker log:\n%s\n", log.data());
-
- return 0;
- }
-
- ARM_COMPUTE_GL_CHECK(glUseProgram(program));
-
- return program;
-}
-
-GLuint GCProgram::compile_shader(const std::string &build_options)
-{
- GLuint shader = ARM_COMPUTE_GL_CHECK(glCreateShader(GL_COMPUTE_SHADER));
-
- const char *src[]
- {
- "#version 310 es\n",
- build_options.c_str(),
- _source.c_str()
- };
-
- ARM_COMPUTE_GL_CHECK(glShaderSource(shader, sizeof(src) / sizeof(src[0]), src, nullptr));
-
- ARM_COMPUTE_GL_CHECK(glCompileShader(shader));
-
- // Check if there were any issues when compiling the shader
- GLint rvalue;
- GLsizei length;
-
- ARM_COMPUTE_GL_CHECK(glGetShaderiv(shader, GL_COMPILE_STATUS, &rvalue));
-
- if(rvalue == 0)
- {
- ARM_COMPUTE_GL_CHECK(glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length));
-
- std::vector<GLchar> log(length);
- ARM_COMPUTE_GL_CHECK(glGetShaderInfoLog(shader, length, nullptr, log.data()));
-
-#ifdef ARM_COMPUTE_DEBUG_ENABLED
- std::istringstream ss(_source);
- std::stringstream output_stream;
- std::string line;
- size_t line_num = 1;
-
- ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("GLES Shader build options:\n%s\n", build_options.c_str());
- while(std::getline(ss, line, '\n'))
- {
- output_stream << std::setw(6) << line_num << ": " << line << std::endl;
- line_num++;
- }
- ARM_COMPUTE_LOG_INFO_STREAM_CORE("GLES Shader source code:\n"
- << output_stream.rdbuf());
-#endif /* ARM_COMPUTE_DEBUG_ENABLED */
-
- ARM_COMPUTE_ERROR_VAR("Error: Compiler log:\n%s\n", log.data());
-
- return 0;
- }
-
- return shader;
-}
-
-GCKernel::GCKernel()
- : _name(), _program(), _shader_arguments(), _shader_params_ubo_name(), _shader_params_binding_point(), _shader_params_index(), _shader_params_size()
-{
-}
-
-// Add a default destructor in cpp file to workaround the free unallocated value issue on Android
-GCKernel::~GCKernel() // NOLINT
-{
-}
-
-GCKernel::GCKernel(std::string name, GLuint program)
- : _name(std::move(name)),
- _program(program),
- _shader_arguments(),
- _shader_params_ubo_name(0),
- _shader_params_binding_point(0),
- _shader_params_index(0),
- _shader_params_size(0)
-{
- _shader_arguments.clear();
-
- ARM_COMPUTE_GL_CHECK(glGenBuffers(1, &_shader_params_ubo_name));
-
- _shader_params_index = ARM_COMPUTE_GL_CHECK(glGetUniformBlockIndex(_program, _shader_params_name));
- ARM_COMPUTE_ERROR_ON_MSG_VAR(_shader_params_index == GL_INVALID_INDEX, "Failed to get index of %s", _shader_params_name);
- ARM_COMPUTE_GL_CHECK(glGetActiveUniformBlockiv(_program, _shader_params_index, GL_UNIFORM_BLOCK_DATA_SIZE, &_shader_params_size));
- ARM_COMPUTE_ERROR_ON_MSG_VAR(_shader_params_size == 0, "Failed to get size of %s", _shader_params_name);
-}
-
-void GCKernel::cleanup()
-{
- ARM_COMPUTE_GL_CHECK(glDeleteBuffers(1, &_shader_params_ubo_name));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_UNIFORM_BUFFER, 0));
- ARM_COMPUTE_GL_CHECK(glDeleteProgram(_program));
- ARM_COMPUTE_GL_CHECK(glUseProgram(0));
-}
-
-void GCKernel::use()
-{
- ARM_COMPUTE_GL_CHECK(glUseProgram(_program));
-}
-
-void GCKernel::unuse()
-{
- ARM_COMPUTE_GL_CHECK(glUseProgram(0));
-}
-
-void GCKernel::update_shader_params()
-{
- ARM_COMPUTE_ERROR_ON_MSG_VAR((_shader_params_size != (int)(_shader_arguments.size() * sizeof(_shader_arguments[0]))), "Arguments size (%zu) is not equal to shader params block size (%d)",
- _shader_arguments.size() * sizeof(_shader_arguments[0]), _shader_params_size);
-
- ARM_COMPUTE_GL_CHECK(glUniformBlockBinding(_program, _shader_params_index, _shader_params_binding_point));
- ARM_COMPUTE_GL_CHECK(glBindBufferBase(GL_UNIFORM_BUFFER, _shader_params_binding_point, _shader_params_ubo_name));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_UNIFORM_BUFFER, _shader_params_ubo_name));
- ARM_COMPUTE_GL_CHECK(glBufferData(GL_UNIFORM_BUFFER, _shader_params_size, _shader_arguments.data(), GL_DYNAMIC_DRAW));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_UNIFORM_BUFFER, 0));
-}
-
-const std::map<std::string, std::string> GCKernelLibrary::_shader_program_map =
-{
- { "absdiff", "absdiff.cs" },
- { "tensorshift", "tensor_shift.cs" },
- { "direct_convolution1x1", "direct_convolution1x1.cs" },
- { "direct_convolution3x3", "direct_convolution3x3.cs" },
- { "direct_convolution5x5", "direct_convolution5x5.cs" },
- { "pooling_layer_2", "pooling_layer.cs" },
- { "pooling_layer_3", "pooling_layer.cs" },
- { "pooling_layer_7", "pooling_layer.cs" },
- { "pooling_layer_3_optimized", "pooling_layer.cs" },
- { "pooling_layer_n", "pooling_layer.cs" },
- { "fill_image_borders_replicate", "fill_border.cs" },
- { "fill_image_borders_constant", "fill_border.cs" },
- { "gemm_accumulate_biases", "gemm.cs" },
- { "gemm_interleave4x4", "gemm.cs" },
- { "gemm_ma", "gemm.cs" },
- { "gemm_mm_interleaved_transposed", "gemm.cs" },
- { "gemm_mm_floating_point", "gemm.cs" },
- { "gemm_transpose1x4", "gemm.cs" },
- { "reshape_to_columns", "convolution_layer.cs" },
- { "im2col_kernel3x3_padx0_pady0", "convolution_layer.cs" },
- { "im2col_generic", "convolution_layer.cs" },
- { "im2col_reduced", "convolution_layer.cs" },
- { "col2im", "convolution_layer.cs" },
- { "transpose", "transpose.cs" },
- { "activation_layer", "activation_layer.cs" },
- { "softmax_layer_max", "softmax_layer.cs" },
- { "softmax_layer_shift_exp_sum", "softmax_layer.cs" },
- { "softmax_layer_norm", "softmax_layer.cs" },
- { "pixelwise_mul_float", "pixelwise_mul_float.cs" },
- { "normalization_layer", "normalization_layer.cs" },
- { "batchnormalization_layer", "batchnormalization_layer.cs" },
- { "concatenate_depth", "concatenate.cs" },
- { "dropout", "dropout.cs" },
- { "normalize_planar_yuv_layer", "normalize_planar_yuv_layer.cs" },
- { "scale_nearest_neighbour", "scale.cs" },
- { "arithmetic_add", "arithmetic_add.cs" },
- { "depthwise_convolution_3x3", "depthwise_convolution3x3.cs" },
-};
-
-const std::map<std::string, std::string> GCKernelLibrary::_program_source_map =
-{
-#ifdef EMBEDDED_KERNELS
- {
- "helpers_cs.h",
-#include "./cs_shaders/helpers_cs.hembed"
- },
- {
- "activation_layer_helpers_cs.h",
-#include "./cs_shaders/activation_layer_helpers_cs.hembed"
- },
- {
- "absdiff.cs",
-#include "./cs_shaders/absdiff.csembed"
- },
- {
- "tensor_shift.cs",
-#include "./cs_shaders/tensor_shift.csembed"
- },
- {
- "convolution_layer.cs",
-#include "./cs_shaders/convolution_layer.csembed"
- },
- {
- "direct_convolution1x1.cs",
-#include "./cs_shaders/direct_convolution1x1.csembed"
- },
- {
- "direct_convolution3x3.cs",
-#include "./cs_shaders/direct_convolution3x3.csembed"
- },
- {
- "direct_convolution5x5.cs",
-#include "./cs_shaders/direct_convolution5x5.csembed"
- },
- {
- "pooling_layer.cs",
-#include "./cs_shaders/pooling_layer.csembed"
- },
- {
- "fill_border.cs",
-#include "./cs_shaders/fill_border.csembed"
- },
- {
- "gemm.cs",
-#include "./cs_shaders/gemm.csembed"
- },
- {
- "transpose.cs",
-#include "./cs_shaders/transpose.csembed"
- },
- {
- "activation_layer.cs",
-#include "./cs_shaders/activation_layer.csembed"
- },
- {
- "softmax_layer.cs",
-#include "./cs_shaders/softmax_layer.csembed"
- },
- {
- "pixelwise_mul_float.cs",
-#include "./cs_shaders/pixelwise_mul_float.csembed"
- },
- {
- "normalization_layer.cs",
-#include "./cs_shaders/normalization_layer.csembed"
- },
- {
- "batchnormalization_layer.cs",
-#include "./cs_shaders/batchnormalization_layer.csembed"
- },
- {
- "concatenate.cs",
-#include "./cs_shaders/concatenate.csembed"
- },
- {
- "dropout.cs",
-#include "./cs_shaders/dropout.csembed"
- },
- {
- "normalize_planar_yuv_layer.cs",
-#include "./cs_shaders/normalize_planar_yuv_layer.csembed"
- },
- {
- "scale.cs",
-#include "./cs_shaders/scale.csembed"
- },
- {
- "arithmetic_add.cs",
-#include "./cs_shaders/arithmetic_add.csembed"
- },
- {
- "depthwise_convolution3x3.cs",
-#include "./cs_shaders/depthwise_convolution3x3.csembed"
- },
-#endif /* EMBEDDED_KERNELS */
-};
-
-GCKernelLibrary::GCKernelLibrary()
- : _display(EGL_NO_DISPLAY), _context(EGL_NO_CONTEXT), _frame_buffer(0), _tex_rt(0), _shader_path("./"), _programs_map(), _built_programs_map()
-{
-}
-
-GCKernelLibrary &GCKernelLibrary::get()
-{
- static GCKernelLibrary _kernel_library;
- return _kernel_library;
-}
-
-void GCKernelLibrary::init(std::string shader_path, EGLDisplay dpy, EGLContext ctx)
-{
- //TODO: deal with old display and context.
- _shader_path = std::move(shader_path);
-
- _display = dpy;
- _context = ctx;
-
- eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, _context);
- setup_dummy_fbo();
-}
-
-void GCKernelLibrary::set_shader_path(const std::string &shader_path)
-{
- _shader_path = shader_path;
-}
-
-void GCKernelLibrary::set_context(EGLDisplay dpy, EGLContext ctx)
-{
- //TODO: deal with old display and context.
- _display = dpy;
- _context = ctx;
-
- eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx);
- setup_dummy_fbo();
-}
-
-GCKernel GCKernelLibrary::create_kernel(const std::string &shader_name, const StringSet &build_options_set) const
-{
- // Find which program contains the kernel
- auto shader_program_it = _shader_program_map.find(shader_name);
-
- if(_shader_program_map.end() == shader_program_it)
- {
- ARM_COMPUTE_ERROR_VAR("Shader %s not found in the GCKernelLibrary", shader_name.c_str());
- }
-
- // Check if the program has been built before with same build options.
- const std::string program_name = shader_program_it->second;
- const std::string build_options = stringify_set(build_options_set);
- const std::string built_program_name = program_name + "_" + build_options;
- auto built_program_it = _built_programs_map.find(built_program_name);
-
- GCKernel kernel;
-
- if(_built_programs_map.end() != built_program_it)
- {
- // If program has been built, retrieve to create kernel from it
- kernel = built_program_it->second;
- }
- else
- {
- GCProgram program = load_program(program_name);
-
- std::string source_name = _shader_path + shader_program_it->second;
-
- // load shader
- GLuint shader = program.compile_shader(build_options);
-
- // Build program
- GLuint gles_program = program.link_program(shader);
-
- // Create GCKernel
- kernel = GCKernel(shader_name, gles_program);
-
- // Add built program to internal map
- _built_programs_map.emplace(built_program_name, kernel);
- }
-
- kernel.use();
- kernel.clear_arguments();
- // set shader params binding point
- kernel.set_shader_params_binding_point(0);
-
- return kernel;
-}
-
-std::string GCKernelLibrary::preprocess_shader(const std::string &shader_source) const
-{
- enum class ParserStage
- {
- FIRST,
- SKIP_COMMENTS = FIRST,
- RESOLVE_INCLUDES,
- LAST
- };
-
- // Define a GLES compute shader parser function
- std::function<std::string(const std::string &, ParserStage, int)> cs_parser;
- cs_parser = [&](const std::string & src, ParserStage stage, int) -> std::string
- {
- std::string dst;
-
- if(stage == ParserStage::LAST || std::regex_match(src, std::regex(R"(\s*)")))
- {
- return src;
- }
- auto next_stage = static_cast<ParserStage>(static_cast<int>(stage) + 1);
-
- std::string search_pattern;
- switch(stage)
- {
- case ParserStage::SKIP_COMMENTS:
- search_pattern = R"((/\*([^*]|\n|(\*+([^*/]|\n)))*\*+/)|(//.*))";
- break;
- case ParserStage::RESOLVE_INCLUDES:
- search_pattern = R"rgx((?:^|\n)[ \t]*#include "(.*)")rgx";
- break;
- default:
- break;
- }
-
- std::regex search_regex(search_pattern);
- std::smatch match;
- ptrdiff_t parsed_pos = 0;
- if(std::regex_search(src, match, search_regex))
- {
- // Pass the content before the match to the next stage
- dst.append(cs_parser(src.substr(0, match.position()), next_stage, 0));
- parsed_pos = match.position() + match.length();
-
- // Deal with the matched content
- switch(stage)
- {
- case ParserStage::RESOLVE_INCLUDES:
- {
- // Replace with the included file contents
- // And parse the content from the first stage
- const std::string source_name = _shader_path + match.str(1);
- dst.append(cs_parser(read_file(source_name, false), ParserStage::FIRST, 0));
- break;
- }
- case ParserStage::SKIP_COMMENTS:
- default:
- dst.append(match.str());
- break;
- }
- next_stage = stage;
- }
- dst.append(cs_parser(src.substr(parsed_pos, src.length() - parsed_pos), next_stage, 0));
-
- return dst;
- };
-
- return cs_parser(shader_source, ParserStage::FIRST, 0);
-}
-
-const GCProgram &GCKernelLibrary::load_program(const std::string &program_name) const
-{
- const auto program_it = _programs_map.find(program_name);
-
- if(program_it != _programs_map.end())
- {
- return program_it->second;
- }
-
- GCProgram program;
-
-#ifdef EMBEDDED_KERNELS
- const auto program_source_it = _program_source_map.find(program_name);
-
- if(_program_source_map.end() == program_source_it)
- {
- ARM_COMPUTE_ERROR_VAR("Embedded program for %s does not exist.", program_name.c_str());
- }
-
- program = GCProgram(program_name, program_source_it->second);
-#else /* EMBEDDED_KERNELS */
- // Check for binary
- std::string source_name = _shader_path + program_name;
- if(std::ifstream(source_name).is_open())
- {
- program = GCProgram(program_name, preprocess_shader(read_file(source_name, false)));
- }
- else
- {
- ARM_COMPUTE_ERROR_VAR("Shader file %s does not exist.", source_name.c_str());
- }
-#endif /* EMBEDDED_KERNELS */
-
- // Insert program to program map
- const auto new_program = _programs_map.emplace(program_name, std::move(program));
-
- return new_program.first->second;
-}
-
-void GCKernelLibrary::setup_dummy_fbo()
-{
- ARM_COMPUTE_GL_CHECK(glGenFramebuffers(1, &_frame_buffer));
- ARM_COMPUTE_GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, _frame_buffer));
- ARM_COMPUTE_GL_CHECK(glGenTextures(1, &_tex_rt));
- ARM_COMPUTE_GL_CHECK(glBindTexture(GL_TEXTURE_2D, _tex_rt));
- ARM_COMPUTE_GL_CHECK(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr));
- ARM_COMPUTE_GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _tex_rt, 0));
-}
-
-GCKernelLibrary::~GCKernelLibrary()
-{
- for(auto &program : _built_programs_map)
- {
- static_cast<GCKernel>(program.second).cleanup();
- }
-
- ARM_COMPUTE_GL_CHECK(glBindTexture(GL_TEXTURE_2D, 0));
- ARM_COMPUTE_GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0));
- ARM_COMPUTE_GL_CHECK(glDeleteTextures(1, &_tex_rt));
- ARM_COMPUTE_GL_CHECK(glDeleteFramebuffers(1, &_frame_buffer));
-}
-
-std::string GCKernelLibrary::stringify_set(const StringSet &s) const
-{
- std::string concat_set;
-
- // Concatenate set
- for(const auto &el : s)
- {
- concat_set += el + "\n";
- }
-
- return concat_set;
-}
diff --git a/src/core/GLES_COMPUTE/IGCKernel.cpp b/src/core/GLES_COMPUTE/IGCKernel.cpp
deleted file mode 100644
index eb96f9150c..0000000000
--- a/src/core/GLES_COMPUTE/IGCKernel.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-#include <cstddef>
-#include <sstream>
-
-using namespace arm_compute;
-
-void arm_compute::enqueue(IGCKernel &kernel, const Window &window, const gles::NDRange &lws)
-{
- ARM_COMPUTE_UNUSED(kernel);
-
- if(kernel.kernel().get_program() == 0)
- {
- return;
- }
-
- ARM_COMPUTE_ERROR_ON((0 == (window.x().end() - window.x().start())) || (0 == (window.y().end() - window.y().start())));
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR((((window.x().end() - window.x().start()) % (window.x().step() * lws[0])) != 0),
- "window x end =%d, start=%d, step=%d, lws x=%zu", window.x().end(), window.x().start(), window.x().step(), lws[0]);
- ARM_COMPUTE_ERROR_ON_MSG_VAR((((window.y().end() - window.y().start()) % (window.y().step() * lws[1])) != 0),
- "window y end =%d, start=%d, step=%d, lws y=%zu", window.y().end(), window.y().start(), window.y().step(), lws[1]);
- ARM_COMPUTE_ERROR_ON_MSG_VAR((((window.z().end() - window.z().start()) % (window.z().step() * lws[2])) != 0),
- "window z end =%d, start=%d, step=%d, lws z=%zu", window.z().end(), window.z().start(), window.z().step(), lws[2]);
-
- ARM_COMPUTE_GL_CHECK(glDispatchCompute(((window.x().end() - window.x().start()) / window.x().step()) / lws[0],
- ((window.y().end() - window.y().start()) / window.y().step()) / lws[1],
- ((window.z().end() - window.z().start()) / window.z().step()) / lws[2]));
-}
-
-IGCKernel::IGCKernel()
- : _kernel(), _lws_hint(gles::NDRange(1U, 1U, 1U)), _target(GPUTarget::MIDGARD)
-{
-}
-
-GCKernel &IGCKernel::kernel()
-{
- return _kernel;
-}
-
-template <unsigned int dimension_size>
-unsigned int IGCKernel::num_arguments_per_tensor() const
-{
- // Rounding up the tensor attributes structure in compute shader to a multiple of a vec4
- return ceil_to_multiple(1 + 2 * dimension_size, 4);
-}
-
-template <unsigned int dimension_size>
-void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
-{
- ARM_COMPUTE_ERROR_ON(tensor == nullptr);
-
- const ITensorInfo *info = tensor->info();
- const Strides &strides = info->strides_in_bytes();
-
- // Calculate offset to the start of the window
- unsigned int offset_first_element = info->offset_first_element_in_bytes();
-
- for(unsigned int n = 0; n < info->num_dimensions(); ++n)
- {
- offset_first_element += window[n].start() * strides[n];
- }
-
- unsigned int idx_start = idx;
-
- for(unsigned int dimension = 0; dimension < dimension_size; dimension++)
- {
- _kernel.set_argument(idx++, strides[dimension]);
- _kernel.set_argument(idx++, strides[dimension] * window[dimension].step());
- }
-
- _kernel.set_argument(idx++, offset_first_element);
-
- // Rounding up the tensor attributes structure in compute shader to a multiple of a vec4
- unsigned int idx_end = ceil_to_multiple(idx, 4);
- for(unsigned int i = idx; i < idx_end; ++i)
- {
- _kernel.set_argument(i, 0);
- }
- idx = idx_end;
-
- ARM_COMPUTE_GL_CHECK(glBindBufferBase(GL_SHADER_STORAGE_BUFFER, binding_point, tensor->gc_buffer()));
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(idx_start + num_arguments_per_tensor<dimension_size>() != idx,
- "add_%dD_tensor_argument() is supposed to add exactly %d arguments to the kernel", dimension_size, num_arguments_per_tensor<dimension_size>());
- ARM_COMPUTE_UNUSED(idx_start);
-}
-
-void IGCKernel::add_1D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
-{
- add_tensor_argument<1>(idx, tensor, binding_point, window);
-}
-
-void IGCKernel::add_2D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
-{
- add_tensor_argument<2>(idx, tensor, binding_point, window);
-}
-
-void IGCKernel::add_3D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
-{
- add_tensor_argument<3>(idx, tensor, binding_point, window);
-}
-
-unsigned int IGCKernel::num_arguments_per_1D_tensor() const
-{
- return num_arguments_per_tensor<1>();
-}
-
-unsigned int IGCKernel::num_arguments_per_2D_tensor() const
-{
- return num_arguments_per_tensor<2>();
-}
-
-unsigned int IGCKernel::num_arguments_per_3D_tensor() const
-{
- return num_arguments_per_tensor<3>();
-}
diff --git a/src/core/GLES_COMPUTE/IGCSimple2DKernel.cpp b/src/core/GLES_COMPUTE/IGCSimple2DKernel.cpp
deleted file mode 100644
index 4c38412814..0000000000
--- a/src/core/GLES_COMPUTE/IGCSimple2DKernel.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-
-using namespace arm_compute;
-
-void IGCSimple2DKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_2D();
-
- do
- {
- unsigned int idx = 0;
- add_2D_tensor_argument(idx, _input, 1, slice);
- add_2D_tensor_argument(idx, _output, 2, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_2D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/IGCSimple3DKernel.cpp b/src/core/GLES_COMPUTE/IGCSimple3DKernel.cpp
deleted file mode 100644
index df852858e2..0000000000
--- a/src/core/GLES_COMPUTE/IGCSimple3DKernel.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-
-using namespace arm_compute;
-
-void IGCSimple3DKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- Window slice = window.first_slice_window_3D();
-
- _kernel.use();
-
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1; // SSBO binding starts from 1.
- add_3D_tensor_argument(idx, _input, binding++, slice);
- add_3D_tensor_argument(idx, _output, binding++, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/IGCSimpleKernel.cpp b/src/core/GLES_COMPUTE/IGCSimpleKernel.cpp
deleted file mode 100644
index fb31ac8377..0000000000
--- a/src/core/GLES_COMPUTE/IGCSimpleKernel.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/IGCSimpleKernel.h"
-
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/IAccessWindow.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/WindowHelpers.h"
-
-using namespace arm_compute;
-
-IGCSimpleKernel::IGCSimpleKernel()
- : _input(nullptr), _output(nullptr)
-{
-}
-
-void IGCSimpleKernel::configure(const IGCTensor *input, IGCTensor *output, unsigned int num_elems_processed_per_iteration, bool border_undefined, const BorderSize &border_size)
-{
- _input = input;
- _output = output;
-
- // Configure kernel window
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration), border_undefined, border_size);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win,
- AccessWindowHorizontal(input->info(), 0, num_elems_processed_per_iteration),
- output_access);
-
- output_access.set_valid_region(win, input->info()->valid_region(), border_undefined, border_size);
-
- IGCKernel::configure(win);
-}
diff --git a/src/core/GLES_COMPUTE/IGCTensor.cpp b/src/core/GLES_COMPUTE/IGCTensor.cpp
deleted file mode 100644
index 0f310b839f..0000000000
--- a/src/core/GLES_COMPUTE/IGCTensor.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-
-using namespace arm_compute;
-
-IGCTensor::IGCTensor()
- : _mapping(nullptr), _needs_shifting(false)
-{
-}
-
-void IGCTensor::map(bool blocking)
-{
- _mapping = do_map(blocking);
-}
-
-void IGCTensor::unmap()
-{
- do_unmap();
- _mapping = nullptr;
-}
-
-void IGCTensor::clear()
-{
- this->map();
- std::memset(static_cast<void *>(_mapping), 0, this->info()->total_size());
- this->unmap();
-}
-
-uint8_t *IGCTensor::buffer() const
-{
- return _mapping;
-}
-
-bool IGCTensor::needs_shifting() const
-{
- return _needs_shifting;
-}
-
-void IGCTensor::set_needs_shifting(bool needs_shifting)
-{
- _needs_shifting = needs_shifting;
-}
diff --git a/src/core/GLES_COMPUTE/OpenGLES.cpp b/src/core/GLES_COMPUTE/OpenGLES.cpp
deleted file mode 100644
index f56bcfaeb6..0000000000
--- a/src/core/GLES_COMPUTE/OpenGLES.cpp
+++ /dev/null
@@ -1,826 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-
-#include <dlfcn.h>
-#include <iostream>
-#include <vector>
-
-using eglGetProcAddress_func = __eglMustCastToProperFunctionPointerType EGLAPIENTRY (*)(const char *procname);
-using eglBindAPI_func = EGLBoolean EGLAPIENTRY (*)(EGLenum api);
-using eglChooseConfig_func = EGLBoolean EGLAPIENTRY (*)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-using eglCreateContext_func = EGLContext EGLAPIENTRY (*)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
-using eglDestroyContext_func = EGLBoolean EGLAPIENTRY (*)(EGLDisplay dpy, EGLContext ctx);
-using eglGetDisplay_func = EGLDisplay EGLAPIENTRY (*)(EGLNativeDisplayType display_id);
-using eglInitialize_func = EGLBoolean EGLAPIENTRY (*)(EGLDisplay dpy, EGLint *major, EGLint *minor);
-using eglMakeCurrent_func = EGLBoolean EGLAPIENTRY (*)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-using eglTerminate_func = EGLBoolean EGLAPIENTRY (*)(EGLDisplay dpy);
-using eglGetError_func = EGLint EGLAPIENTRY (*)();
-using eglQueryString_func = char const * EGLAPIENTRY (*)(EGLDisplay dpy, EGLint name);
-using glAttachShader_func = void GL_APIENTRY (*)(GLuint program, GLuint shader);
-using glCompileShader_func = void GL_APIENTRY (*)(GLuint shader);
-using glCreateProgram_func = GLuint GL_APIENTRY (*)();
-using glCreateShader_func = GLuint GL_APIENTRY (*)(GLenum type);
-using glDeleteProgram_func = void GL_APIENTRY (*)(GLuint program);
-using glDeleteShader_func = void GL_APIENTRY (*)(GLuint shader);
-using glDetachShader_func = void GL_APIENTRY (*)(GLuint program, GLuint shader);
-using glGetProgramInfoLog_func = void GL_APIENTRY (*)(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog);
-using glGetProgramiv_func = void GL_APIENTRY (*)(GLuint program, GLenum pname, GLint *params);
-using glGetShaderInfoLog_func = void GL_APIENTRY (*)(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *infolog);
-using glGetShaderiv_func = void GL_APIENTRY (*)(GLuint shader, GLenum pname, GLint *params);
-using glLinkProgram_func = void GL_APIENTRY (*)(GLuint program);
-using glShaderSource_func = void GL_APIENTRY (*)(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length);
-using glUseProgram_func = void GL_APIENTRY (*)(GLuint program);
-using glBindBuffer_func = void GL_APIENTRY (*)(GLenum target, GLuint buffer);
-using glBindBufferBase_func = void GL_APIENTRY (*)(GLenum target, GLuint index, GLuint buffer);
-using glBufferData_func = void GL_APIENTRY (*)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
-using glDeleteBuffers_func = void GL_APIENTRY (*)(GLsizei n, const GLuint *buffers);
-using glDispatchCompute_func = void GL_APIENTRY (*)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-using glFlush_func = void GL_APIENTRY (*)();
-using glGenBuffers_func = void GL_APIENTRY (*)(GLsizei n, GLuint *buffers);
-using glGetProgramResourceIndex_func = GLuint GL_APIENTRY (*)(GLuint program, GLenum programInterface, const GLchar *name);
-using glGetUniformLocation_func = GLint GL_APIENTRY (*)(GLuint program, const GLchar *name);
-using glMapBufferRange_func = void *GL_APIENTRY (*)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-using glMemoryBarrier_func = void GL_APIENTRY (*)(GLbitfield barriers);
-using glUniform1ui_func = void GL_APIENTRY (*)(GLint location, GLuint v0);
-using glUnmapBuffer_func = GLboolean GL_APIENTRY (*)(GLenum target);
-using glGetError_func = GLenum GL_APIENTRY (*)();
-using glGetString_func = const GLubyte * GL_APIENTRY (*)(GLenum name);
-using glGetActiveUniformBlockiv_func = void GL_APIENTRY (*)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-using glUniformBlockBinding_func = void GL_APIENTRY (*)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-using glGetUniformBlockIndex_func = GLuint GL_APIENTRY (*)(GLuint program, const GLchar *uniformBlockName);
-using glGenTextures_func = void GL_APIENTRY (*)(GLsizei n, GLuint *textures);
-using glDeleteTextures_func = void GL_APIENTRY (*)(GLsizei n, const GLuint *textures);
-using glBindTexture_func = void GL_APIENTRY (*)(GLenum target, GLuint texture);
-using glTexImage2D_func = void GL_APIENTRY (*)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
- const GLvoid *pixels);
-using glGenFramebuffers_func = void GL_APIENTRY (*)(GLsizei n, GLuint *framebuffers);
-using glDeleteFramebuffers_func = void GL_APIENTRY (*)(GLsizei n, const GLuint *framebuffers);
-using glBindFramebuffer_func = void GL_APIENTRY (*)(GLenum target, GLuint framebuffer);
-using glFramebufferTexture2D_func = void GL_APIENTRY (*)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-
-class GLESSymbols
-{
-private:
- void init()
- {
- void *egl_handle = dlopen("libEGL.so", RTLD_LAZY | RTLD_LOCAL);
- void *glesv2_handle = dlopen("libGLESv2.so", RTLD_LAZY | RTLD_LOCAL);
- void *glesv3_handle = dlopen("libGLESv3.so", RTLD_LAZY | RTLD_LOCAL);
- if(egl_handle == nullptr)
- {
- std::cerr << "Can't load libEGL.so: " << dlerror() << std::endl;
- }
- else
- {
-#undef EGL_ENTRY
-#define EGL_ENTRY(_api) _api = reinterpret_cast<_api##_func>(dlsym(egl_handle, #_api));
-#include "./egl_entries.in"
-#undef EGL_ENTRY
-
- if(eglGetProcAddress != nullptr)
- {
-#undef EGL_ENTRY
-#define EGL_ENTRY(_api) \
- if((_api) == nullptr) \
- (_api) = reinterpret_cast<_api##_func>(eglGetProcAddress(#_api));
-#include "./egl_entries.in"
-#undef EGL_ENTRY
-
-#undef GL_ENTRY
-#define GL_ENTRY(_api) _api = reinterpret_cast<_api##_func>(eglGetProcAddress(#_api));
-#include "./gl_entries.in"
-#undef GL_ENTRY
- }
-
- std::vector<void *> handles = { glesv3_handle, glesv2_handle };
- for(auto &handle : handles)
- {
- if(handle != nullptr)
- {
-#undef GL_ENTRY
-#define GL_ENTRY(_api) \
- if((_api) == nullptr) \
- (_api) = reinterpret_cast<_api##_func>(dlsym(handle, #_api));
-#include "./gl_entries.in"
-#undef GL_ENTRY
- }
- }
-
- //Don't call dlclose(handle) or all the symbols will be unloaded !
- }
- }
- bool _initialized = false;
-
-public:
- static GLESSymbols &get()
- {
- static GLESSymbols symbols = GLESSymbols();
- if(!symbols._initialized)
- {
- symbols._initialized = true;
- symbols.init();
- }
-
- return symbols;
- }
-
-#undef EGL_ENTRY
-#undef GL_ENTRY
-#define EGL_ENTRY(_api) _api##_func _api = nullptr;
-#define GL_ENTRY(_api) EGL_ENTRY(_api)
-#include "./egl_entries.in"
-#include "./gl_entries.in"
-#undef EGL_ENTRY
-#undef GL_ENTRY
-};
-
-bool arm_compute::opengles31_is_available()
-{
- return GLESSymbols::get().glDispatchCompute != nullptr;
-}
-
-__eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
-{
- auto func = GLESSymbols::get().eglGetProcAddress;
- if(func != nullptr)
- {
- return func(procname);
- }
- else
- {
- return nullptr;
- }
-}
-
-EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
-{
- auto func = GLESSymbols::get().eglBindAPI;
- if(func != nullptr)
- {
- return func(api);
- }
- else
- {
- return EGL_FALSE;
- }
-}
-
-EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
-{
- auto func = GLESSymbols::get().eglChooseConfig;
- if(func != nullptr)
- {
- return func(dpy, attrib_list, configs, config_size, num_config);
- }
- else
- {
- return EGL_FALSE;
- }
-}
-
-EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
-{
- auto func = GLESSymbols::get().eglCreateContext;
- if(func != nullptr)
- {
- return func(dpy, config, share_context, attrib_list);
- }
- else
- {
- return nullptr;
- }
-}
-
-EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
-{
- auto func = GLESSymbols::get().eglDestroyContext;
- if(func != nullptr)
- {
- return func(dpy, ctx);
- }
- else
- {
- return EGL_FALSE;
- }
-}
-
-EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
-{
- auto func = GLESSymbols::get().eglGetDisplay;
- if(func != nullptr)
- {
- return func(display_id);
- }
- else
- {
- return nullptr;
- }
-}
-
-EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- auto func = GLESSymbols::get().eglInitialize;
- if(func != nullptr)
- {
- return func(dpy, major, minor);
- }
- else
- {
- return EGL_FALSE;
- }
-}
-
-EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
-{
- auto func = GLESSymbols::get().eglMakeCurrent;
- if(func != nullptr)
- {
- return func(dpy, draw, read, ctx);
- }
- else
- {
- return EGL_FALSE;
- }
-}
-
-EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
-{
- auto func = GLESSymbols::get().eglTerminate;
- if(func != nullptr)
- {
- return func(dpy);
- }
- else
- {
- return EGL_FALSE;
- }
-}
-
-EGLint EGLAPIENTRY eglGetError()
-{
- auto func = GLESSymbols::get().eglGetError;
- if(func != nullptr)
- {
- return func();
- }
- else
- {
- return GL_NO_ERROR;
- }
-}
-
-char const *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
-{
- auto func = GLESSymbols::get().eglQueryString;
- if(func != nullptr)
- {
- return func(dpy, name);
- }
- else
- {
- return nullptr;
- }
-}
-
-void GL_APIENTRY glAttachShader(GLuint program, GLuint shader)
-{
- auto func = GLESSymbols::get().glAttachShader;
- if(func != nullptr)
- {
- return func(program, shader);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glCompileShader(GLuint shader)
-{
- auto func = GLESSymbols::get().glCompileShader;
- if(func != nullptr)
- {
- return func(shader);
- }
- else
- {
- return;
- }
-}
-
-GLuint GL_APIENTRY glCreateProgram()
-{
- auto func = GLESSymbols::get().glCreateProgram;
- if(func != nullptr)
- {
- return func();
- }
- else
- {
- return 0;
- }
-}
-
-GLuint GL_APIENTRY glCreateShader(GLenum type)
-{
- auto func = GLESSymbols::get().glCreateShader;
- if(func != nullptr)
- {
- return func(type);
- }
- else
- {
- return 0;
- }
-}
-
-void GL_APIENTRY glDeleteProgram(GLuint program)
-{
- auto func = GLESSymbols::get().glDeleteProgram;
- if(func != nullptr)
- {
- return func(program);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glDeleteShader(GLuint shader)
-{
- auto func = GLESSymbols::get().glDeleteShader;
- if(func != nullptr)
- {
- return func(shader);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glDetachShader(GLuint program, GLuint shader)
-{
- auto func = GLESSymbols::get().glDetachShader;
- if(func != nullptr)
- {
- return func(program, shader);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
-{
- auto func = GLESSymbols::get().glGetProgramInfoLog;
- if(func != nullptr)
- {
- return func(program, bufSize, length, infoLog);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint *params)
-{
- auto func = GLESSymbols::get().glGetProgramiv;
- if(func != nullptr)
- {
- return func(program, pname, params);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
-{
- auto func = GLESSymbols::get().glGetShaderInfoLog;
- if(func != nullptr)
- {
- return func(shader, bufSize, length, infoLog);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
-{
- auto func = GLESSymbols::get().glGetShaderiv;
- if(func != nullptr)
- {
- return func(shader, pname, params);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glLinkProgram(GLuint program)
-{
- auto func = GLESSymbols::get().glLinkProgram;
- if(func != nullptr)
- {
- return func(program);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
-{
- auto func = GLESSymbols::get().glShaderSource;
- if(func != nullptr)
- {
- return func(shader, count, string, length);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glUseProgram(GLuint program)
-{
- auto func = GLESSymbols::get().glUseProgram;
- if(func != nullptr)
- {
- return func(program);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
-{
- auto func = GLESSymbols::get().glBindBuffer;
- if(func != nullptr)
- {
- return func(target, buffer);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
-{
- auto func = GLESSymbols::get().glBindBufferBase;
- if(func != nullptr)
- {
- return func(target, index, buffer);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
-{
- auto func = GLESSymbols::get().glBufferData;
- if(func != nullptr)
- {
- return func(target, size, data, usage);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffers)
-{
- auto func = GLESSymbols::get().glDeleteBuffers;
- if(func != nullptr)
- {
- return func(n, buffers);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
-{
- auto func = GLESSymbols::get().glDispatchCompute;
- if(func != nullptr)
- {
- return func(num_groups_x, num_groups_y, num_groups_z);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glFlush(void)
-{
- auto func = GLESSymbols::get().glFlush;
- if(func != nullptr)
- {
- return func();
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glGenBuffers(GLsizei n, GLuint *buffers)
-{
- auto func = GLESSymbols::get().glGenBuffers;
- if(func != nullptr)
- {
- return func(n, buffers);
- }
- else
- {
- return;
- }
-}
-
-GLuint GL_APIENTRY glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
-{
- auto func = GLESSymbols::get().glGetProgramResourceIndex;
- if(func != nullptr)
- {
- return func(program, programInterface, name);
- }
- else
- {
- return GL_INVALID_INDEX;
- }
-}
-
-GLint GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar *name)
-{
- auto func = GLESSymbols::get().glGetUniformLocation;
- if(func != nullptr)
- {
- return func(program, name);
- }
- else
- {
- return -1;
- }
-}
-
-void *GL_APIENTRY glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
-{
- auto func = GLESSymbols::get().glMapBufferRange;
- if(func != nullptr)
- {
- return func(target, offset, length, access);
- }
- else
- {
- return nullptr;
- }
-}
-
-void GL_APIENTRY glMemoryBarrier(GLbitfield barriers)
-{
- auto func = GLESSymbols::get().glMemoryBarrier;
- if(func != nullptr)
- {
- return func(barriers);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glUniform1ui(GLint location, GLuint v0)
-{
- auto func = GLESSymbols::get().glUniform1ui;
- if(func != nullptr)
- {
- return func(location, v0);
- }
- else
- {
- return;
- }
-}
-
-GLboolean GL_APIENTRY glUnmapBuffer(GLenum target)
-{
- auto func = GLESSymbols::get().glUnmapBuffer;
- if(func != nullptr)
- {
- return func(target);
- }
- else
- {
- return GL_FALSE;
- }
-}
-
-GLenum GL_APIENTRY glGetError(void)
-{
- auto func = GLESSymbols::get().glGetError;
- if(func != nullptr)
- {
- return func();
- }
- else
- {
- return GL_NO_ERROR;
- }
-}
-
-const GLubyte *GL_APIENTRY glGetString(GLenum name)
-{
- auto func = GLESSymbols::get().glGetString;
- if(func != nullptr)
- {
- return func(name);
- }
- else
- {
- return nullptr;
- }
-}
-
-void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
-{
- auto func = GLESSymbols::get().glGetActiveUniformBlockiv;
- if(func != nullptr)
- {
- return func(program, uniformBlockIndex, pname, params);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
-{
- auto func = GLESSymbols::get().glUniformBlockBinding;
- if(func != nullptr)
- {
- return func(program, uniformBlockIndex, uniformBlockBinding);
- }
- else
- {
- return;
- }
-}
-
-GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
-{
- auto func = GLESSymbols::get().glGetUniformBlockIndex;
- if(func != nullptr)
- {
- return func(program, uniformBlockName);
- }
- else
- {
- return GL_INVALID_INDEX;
- }
-}
-
-void GL_APIENTRY glGenTextures(GLsizei n, GLuint *textures)
-{
- auto func = GLESSymbols::get().glGenTextures;
- if(func != nullptr)
- {
- return func(n, textures);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures)
-{
- auto func = GLESSymbols::get().glDeleteTextures;
- if(func != nullptr)
- {
- return func(n, textures);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
-{
- auto func = GLESSymbols::get().glBindTexture;
- if(func != nullptr)
- {
- return func(target, texture);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
-{
- auto func = GLESSymbols::get().glTexImage2D;
- if(func != nullptr)
- {
- return func(target, level, internalformat, width, height, border, format, type, pixels);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint *framebuffers)
-{
- auto func = GLESSymbols::get().glGenFramebuffers;
- if(func != nullptr)
- {
- return func(n, framebuffers);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
-{
- auto func = GLESSymbols::get().glDeleteFramebuffers;
- if(func != nullptr)
- {
- return func(n, framebuffers);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
-{
- auto func = GLESSymbols::get().glBindFramebuffer;
- if(func != nullptr)
- {
- return func(target, framebuffer);
- }
- else
- {
- return;
- }
-}
-
-void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-{
- auto func = GLESSymbols::get().glFramebufferTexture2D;
- if(func != nullptr)
- {
- return func(target, attachment, textarget, texture, level);
- }
- else
- {
- return;
- }
-}
diff --git a/src/core/GLES_COMPUTE/cs_shaders/absdiff.cs b/src/core/GLES_COMPUTE/cs_shaders/absdiff.cs
deleted file mode 100644
index c5196a14dc..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/absdiff.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-/** Calculate the absolute difference of two input images.
- *
- * @param[in] src1_ptr Pointer to the first source image. Supported data types: U8
- * @param[in] src1_attrs The attributes of the first source image
- * @param[in] src2_ptr Pointer to the second source image. Supported data types: Same as @p in1_ptr
- * @param[in] src2_attrs The attributes of the second source image
- * @param[out] dst_ptr Pointer to the destination image. Supported data types: Same as @p in1_ptr
- * @param[in] dst_attrs The attributes of the destination image
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src1_attrs;
- ImageAttributes src2_attrs;
- ImageAttributes dst_attrs;
-};
-
-TENSOR_DECLARATION(1, src1Buffer, uint, src1_ptr, src1_shift, 2, readonly);
-TENSOR_DECLARATION(2, src2Buffer, uint, src2_ptr, src2_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR(src1_attrs, src1_shift);
- ImageIterator src2_iter = CONVERT_TO_IMAGE_ITERATOR(src2_attrs, src2_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- lowp uvec4 tmp1 = LOAD_UNPACK4_CURRENT_ITEM_U8(src1_ptr, src1_iter);
- lowp uvec4 tmp2 = LOAD_UNPACK4_CURRENT_ITEM_U8(src2_ptr, src2_iter);
- lowp uvec4 diff = uvec4(abs(ivec4(tmp1 - tmp2)));
-
- STORE_PACK4_CURRENT_ITEM_U8(dst_ptr, dst_iter, diff);
-}
diff --git a/src/core/GLES_COMPUTE/cs_shaders/activation_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/activation_layer.cs
deleted file mode 100644
index 983b31deba..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/activation_layer.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "activation_layer_helpers_cs.h"
-#include "helpers_cs.h"
-
-/** This performs an activation function floating point inputs.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note Activation function should be given as a preprocessor argument using "#define act_name". e.g. "#define TANH"
- * @note A, B variables required by some activation functions are set using A_VAL= and B_VAL= respectively.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
-};
-
-#ifdef DATA_TYPE_FP32
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float data = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- float data_out = 0.f;
- // Perform activation
-#ifdef LOGISTIC
- data_out = logistic_op(data);
-#elif defined(TANH) /*LOGISTIC*/
- data_out = tanh_op(data);
-#elif defined(RELU) /*RELU*/
- data_out = relu_op(data);
-#elif defined(BRELU) /*BRELU*/
- data_out = brelu_op(data);
-#elif defined(LU_BRELU) /*LU_BRELU*/
- data_out = lu_brelu_op(data);
-#elif defined(LRELU) /*LRELU*/
- data_out = lrelu_op(data);
-#elif defined(SRELU) /*SRELU*/
- data_out = srelu_op(data);
-#elif defined(ELU) /*ELU*/
- data_out = elu_op(data);
-#elif defined(ABS) /*ABS*/
- data_out = abs_op(data);
-#elif defined(SQUARE) /*SQUARE*/
- data_out = square_op(data);
-#elif defined(SQRT) /*SQRT*/
- data_out = sqrt_op(data);
-#elif defined(LINEAR) /*LINEAR*/
- data_out = linear_op(data);
-#elif defined(IDENTITY) /*IDENTITY*/
- data_out = identity_op(data);
-#else /*LOGISTIC*/
-#error Activation function not provided
-#endif /*LOGISTIC*/
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, data_out);
-}
-
-#elif defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec2 data = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- // Perform activation
- float a = data.x;
- float b = data.y;
- vec2 data_out;
-#ifdef LOGISTIC /*LOGISTIC*/
- data_out.x = logistic_op(a);
- data_out.y = logistic_op(b);
-#elif defined(TANH) /*TANH*/
- data_out.x = tanh_op(a);
- data_out.y = tanh_op(b);
-#elif defined(RELU) /*RELU*/
- data_out.x = relu_op(a);
- data_out.y = relu_op(b);
-#elif defined(BRELU) /*BRELU*/
- data_out.x = brelu_op(a);
- data_out.y = brelu_op(b);
-#elif defined(LU_BRELU) /*LU_BRELU*/
- data_out.x = lu_brelu_op(a);
- data_out.y = lu_brelu_op(b);
-#elif defined(LRELU) /*LRELU*/
- data_out.x = lrelu_op(a);
- data_out.y = lrelu_op(b);
-#elif defined(SRELU) /*SRELU*/
- data_out.x = srelu_op(a);
- data_out.y = srelu_op(b);
-#elif defined(ELU) /*ELU*/
- data_out.x = elu_op(a);
- data_out.y = elu_op(b);
-#elif defined(ABS) /*ABS*/
- data_out.x = abs_op(a);
- data_out.y = abs_op(b);
-#elif defined(SQUARE) /*SQUARE*/
- data_out.x = square_op(a);
- data_out.y = square_op(b);
-#elif defined(SQRT) /*SQRT*/
- data_out.x = sqrt_op(a);
- data_out.y = sqrt_op(b);
-#elif defined(LINEAR) /*LINEAR*/
- data_out.x = linear_op(a);
- data_out.y = linear_op(b);
-#elif defined(IDENTITY) /*IDENTITY*/
- data_out.x = identity_op(a);
- data_out.y = identity_op(b);
-#else /*LOGISTIC*/
-#error Activation function not provided
-#endif /*LOGISTIC*/
-
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, data_out);
-}
-#endif /*DATA_TYPE_FP16*/
diff --git a/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h b/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h
deleted file mode 100644
index e353b744ea..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifdef DATA_TYPE_FP32
-precision highp float;
-#elif defined(DATA_TYPE_FP16)
-#if defined(LOGISTIC) || defined(TANH) || defined(SRELU) || defined(SQRT)
-precision highp float;
-#else /*LOGISTIC_TANH_SRELU_SQRT*/
-precision mediump float;
-#endif /*LOGISTIC_TANH_SRELU_SQRT*/
-#endif /*DATA_TYPE_FP32*/
-
-#define ABS_OP(a) abs((a))
-#define ADD_OP(a, b) ((a) + (b))
-#define SUB_OP(a, b) ((a) - (b))
-#define MUL_OP(a, b) ((a) * (b))
-#define MLA_OP(a, b, c) ((b) * (c) + (a))
-#define DIV_OP(a, b) ((a) / (b))
-#define EXP_OP(a) exp((a))
-#define LOG_OP(a) log((a))
-#define SQRT_OP(a) sqrt((a))
-#define CONST_ONE (1.f)
-
-// Logistic Activation
-float logistic_op(float x)
-{
- return DIV_OP(CONST_ONE, ADD_OP(CONST_ONE, EXP_OP(-x)));
-}
-vec4 logistic_op(vec4 x)
-{
- return DIV_OP(vec4(CONST_ONE), ADD_OP(CONST_ONE, EXP_OP(-x)));
-}
-// Hyperbolic Tangent Activation
-float tanh_op(float x)
-{
- float tmp = float(B_VAL) * x;
- if(tmp > 10.f)
- {
- return MUL_OP(float(A_VAL), 1.f);
- }
- else if(tmp < -10.f)
- {
- return MUL_OP(float(A_VAL), -1.f);
- }
- else
- {
- return MUL_OP(float(A_VAL), tanh(tmp + 0.000001f));
- }
-}
-// RELU Tangent Activation
-float relu_op(float x)
-{
- return max(0.f, x);
-}
-vec4 relu_op(vec4 x)
-{
- return max(vec4(0.f), x);
-}
-// Bounded RELU Activation
-float brelu_op(float x)
-{
- return min(float(A_VAL), max(float(0.0), x));
-}
-// Lower Upper Bounded RELU Activation
-float lu_brelu_op(float x)
-{
- return min(max(x, float(B_VAL)), float(A_VAL));
-}
-// Leaky RELU Activation
-float lrelu_op(float x)
-{
- return (x > float(0.0)) ? x : MUL_OP(float(A_VAL), x);
-}
-// Soft RELU Activation
-float srelu_op(float x)
-{
- return LOG_OP(ADD_OP(CONST_ONE, EXP_OP(x)));
-}
-// ELU Activation
-float elu_op(float x)
-{
- return (x >= float(0.0)) ? x : MUL_OP(float(A_VAL), SUB_OP(EXP_OP(x), CONST_ONE));
-}
-// Absolute Activation
-float abs_op(float x)
-{
- return ABS_OP(x);
-}
-// Square Activation
-float square_op(float x)
-{
- return MUL_OP(x, x);
-}
-// Square-root Activation
-float sqrt_op(float x)
-{
- return SQRT_OP(x);
-}
-// Linear Activation
-float linear_op(float x)
-{
- return MLA_OP(float(B_VAL), float(A_VAL), x);
-}
-
-// Linear Activation
-float identity_op(float x)
-{
- return x;
-}
diff --git a/src/core/GLES_COMPUTE/cs_shaders/arithmetic_add.cs b/src/core/GLES_COMPUTE/cs_shaders/arithmetic_add.cs
deleted file mode 100755
index faaf204c62..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/arithmetic_add.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2016-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-precision mediump float;
-#define ADD(x, y) (x) + (y)
-
-/** This function add two tensors.
- *
- * @param[in] src1_ptr Pointer to the first source tensor. Supported data types: F16
- * @param[in] src1_attrs The attributes of the first source tensor
- * @param[in] src2_ptr Pointer to the second source tensor. Supported data types: Same as @p src1_ptr
- * @param[in] src2_attrs The attributes of the second source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: Same as @p src1_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src1_attrs;
- Tensor3DAttributes src2_attrs;
- Tensor3DAttributes dst_attrs;
-};
-
-TENSOR_DECLARATION(1, src1Buffer, uvec4, src1_ptr, src1_shift, 4, readonly);
-TENSOR_DECLARATION(2, src2Buffer, uvec4, src2_ptr, src2_shift, 4, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src1_iter = CONVERT_TO_TENSOR3D_ITERATOR(src1_attrs, src1_shift);
- Tensor3DIterator src2_iter = CONVERT_TO_TENSOR3D_ITERATOR(src2_attrs, src2_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec4 tmp1[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src1_ptr, src1_iter);
- vec4 tmp2[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src2_ptr, src2_iter);
- vec4 addition[2];
- addition[0] = ADD(tmp1[0], tmp2[0]);
- addition[1] = ADD(tmp1[1], tmp2[1]);
-
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, addition);
-}
diff --git a/src/core/GLES_COMPUTE/cs_shaders/batchnormalization_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/batchnormalization_layer.cs
deleted file mode 100644
index f38a90b947..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/batchnormalization_layer.cs
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif /*DATA_TYPE_FP32*/
-
-#define ADD_OP(a, b) ((a) + (b))
-#define SUB_OP(a, b) ((a) - (b))
-#define MUL_OP(a, b) ((a) * (b))
-#define INVSQRT_OP(a) inversesqrt((a))
-#define SQCVT_SAT(a) (a)
-
-#if defined(LU_BRELU)
-#define ACTIVATION_FUNC(x) min(max(x, float(B_VAL)), float(A_VAL))
-#elif defined(BRELU)
-#define ACTIVATION_FUNC(x) min(max(x, float(0)), float(A_VAL))
-#elif defined(RELU)
-#define ACTIVATION_FUNC(x) max(x, float(0))
-#else /* defined(FUSED_ACT) */
-#define ACTIVATION_FUNC(x) (x)
-#endif /* defined(FUSED_ACT) */
-
-/** Apply batch normalization.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note Epsilon parameter in the batch normalization equation should be given as a preprocessor argument using "#define EPSILON". e.g. "#define EPSILON 0.1"
- * @note Beta is optional with default value of 0. If not provided, the preprocessor argument "USE_DEFAULT_BETA" should be given
- * @note Gamma is optional with default value of 1. If not provided, the preprocessor argument "USE_DEFAULT_GAMMA" should be given
- *
- * @param[in] src_ptr Pointer to the first source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] mean_ptr Pointer to the mean source tensor. Supported data types: same as @p src_ptr
- * @param[in] mean_attrs The attributes of the mean tensor
- * @param[in] var_ptr Pointer to the var tensor. Supported data types: same as @p src_ptr
- * @param[in] var_attrs The attributes of the var tensor
- * @param[in] beta_ptr (Optional) Pointer to the beta source tensor. If not provided, default value of beta is 0. Supported data types: same as @p src_ptr
- * @param[in] beta_attrs (Optional) The attributes of the beta tensor
- * @param[in] gamma_ptr (Optional) Pointer to the gamma source tensor. If not provided, default value of gamma is 1. Supported data types: same as @p src_ptr
- * @param[in] gamma_attrs (Optional) The attributes of the gamma tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- VectorAttributes mean_attrs;
- VectorAttributes var_attrs;
-#ifndef USE_DEFAULT_BETA
- VectorAttributes beta_attrs;
-#endif /* USE_DEFAULT_BETA */
-#ifndef USE_DEFAULT_GAMMA
- VectorAttributes gamma_attrs;
-#endif /* USE_DEFAULT_GAMMA */
-};
-
-#ifdef DATA_TYPE_FP32
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-TENSOR_DECLARATION(3, meanBuffer, float, mean_ptr, mean_shift, 2, readonly);
-TENSOR_DECLARATION(4, varBuffer, float, var_ptr, var_shift, 2, readonly);
-#ifndef USE_DEFAULT_BETA
-TENSOR_DECLARATION(5, betaBuffer, float, beta_ptr, beta_shift, 2, readonly);
-#endif /* USE_DEFAULT_BETA */
-#ifndef USE_DEFAULT_GAMMA
-#ifdef USE_DEFAULT_BETA
-TENSOR_DECLARATION(5, gammaBuffer, float, gamma_ptr, gamma_shift, 2, readonly);
-#else /* USE_DEFAULT_BETA */
-TENSOR_DECLARATION(6, gammaBuffer, float, gamma_ptr, gamma_shift, 2, readonly);
-#endif /* USE_DEFAULT_BETA */
-#endif /* USE_DEFAULT_GAMMA */
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
- VectorIterator mean_iter = CONVERT_TO_VECTOR_ITERATOR(mean_attrs, mean_shift);
- VectorIterator var_iter = CONVERT_TO_VECTOR_ITERATOR(var_attrs, var_shift);
-#ifndef USE_DEFAULT_BETA
- VectorIterator beta_iter = CONVERT_TO_VECTOR_ITERATOR(beta_attrs, beta_shift);
-#endif /* USE_DEFAULT_BETA */
-#ifndef USE_DEFAULT_GAMMA
- VectorIterator gamma_iter = CONVERT_TO_VECTOR_ITERATOR(gamma_attrs, gamma_shift);
-#endif /* USE_DEFAULT_GAMMA */
-
- float input_value = 0.f;
- float denominator = 0.f;
- float numerator = 0.f;
- float x_bar = 0.f;
-
- uint current_slice = gl_GlobalInvocationID.z;
-
- input_value = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- denominator = LOAD(var_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(var_iter, current_slice * var_attrs.stride_x));
- denominator = INVSQRT_OP(ADD_OP(denominator, SQCVT_SAT(float(ESPILON))));
-
- // Calculate x bar and store results
- numerator = LOAD(mean_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(mean_iter, current_slice * mean_attrs.stride_x));
- numerator = SUB_OP(input_value, numerator);
- x_bar = MUL_OP(numerator, denominator);
-
-#ifndef USE_DEFAULT_GAMMA
- float gamma_param = LOAD(gamma_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(gamma_iter, current_slice * gamma_attrs.stride_x));
-
- x_bar = MUL_OP(gamma_param, x_bar);
-#endif /* USE_DEFAULT_GAMMA */
-#ifndef USE_DEFAULT_BETA
- float beta_param = LOAD(beta_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(beta_iter, current_slice * beta_attrs.stride_x));
-
- x_bar = ADD_OP(x_bar, beta_param);
-#endif /* USE_DEFAULT_BETA */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, ACTIVATION_FUNC(x_bar));
-}
-
-#elif defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, meanBuffer, uvec2, mean_ptr, mean_shift, 3, readonly);
-TENSOR_DECLARATION(4, varBuffer, uvec2, var_ptr, var_shift, 3, readonly);
-#ifndef USE_DEFAULT_BETA
-TENSOR_DECLARATION(5, betaBuffer, uvec2, beta_ptr, beta_shift, 3, readonly);
-#endif /* USE_DEFAULT_BETA */
-#ifndef USE_DEFAULT_GAMMA
-#ifdef USE_DEFAULT_BETA
-TENSOR_DECLARATION(5, gammaBuffer, uvec2, gamma_ptr, gamma_shift, 3, readonly);
-#else /* USE_DEFAULT_BETA */
-TENSOR_DECLARATION(6, gammaBuffer, uvec2, gamma_ptr, gamma_shift, 3, readonly);
-#endif /* USE_DEFAULT_BETA */
-#endif /* USE_DEFAULT_GAMMA */
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
- VectorIterator mean_iter = CONVERT_TO_VECTOR_ITERATOR(mean_attrs, mean_shift);
- VectorIterator var_iter = CONVERT_TO_VECTOR_ITERATOR(var_attrs, var_shift);
-#ifndef USE_DEFAULT_BETA
- VectorIterator beta_iter = CONVERT_TO_VECTOR_ITERATOR(beta_attrs, beta_shift);
-#endif /* USE_DEFAULT_BETA */
-#ifndef USE_DEFAULT_GAMMA
- VectorIterator gamma_iter = CONVERT_TO_VECTOR_ITERATOR(gamma_attrs, gamma_shift);
-#endif /* USE_DEFAULT_GAMMA */
-
- vec4 unpacked_s[5];
- float denominator;
- float numerator;
- float gamma_param = 1.f;
- float beta_param = 0.f;
- vec4 x_bar;
- vec4 result;
-
- uint current_slice = gl_GlobalInvocationID.z;
- unpacked_s[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- unpacked_s[1] = LOAD_UNPACK4_HALF(var_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(var_iter, current_slice * var_attrs.stride_x));
- unpacked_s[2] = LOAD_UNPACK4_HALF(mean_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(mean_iter, current_slice * mean_attrs.stride_x));
-#ifndef USE_DEFAULT_GAMMA
- unpacked_s[3] = LOAD_UNPACK4_HALF(gamma_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(gamma_iter, current_slice * gamma_attrs.stride_x));
-#endif /* USE_DEFAULT_BETA */
-#ifndef USE_DEFAULT_BETA
- unpacked_s[4] = LOAD_UNPACK4_HALF(beta_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(beta_iter, current_slice * beta_attrs.stride_x));
-#endif /* USE_DEFAULT_GAMMA */
-
- if((current_slice % uint(4)) == uint(0))
- {
- denominator = unpacked_s[1].x;
- denominator = INVSQRT_OP(ADD_OP(denominator, SQCVT_SAT(float(ESPILON))));
-
- // Calculate x bar
- numerator = unpacked_s[2].x;
- x_bar = MUL_OP(SUB_OP(unpacked_s[0], numerator), denominator);
-
-#ifndef USE_DEFAULT_GAMMA
- gamma_param = unpacked_s[3].x;
-#endif /* USE_DEFAULT_GAMMA */
-#ifndef USE_DEFAULT_BETA
- beta_param = unpacked_s[4].x;
-#endif /* USE_DEFAULT_BETA */
- }
- else if((current_slice % uint(4)) == uint(1))
- {
- denominator = unpacked_s[1].y;
- denominator = INVSQRT_OP(ADD_OP(denominator, SQCVT_SAT(float(ESPILON))));
-
- // Calculate x bar
- numerator = unpacked_s[2].y;
- x_bar = MUL_OP(SUB_OP(unpacked_s[0], numerator), denominator);
-
-#ifndef USE_DEFAULT_GAMMA
- gamma_param = unpacked_s[3].y;
-#endif /* USE_DEFAULT_GAMMA */
-#ifndef USE_DEFAULT_BETA
- beta_param = unpacked_s[4].y;
-#endif /* USE_DEFAULT_BETA */
- }
- else if((current_slice % uint(4)) == uint(2))
- {
- denominator = unpacked_s[1].z;
- denominator = INVSQRT_OP(ADD_OP(denominator, SQCVT_SAT(float(ESPILON))));
-
- // Calculate x bar
- numerator = unpacked_s[2].z;
- x_bar = MUL_OP(SUB_OP(unpacked_s[0], numerator), denominator);
-
-#ifndef USE_DEFAULT_GAMMA
- gamma_param = unpacked_s[3].z;
-#endif /* USE_DEFAULT_GAMMA */
-#ifndef USE_DEFAULT_BETA
- beta_param = unpacked_s[4].z;
-#endif /* USE_DEFAULT_BETA */
- }
- else
- {
- denominator = unpacked_s[1].w;
- denominator = INVSQRT_OP(ADD_OP(denominator, SQCVT_SAT(float(ESPILON))));
-
- // Calculate x bar
- numerator = unpacked_s[2].w;
- x_bar = MUL_OP(SUB_OP(unpacked_s[0], numerator), denominator);
-
-#ifndef USE_DEFAULT_GAMMA
- gamma_param = unpacked_s[3].w;
-#endif /* USE_DEFAULT_GAMMA */
-#ifndef USE_DEFAULT_BETA
- beta_param = unpacked_s[4].w;
-#endif /* USE_DEFAULT_BETA */
- }
-
-#ifndef USE_DEFAULT_GAMMA
- x_bar = MUL_OP(gamma_param, x_bar);
-#endif /* USE_DEFAULT_GAMMA */
-#ifndef USE_DEFAULT_BETA
- x_bar = ADD_OP(x_bar, beta_param);
-#endif /* USE_DEFAULT_BETA */
-
- result = ACTIVATION_FUNC(x_bar);
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
-}
-#endif /*DATA_TYPE_FP16*/
diff --git a/src/core/GLES_COMPUTE/cs_shaders/concatenate.cs b/src/core/GLES_COMPUTE/cs_shaders/concatenate.cs
deleted file mode 100644
index d1d1a8632f..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/concatenate.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif /*DATA_TYPE_FP16*/
-
-/** This kernel concatenates the input tensor into the output tensor along the third dimension
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
-};
-
-#ifdef DATA_TYPE_FP32
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp);
-}
-
-#elif defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- uvec2 tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp);
-}
-#endif /*DATA_TYPE_FP16*/
diff --git a/src/core/GLES_COMPUTE/cs_shaders/convolution_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/convolution_layer.cs
deleted file mode 100644
index d40cbbbaf0..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/convolution_layer.cs
+++ /dev/null
@@ -1,791 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-#ifdef RESHAPE_TO_COLUMNS
-
-/** This kernel performs a reshaping of the input tensor to a tensor used to perform convolution using GEMM.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note In case biases will be added to the convolution "#define HAS_BIAS" has to be passed to append the final matrix with 1 in each row.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] biases_ptr Pointer to the biases tensor. Same as @p src_ptr
- * @param[in] biases_attrs The attributes of the biases tensor
- * @param[in] width The width of the input tensor
- * @param[in] height The height of the input tensor
- * @param[in] depth The depth of the input tensor
- * @param[in] total_filters Total number of filters. 4th dimension of the weights matrix
- */
-
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- ImageAttributes dst_attrs;
-#ifdef HAS_BIAS
- VectorAttributes biases_attrs;
-#endif /* HAS_BIAS */
- uint width;
- uint height;
- uint depth;
- uint total_filters;
-};
-
-#if defined(DATA_TYPE_FP32)
-
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-#ifdef HAS_BIAS
-TENSOR_DECLARATION(3, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-#ifdef HAS_BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- bool is_last_thread = (((int(gl_GlobalInvocationID.x)) == (int(gl_NumWorkGroups.x * gl_WorkGroupSize.x) - 1)) && ((int(gl_GlobalInvocationID.y)) == (int(gl_NumWorkGroups.y * gl_WorkGroupSize.y) - 1))
- && ((int(gl_GlobalInvocationID.z)) == (int(gl_NumWorkGroups.z * gl_WorkGroupSize.z) - 1)));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, ((uint(gl_GlobalInvocationID.x) * uint(dst_attrs.stride_y)) + (uint(gl_GlobalInvocationID.y) * uint(width) * uint(dst_attrs.stride_y)) + (uint(
- gl_GlobalInvocationID.z)
- * uint(width) * uint(height) * uint(dst_attrs.stride_y))));
- // Linearize convolution elements
- if(is_last_thread)
- {
- for(uint i = 0u; i < uint(total_filters); ++i)
- {
- float s0 = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, s0);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (depth * src_attrs.stride_z));
-#ifdef HAS_BIAS
- float b = LOAD_CURRENT_ITEM(biases_ptr, biases_iter);
- STORE(dst_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(dst_iter, dst_attrs.stride_y), b);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(biases_iter, biases_attrs.stride_x);
-#endif /* HAS_BIAS */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.stride_x);
- }
- }
- else
- {
- for(uint i = 0u; i < uint(total_filters); ++i)
- {
- float s0 = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, s0);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (depth * src_attrs.stride_z));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.stride_x);
- }
- }
-}
-
-#elif defined(DATA_TYPE_FP16)
-
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-#ifdef HAS_BIAS
-TENSOR_DECLARATION(3, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-#ifdef HAS_BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- bool is_last_thread = (((int(gl_GlobalInvocationID.x)) == (int(gl_NumWorkGroups.x * gl_WorkGroupSize.x) - 1)) && ((int(gl_GlobalInvocationID.y)) == (int(gl_NumWorkGroups.y * gl_WorkGroupSize.y) - 1))
- && ((int(gl_GlobalInvocationID.z)) == (int(gl_NumWorkGroups.z * gl_WorkGroupSize.z) - 1)));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, ((uint(gl_GlobalInvocationID.x) * uint(dst_attrs.stride_y)) + (uint(gl_GlobalInvocationID.y) * uint(width) * uint(dst_attrs.stride_y)) + (uint(
- gl_GlobalInvocationID.z)
- * uint(width) * uint(height) * uint(dst_attrs.stride_y))));
- // Linearize convolution elements
- if(is_last_thread)
- {
- for(uint i = 0u; i < uint(total_filters); i = i + 2u)
- {
- vec2 s0 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- vec2 s;
- if(int(CURRENT_ITEM_OFFSET_IN_BYTES(src_iter) >> 1u) % 2 == 0)
- {
- s.x = s0.x;
- }
- else
- {
- s.x = s0.y;
- }
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (depth * src_attrs.stride_z));
-
- vec2 s1 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- if(int(CURRENT_ITEM_OFFSET_IN_BYTES(src_iter) >> 1u) % 2 == 0)
- {
- s.y = s1.x;
- }
- else
- {
- s.y = s1.y;
- }
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, s);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (depth * src_attrs.stride_z));
-#ifdef HAS_BIAS
- vec2 b = LOAD_UNPACK2_CURRENT_ITEM_HALF(biases_ptr, biases_iter);
- STORE_PACK2_HALF(dst_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(dst_iter, dst_attrs.stride_y), b);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(biases_iter, (2u * biases_attrs.stride_x));
-#endif /* HAS_BIAS */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, (2u * dst_attrs.stride_x));
- }
- }
- else
- {
- for(uint i = 0u; i < uint(total_filters); i = i + 2u)
- {
- vec2 s0 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- vec2 s;
- if(int(CURRENT_ITEM_OFFSET_IN_BYTES(src_iter) >> 1u) % 2 == 0)
- {
- s.x = s0.x;
- }
- else
- {
- s.x = s0.y;
- }
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (depth * src_attrs.stride_z));
-
- vec2 s1 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- if(int(CURRENT_ITEM_OFFSET_IN_BYTES(src_iter) >> 1u) % 2 == 0)
- {
- s.y = s1.x;
- }
- else
- {
- s.y = s1.y;
- }
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, s);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (depth * src_attrs.stride_z));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, (2u * dst_attrs.stride_x));
- }
- }
-}
-
-#endif /* DATA_TYPE_FP32 */
-#endif // RESHAPE_TO_COLUMNS
-
-#ifdef IM2COL_GENERIC
-
-/** This kernel performs a reshaping of the input tensor to a tensor used to perform convolution using GEMM.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_FP32"
- * @note PAD_LEFT/PAD_RIGHT/PAD_TOP/PAD_BOTTOM must be passed for padding info, e.g. "#define PAD_LEFT xxx"
- * @note KERNEL_WIDTH/KERNEL_HEIGHT/KERNEL_DEPTH must be passed for kernel dimension, e.g. "#define KERNEL_WIDTH xxx"
- * @note STRIDE_X/STRIDE_Y must be passed for stride info, e.g. "#define STRIDE_X xxx"
- * @note CONVOLVED_WIDTH/CONVOLVED_HEIGHT must be passed for convolved dimension, e.g. "#define CONVOLVED_WIDTH xxx"
- * @note SRC_WIDTH/SRC_HEIGHT must be passed for input dimension, e.g. "#define SRC_WIDTH xxx"
- * @note DILATION_X/DILATION_Y must be passed for dilation sizes, e.g. "#define DILATION_X xxx"
- * @note In case biases will be added to the convolution "#define HAS_BIAS" has to be passed to append the final matrix with 1 in each row.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] src_stride_w Stride of the source tensor in W dimension (in bytes).
- * @param[in] dst_stride_w Stride of the destination tensor in W dimension (in bytes).
- */
-
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- ImageAttributes dst_attrs;
- uint src_stride_w;
- uint dst_stride_w;
-};
-
-#ifdef DATA_TYPE_FP32
-
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, restrict);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- int xc = int(gl_GlobalInvocationID.x); // x coordinate in the convolved tensor
- int yc = int(gl_GlobalInvocationID.y); // y coordinate in the convolved tensor
- int ch = int(gl_GlobalInvocationID.z) % KERNEL_DEPTH; // input feature map
- int batch = int(gl_GlobalInvocationID.z) / KERNEL_DEPTH; // the batch
-
- // Calculate input indeces
- int xi = xc * STRIDE_X - PAD_LEFT;
- int yi = yc * STRIDE_Y - PAD_TOP;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, (ch * int(src_attrs.stride_z)) + (batch * int(src_stride_w)));
-
- // Calculate output indeces
- int xo = ch * KERNEL_WIDTH * KERNEL_HEIGHT;
- int yo = xc + yc * CONVOLVED_WIDTH; // Index of the convolution
- // sizeof is not available in GLES, so we'll use stride_x
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, (yo * int(dst_attrs.stride_y)) + (batch * int(dst_stride_w)) + xo * int(dst_attrs.stride_x));
-
- uint src_pos = 0u;
-
- // Linearize convolution elements
- for(int y = yi, y_e = yi + KERNEL_HEIGHT * DILATION_Y; y < y_e; y += DILATION_Y)
- {
- for(int x = xi, x_e = xi + KERNEL_WIDTH * DILATION_X; x < x_e; x += DILATION_X, TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, int(dst_attrs.stride_x)))
- {
-#if PAD_LEFT == 0 && PAD_TOP == 0 && PAD_RIGHT == 0 && PAD_BOTTOM == 0
- src_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * int(src_attrs.stride_x) + y * int(src_attrs.stride_y));
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, LOAD(src_ptr, src_pos));
-#else /* PAD_LEFT == 0 && PAD_TOP == 0 && PAD_RIGHT == 0 && PAD_BOTTOM == 0 */
- if(x < 0 || x >= SRC_WIDTH || y < 0 || y >= SRC_HEIGHT)
- {
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, 0.0f);
- }
- else
- {
- src_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * int(src_attrs.stride_x) + y * int(src_attrs.stride_y));
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, LOAD(src_ptr, src_pos));
- }
-#endif /* PAD_LEFT == 0 && PAD_TOP == 0 && PAD_RIGHT == 0 && PAD_BOTTOM == 0 */
- }
- }
-
-#ifdef HAS_BIAS
- if(ch == (KERNEL_DEPTH - 1))
- {
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, 1.0f);
- }
-#endif /* HAS_BIAS */
-}
-
-#elif defined(DATA_TYPE_FP16)
-
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-
-#ifdef KERNEL_1x1
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- uint xc = gl_GlobalInvocationID.x;
- uint yc = gl_GlobalInvocationID.y;
- uint zc = gl_GlobalInvocationID.z;
- uint ch = zc % uint(KERNEL_DEPTH); // input feature map
- uint batch = zc / uint(KERNEL_DEPTH); // the batch
-
- // Calculate input indeces
- uint xi = xc;
- uint yi = yc;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, batch * src_stride_w + ch * src_attrs.step_z);
-
- // Calculate output indeces
- uint dst_element_count = dst_attrs.step_x / dst_attrs.stride_x;
- uint xo = ch * dst_element_count;
- uint yo = xc + yc * uint(CONVOLVED_WIDTH);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, batch * dst_stride_w + yo * dst_attrs.stride_y + xo);
-
- bool x_start_even = ((xc % 2u) == 0u);
- bool z_depth_even = ((uint(KERNEL_DEPTH) % 2u) == 0u);
- uint input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, xi * src_attrs.stride_x + yi * src_attrs.stride_y);
- uint tmp_left = 0u;
- uint tmp_right = 0u;
-
- if(ch % 2u != 0u)
- {
- return;
- }
-
- if(z_depth_even || (!z_depth_even && (int(ch) < (KERNEL_DEPTH - 1))))
- {
- tmp_left = LOAD(src_ptr, input_pos);
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, xi * src_attrs.stride_x + yi * src_attrs.stride_y + src_attrs.stride_z);
- tmp_right = LOAD(src_ptr, input_pos);
- if(x_start_even)
- {
- tmp_right = (tmp_left & 0xffffu) + (tmp_right << 16u);
- }
- else
- {
- tmp_right = (tmp_left >> 16u) + (tmp_right & 0xffff0000u);
- }
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x);
-
-#ifdef HAS_BIAS
- if(ch == (uint(KERNEL_DEPTH) - 2u))
- {
- mediump vec2 bias_vec = vec2(1.f, 0.f);
- uint bias_u = packHalf2x16(bias_vec);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, bias_u);
- }
-#endif /* HAS_BIAS */
- }
- else
- {
- tmp_left = LOAD(src_ptr, input_pos);
- if(x_start_even)
- {
- tmp_right = (tmp_left & 0xffffu);
- }
- else
- {
- tmp_right = (tmp_left >> 16u);
- }
-
-#ifdef HAS_BIAS
- mediump vec2 bias_vec = vec2(0.f, 1.f);
- uint bias_u = packHalf2x16(bias_vec);
- tmp_right += (bias_u & 0xffff0000u);
-#endif /* HAS_BIAS */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- }
-}
-
-#else /* KERNEL_1x1 */
-
-void main(void)
-{
- uint xc = gl_GlobalInvocationID.x;
- uint yc = gl_GlobalInvocationID.y;
- uint zc = gl_GlobalInvocationID.z;
- uint ch = zc % uint(KERNEL_DEPTH); // input feature map
- uint batch = zc / uint(KERNEL_DEPTH); // the batch
-
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- Tensor3DIterator src_iter_b = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- // Calculate input indeces
- uint src_element_count = src_attrs.step_x / src_attrs.stride_x;
- uint xi = (xc * uint(STRIDE_X)) / src_element_count;
- uint yi = yc * uint(STRIDE_Y);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, batch * src_stride_w + ch * src_attrs.stride_z);
-
- // Calculate output indeces
- uint dst_element_count = dst_attrs.step_x / dst_attrs.stride_x;
- uint xo = (ch * uint(KERNEL_WIDTH) * uint(KERNEL_HEIGHT)) * dst_element_count;
- uint yo = xc + yc * uint(CONVOLVED_WIDTH);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, batch * dst_stride_w + yo * dst_attrs.stride_y + xo);
-
- bool x_start_even = ((xc * uint(STRIDE_X)) % 2u == 0u);
- bool z_start_even = ((ch % 2u) == 0u);
- uint input_pos = 0u;
- uint tmp = 0u;
- uint tmp_left = 0u;
- uint tmp_right = 0u;
-
- // Linearize convolution elements
- for(uint y = yi, y_e = yi + uint(KERNEL_HEIGHT); y < y_e; ++y)
- {
- uint xstart = 0u;
- uint xend = 0u;
-
- // even col, even row
- if(x_start_even)
- {
- if(((y - yi + ch) % 2u) == 0u)
- {
- for(uint x = xi, x_e = xi + (uint(KERNEL_WIDTH) / 2u); x < x_e; ++x, TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x))
- {
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * src_attrs.step_x + y * src_attrs.stride_y);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, LOAD(src_ptr, input_pos));
- }
- }
- else
- {
- // 1st pair
- if(!z_start_even && (y == yi))
- {
- // cross 2d feature map
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter_b, (xi + (uint(KERNEL_WIDTH) / 2u)) * src_attrs.step_x + (yi + uint(KERNEL_HEIGHT) - 1u) * src_attrs.stride_y + batch * src_stride_w +
- (ch - 1u) * src_attrs.stride_z);
- }
- else
- {
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter,
- (xi + (uint(KERNEL_WIDTH) / 2u)) * src_attrs.step_x + (y - 1u) * src_attrs.stride_y);
- }
- tmp_right = LOAD(src_ptr, input_pos);
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, xi * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_left = LOAD(src_ptr, input_pos);
- tmp_right = (tmp_right & 0xffffu) + (tmp_left << 16u);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x);
-
- // remaining
- for(uint x = xi + 1u, x_e = xi + (uint(KERNEL_WIDTH) / 2u) + 1u; x < x_e; ++x, TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x))
- {
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (x - 1u) * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_left = LOAD(src_ptr, input_pos);
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_right = LOAD(src_ptr, input_pos);
- tmp_right = (tmp_left >> 16u) + (tmp_right << 16u);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- }
- }
- }
- else
- {
- if((((y - yi) % 2u) == 0u && !z_start_even) || (((y - yi) % 2u) != 0u && z_start_even))
- {
- // 1st pair
- if(y == yi)
- {
- // cross 2d feature map
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter_b, (xi + (uint(KERNEL_WIDTH) / 2u)) * src_attrs.step_x + (yi + uint(KERNEL_HEIGHT) - 1u) * src_attrs.stride_y + batch * src_stride_w +
- (ch - 1u) * src_attrs.stride_z);
- }
- else
- {
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter,
- (xi + (uint(KERNEL_WIDTH) / 2u)) * src_attrs.step_x + (y - 1u) * src_attrs.stride_y);
- }
-
- tmp_right = LOAD(src_ptr, input_pos);
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, xi * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_left = LOAD(src_ptr, input_pos);
- tmp_right = (tmp_right >> 16u) + (tmp_left & 0xffff0000u);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x);
-
- // remaining
- for(uint x = xi + 1u, x_e = xi + (uint(KERNEL_WIDTH) / 2u) + 1u; x < x_e; ++x, TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x))
- {
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * src_attrs.step_x + y * src_attrs.stride_y);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, LOAD(src_ptr, input_pos));
- }
- }
- else if((((y - yi) % 2u) == 0u && z_start_even) || (((y - yi) % 2u) != 0u && !z_start_even))
- {
- // 1st pair
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, xi * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_right = LOAD(src_ptr, input_pos);
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (xi + 1u) * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_left = LOAD(src_ptr, input_pos);
- tmp_right = (tmp_right >> 16u) + (tmp_left << 16u);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x);
-
- // remaining
- for(uint x = xi + 1u, x_e = xi + (uint(KERNEL_WIDTH) / 2u); x < x_e; ++x, TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.step_x))
- {
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_right = LOAD(src_ptr, input_pos);
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (x + 1u) * src_attrs.step_x + y * src_attrs.stride_y);
- tmp_left = LOAD(src_ptr, input_pos);
- tmp_right = (tmp_right >> 16u) + (tmp_left << 16u);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp_right);
- }
- }
- }
- }
-
- // NOTE: must handle last element manually instead of in loops
- // to avoid write conflict across 2d boundary
- if(ch == uint(KERNEL_DEPTH) - 1u)
- {
- uint x = xi + (uint(KERNEL_WIDTH) / 2u);
- uint y = yi + uint(KERNEL_HEIGHT) - 1u;
- input_pos = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, x * src_attrs.step_x + y * src_attrs.stride_y);
- tmp = LOAD(src_ptr, input_pos);
- if(!x_start_even)
- {
- tmp = (tmp >> 16u) + (tmp << 16u);
- }
-
-#ifdef HAS_BIAS
- mediump vec2 bias_vec = vec2(1.f, 1.f);
- uint bias_u = packHalf2x16(bias_vec);
- if(z_start_even)
- {
- tmp = (tmp & 0xffffu) + (bias_u & 0xffff0000u);
- }
- else
- {
- tmp = (bias_u & 0xffffu);
- }
-#endif /* HAS_BIAS */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, tmp);
- }
-}
-
-#endif /* KERNEL_1x1 */
-#else /* DATA_TYPE_FP32 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
-#endif /* IM2COL_GENERIC */
-
-#ifdef IM2COL_REDUCED
-
-/** This kernel reshapes the tensor's low three dimensions to single row for GEMM operation
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_FP16"
- * @note In case biases will be added in late stage, "#define HAS_BIAS" has to be passed to append the final matrix with 1 in each row.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] width The width of the input tensor
- * @param[in] height The height of the input tensor
- */
-
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- VectorAttributes dst_attrs;
- uint width;
- uint height;
-};
-
-#ifdef DATA_TYPE_FP32
-
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, restrict);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- VectorIterator dst_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- uvec3 pos = uvec3(gl_GlobalInvocationID.xyz);
- uvec3 size = uvec3(gl_WorkGroupSize.xyz);
- uint image_size = width * height;
- uint tmp_out_offset = VECTOR_OFFSET(dst_iter, pos.x + pos.y * width + pos.z * image_size);
-
- STORE(dst_ptr, tmp_out_offset, LOAD_CURRENT_ITEM(src_ptr, src_iter));
-
-#ifdef HAS_BIAS
- // If it is the last thread in the 3 dimensional workgroup
- if(pos.x == (size.x - 1) && pos.y == (size.y - 1) && pos.z == (size.z - 1))
- {
- tmp_out_offset += (dst_attrs.stride_x >> uint(2));
- STORE(dst_ptr, tmp_out_offset, 1.f);
- }
-#endif // HAS_BIAS
-}
-
-#elif defined(DATA_TYPE_FP16)
-
-#if defined(IM2COL_REDUCED_8X)
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, restrict);
-#elif defined(IM2COL_REDUCED_4X) /* IM2COL_REDUCED_8X */
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, restrict);
-#else /* IM2COL_REDUCED_8X */
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, restrict);
-#endif /* IM2COL_REDUCED_8X */
-
-#if defined(IM2COL_REDUCED_GENERIC)
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator src_nostep_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- VectorIterator dst_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- uvec3 pos = uvec3(gl_GlobalInvocationID.xyz);
- uvec3 size = uvec3(gl_WorkGroupSize.xyz);
- uint image_size = width * height;
- uint element_count = src_attrs.step_x / src_attrs.stride_x;
- uint tmp_out_offset = VECTOR_OFFSET(dst_iter, pos.x * element_count + pos.y * width + pos.z * image_size);
- uint width_fp16 = (width + uint(1)) >> uint(1);
- uint tmp;
-
- // odd width
- if(width % uint(2) != uint(0))
- {
- // even row
- if((pos.y + pos.z * height) % uint(2) == uint(0))
- {
- // skip last element of each line to avoid write conflict except for last line
- if((pos.x < (width / element_count)) || ((pos.y == gl_NumWorkGroups.y - 1u) && (pos.z == gl_NumWorkGroups.z - 1u)))
- {
- tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE(dst_ptr, tmp_out_offset, tmp);
- }
- }
- else
- {
- // special op
- uint tmp_left = uint(0);
- uint tmp_right = uint(0);
- tmp_right = LOAD_CURRENT_ITEM(src_ptr, src_iter); //right half
- if(pos.x == uint(0))
- {
- tmp_left = LOAD(src_ptr, TENSOR3D_OFFSET(src_nostep_iter, int(width), int(pos.y) - 1, int(pos.z))); //left half
- tmp_right = (tmp_left & uint(0xffff)) + (tmp_right << uint(16));
- }
- else
- {
- tmp_left = LOAD(src_ptr, TENSOR3D_OFFSET(src_nostep_iter, (int(pos.x) - 1) * int(element_count), int(pos.y), int(pos.z)));
- tmp_right = ((tmp_left >> uint(16)) + (tmp_right << uint(16)));
- }
- STORE(dst_ptr, tmp_out_offset, tmp_right);
- }
- }
- else
- {
- tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE(dst_ptr, tmp_out_offset, tmp);
- }
-
-#ifdef HAS_BIAS
- // If it is the last thread in the 3 dimensional workgroup
- if(pos.x == (size.x - 1u) && pos.y == (size.y - 1u) && pos.z == (size.z - 1u))
- {
- tmp_out_offset += (dst_attrs.stride_x >> dst_shift);
-
- // FIXME: need odd/even detection for tmp_out_offset?
- mediump vec2 bias_vec = vec2(1.0f, 1.0f);
- STORE_PACK2_HALF(dst_ptr, tmp_out_offset, bias_vec);
- }
-#endif // HAS_BIAS
-}
-
-#else /* IM2COL_REDUCED_GENERIC */
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- VectorIterator dst_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- uvec3 pos = uvec3(gl_GlobalInvocationID.xyz);
-#if defined(IM2COL_REDUCED_8X)
- uint tmp_out_offset = VECTOR_OFFSET(dst_iter, pos.x * uint(8) + pos.y * width + pos.z * uint(IMAGE_SIZE));
- uvec4 tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE(dst_ptr, tmp_out_offset, tmp);
-#elif defined(IM2COL_REDUCED_4X) /* IM2COL_REDUCED_8X */
- uint tmp_out_offset = VECTOR_OFFSET(dst_iter, pos.x * uint(4) + pos.y * width + pos.z * uint(IMAGE_SIZE));
- uvec2 tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE(dst_ptr, tmp_out_offset, tmp);
-#else /* IM2COL_REDUCED_8X */
- uint tmp_out_offset = VECTOR_OFFSET(dst_iter, pos.x * uint(2) + pos.y * width + pos.z * uint(IMAGE_SIZE));
- uint tmp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- STORE(dst_ptr, tmp_out_offset, tmp);
-#endif /* IM2COL_REDUCED_8X */
-}
-
-#endif /* IM2COL_REDUCED_GENERIC */
-#else /* DATA_TYPE_FP32 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
-#endif /* IM2COL_REDUCED */
-
-#ifdef COL2IM
-#ifdef WIDTH_OUTPUT
-
-/** This kernel performs a reshaping of the output of the convolution layer.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_FP32"
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] dst_depth The length of the destination tensor in Z dimension
- * @param[in] dst_strideZ The actual stride of the destination tensor in Z dimension
- */
-
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- uint dst_depth;
- uint dst_strideZ;
-};
-
-#ifdef DATA_TYPE_FP32
-
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, restrict);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- uvec3 pos = uvec3(gl_GlobalInvocationID.xyz);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, pos.x * src_attrs.step_y + pos.y * uint(WIDTH_OUTPUT) * src_attrs.step_y + (pos.z % dst_depth) * src_attrs.stride_x + (pos.z / dst_depth) * dst_strideZ);
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, LOAD_CURRENT_ITEM(src_ptr, src_iter));
-}
-
-#elif defined(DATA_TYPE_FP16)
-
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, restrict);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- uvec3 pos = uvec3(gl_GlobalInvocationID.xyz);
-
- if((pos.z % dst_depth) % 2u == 0u)
- {
- uint common_offset_in_bytes = pos.x * src_attrs.step_y * 2u + pos.y * uint(WIDTH_OUTPUT) * src_attrs.step_y + (pos.z % dst_depth) * src_attrs.stride_x + (pos.z / dst_depth) * dst_strideZ;
- uint tmp1_in_offset = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, common_offset_in_bytes);
- uint tmp2_in_offset = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, common_offset_in_bytes + src_attrs.step_y);
- vec2 tmp1 = LOAD_UNPACK2_HALF(src_ptr, tmp1_in_offset);
- vec2 tmp2 = LOAD_UNPACK2_HALF(src_ptr, tmp2_in_offset);
- vec2 result = vec2(tmp1.x, tmp2.x);
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
- }
- else
- {
- uint common_offset_in_bytes = pos.x * src_attrs.step_y * 2u + pos.y * uint(WIDTH_OUTPUT) * src_attrs.step_y + (pos.z % dst_depth) * src_attrs.stride_x + (pos.z / dst_depth) * dst_strideZ - 2u;
- uint tmp1_in_offset = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, common_offset_in_bytes);
- uint tmp2_in_offset = TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, common_offset_in_bytes + src_attrs.step_y);
- vec2 tmp1 = LOAD_UNPACK2_HALF(src_ptr, tmp1_in_offset);
- vec2 tmp2 = LOAD_UNPACK2_HALF(src_ptr, tmp2_in_offset);
- vec2 result = vec2(tmp1.y, tmp2.y);
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
- }
-}
-
-#else /* DATA_TYPE_FP32 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
-#endif /* WIDTH_OUTPUT */
-#endif /* COL2IM */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/depthwise_convolution3x3.cs b/src/core/GLES_COMPUTE/cs_shaders/depthwise_convolution3x3.cs
deleted file mode 100644
index 3e7e1fd351..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/depthwise_convolution3x3.cs
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-/** This kernel performs a depthwise convolution.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note This kernel has multiple optimized depthwise convolution options for FP16.
- * The depthwise convolution option must be passed at compile time using "#define PROCESS_nX_nY_nZ" e.g. "#define PROCESS_8X_1Y_1Z"
- * @note The convolution stride x must be passed at compile time using "#define STRIDE_X n" e.g. "#define STRIDE_X 1"
- * @note In case biases will be added to the convolution "#define HAS_BIAS" has to be passed to append the final matrix with 1 in each row.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] weights_ptr Pointer to the weights tensor. Supported data types: same as @p src_ptr
- * @param[in] weights_attrs The attributes of the weights tensor
- * @param[in] biases_ptr Pointer to the biases tensor. Same as @p src_ptr
- * @param[in] biases_attrs The attributes of the weights tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- Tensor3DAttributes weights_attrs;
-#ifdef BIAS
- VectorAttributes biases_attrs;
-#endif /* BIAS */
-};
-
-#if defined(DATA_TYPE_FP16)
-#if defined(PROCESS_4X_3Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uvec2, weights_ptr, weights_shift, 3, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#define LOAD_UNPACK_SWIZZLE(offset) load_unpack_swizzle_stride1(offset)
-
-vec4 convolve1x3(vec4 s[3], vec4 w)
-{
- vec4 r;
-
- r = s[0] * w[0] + s[1] * w[1] + s[2] * w[2];
-
- return r;
-}
-
-vec4[3] load_unpack_swizzle_stride1(uint offset)
-{
- vec4 s[2];
- s = VLOAD2_UNPACK8_HALF(src_ptr, offset);
-
- vec4 r[3];
- r[0] = s[0];
- r[1] = vec4(s[0].yzw, s[1].x);
- r[2] = vec4(s[0].zw, s[1].xy);
-
- return r;
-}
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[3];
- for(int i = 0; i < 3; i++)
- {
- pixels[i] = vec4(0);
- }
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_attrs.stride_z);
-
- src_iter.current_offset_in_bytes -= int((z_index - z_index / uint(DEPTH_MULTIPLIER)) * src_attrs.step_z);
-
- vec4 w[3];
- w[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
- w[1] = LOAD_UNPACK4_HALF(weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- w[2] = LOAD_UNPACK4_HALF(weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec4 s[3];
- vec4 r;
- // first line
- s = LOAD_UNPACK_SWIZZLE(CURRENT_ITEM_OFFSET(src_iter));
-
- r = convolve1x3(s, w[0]);
- pixels[0] += r;
-
- // second line
- s = LOAD_UNPACK_SWIZZLE(TENSOR3D_OFFSET(src_iter, 0, 1, 0));
-
- r = convolve1x3(s, w[1]);
- pixels[0] += r;
- r = convolve1x3(s, w[0]);
- pixels[1] += r;
-
- // third line
- s = LOAD_UNPACK_SWIZZLE(TENSOR3D_OFFSET(src_iter, 0, 2, 0));
-
- r = convolve1x3(s, w[2]);
- pixels[0] += r;
- r = convolve1x3(s, w[1]);
- pixels[1] += r;
- r = convolve1x3(s, w[0]);
- pixels[2] += r;
-
- // forth line
- s = LOAD_UNPACK_SWIZZLE(TENSOR3D_OFFSET(src_iter, 0, 3, 0));
-
- r = convolve1x3(s, w[2]);
- pixels[1] += r;
- r = convolve1x3(s, w[1]);
- pixels[2] += r;
-
- // fifth line
- s = LOAD_UNPACK_SWIZZLE(TENSOR3D_OFFSET(src_iter, 0, 4, 0));
-
- r = convolve1x3(s, w[2]);
- pixels[2] += r;
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- for(int i = 0; i < 3; i++)
- {
- pixels[i] += vec4(b);
- }
-#endif /* BIAS */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
-}
-#elif defined(PROCESS_4X_1Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uvec2, weights_ptr, weights_shift, 3, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 3
-#define LOAD_UNPACK_SWIZZLE(offset) load_unpack_swizzle_stride3(offset)
-#elif STRIDE_X == 2
-#define LOAD_UNPACK_SWIZZLE(offset) load_unpack_swizzle_stride2(offset)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define LOAD_UNPACK_SWIZZLE(offset) load_unpack_swizzle_stride1(offset)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4 convolve1x3(vec4 s[3], vec4 w)
-{
- vec4 r;
-
- r = s[0] * w[0] + s[1] * w[1] + s[2] * w[2];
-
- return r;
-}
-
-vec4[3] load_unpack_swizzle_stride1(uint offset)
-{
- vec4 s[2];
- s = VLOAD2_UNPACK8_HALF(src_ptr, offset);
-
- vec4 r[3];
- r[0] = s[0];
- r[1] = vec4(s[0].yzw, s[1].x);
- r[2] = vec4(s[0].zw, s[1].xy);
-
- return r;
-}
-
-vec4[3] load_unpack_swizzle_stride2(uint offset)
-{
- vec4 s[3];
- s[0] = LOAD_UNPACK4_HALF(src_ptr, offset);
- s[1] = LOAD_UNPACK4_HALF(src_ptr, offset + uint(1));
- s[2] = LOAD_UNPACK4_HALF(src_ptr, offset + uint(2));
-
- vec4 r[3];
- r[0] = vec4(s[0].xz, s[1].xz);
- r[1] = vec4(s[0].yw, s[1].yw);
- r[2] = vec4(s[0].z, s[1].xz, s[2].x);
-
- return r;
-}
-
-vec4[3] load_unpack_swizzle_stride3(uint offset)
-{
- vec4 s[3];
- s[0] = LOAD_UNPACK4_HALF(src_ptr, offset);
- s[1] = LOAD_UNPACK4_HALF(src_ptr, offset + uint(1));
- s[2] = LOAD_UNPACK4_HALF(src_ptr, offset + uint(2));
-
- vec4 r[3];
- r[0] = vec4(s[0].xw, s[1].z, s[2].y);
- r[1] = vec4(s[0].y, s[1].xw, s[2].z);
- r[2] = vec4(s[0].z, s[1].y, s[2].xw);
-
- return r;
-}
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_attrs.stride_z);
-
- src_iter.current_offset_in_bytes -= int((z_index - z_index / uint(DEPTH_MULTIPLIER)) * src_attrs.step_z);
-
- vec4 w[3];
- w[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
- w[1] = LOAD_UNPACK4_HALF(weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- w[2] = LOAD_UNPACK4_HALF(weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec4 s[3];
- vec4 r;
- // first line
- s = LOAD_UNPACK_SWIZZLE(CURRENT_ITEM_OFFSET(src_iter));
-
- r = convolve1x3(s, w[0]);
- pixels += r;
-
- // second line
- s = LOAD_UNPACK_SWIZZLE(TENSOR3D_OFFSET(src_iter, 0, 1, 0));
-
- r = convolve1x3(s, w[1]);
- pixels += r;
-
- // third line
- s = LOAD_UNPACK_SWIZZLE(TENSOR3D_OFFSET(src_iter, 0, 2, 0));
-
- r = convolve1x3(s, w[2]);
- pixels += r;
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels += vec4(b);
-#endif /* BIAS */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels);
-}
-#endif /* PROCESS_4X_3Y_1Z */
-#endif /* DATA_TYPE_FP16 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/direct_convolution1x1.cs b/src/core/GLES_COMPUTE/cs_shaders/direct_convolution1x1.cs
deleted file mode 100644
index c455489468..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/direct_convolution1x1.cs
+++ /dev/null
@@ -1,1057 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#ifdef FUSED_ACTIVATION
-#include "activation_layer_helpers_cs.h"
-#endif /* FUSED_ACTIVATION */
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-/** This kernel performs a direct convolution to convolve the low three dimensions.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note This kernel has multiple optimized direct convolution options for FP16.
- * The direct convolution option must be passed at compile time using "#define PROCESS_nX_nY_nZ" e.g. "#define PROCESS_8X_1Y_1Z"
- * @note The convolution stride x must be passed at compile time using "#define STRIDE_X n" e.g. "#define STRIDE_X 1"
- * @note In case biases will be added to the convolution "#define HAS_BIAS" has to be passed to append the final matrix with 1 in each row.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] weights_ptr Pointer to the weights tensor. Supported data types: same as @p src_ptr
- * @param[in] weights_attrs The attributes of the weights tensor
- * @param[in] biases_ptr Pointer to the biases tensor. Same as @p src_ptr
- * @param[in] biases_attrs The attributes of the weights tensor
- * @param[in] weights_stride_w Stride of the weights tensor in the 4th dimension
- * @param[in] weights_depth The third dimensions of the weights tensors
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- Tensor3DAttributes weights_attrs;
-#ifdef BIAS
- VectorAttributes biases_attrs;
-#endif /* BIAS */
- uint weights_stride_w;
- uint weights_depth;
-};
-
-#if defined(DATA_TYPE_FP32)
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, float, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- float pixels = 0.f;
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- float temp;
- float temp_weight;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- temp = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- temp_weight = LOAD_CURRENT_ITEM(weights_ptr, weights_iter);
- pixels += temp * temp_weight;
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- pixels += LOAD(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels = ACT_OP(pixels);
-#endif /* FUSED_ACTIVATION */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, pixels);
-}
-
-#elif defined(DATA_TYPE_FP16)
-#if defined(PROCESS_4X_1Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w) convolve_stride2(s, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w) convolve_stride1(s, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4 convolve_stride1(ImageIterator src_iter, float w)
-{
- vec4 s;
- s = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
-
- s *= w;
-
- return s;
-}
-
-vec4 convolve_stride2(ImageIterator src_iter, float w)
-{
- vec4 s[2];
- vec4 r;
-
- s[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, 0));
- r = vec4(s[0].xz, s[1].xz);
-
- r *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1 = CONVOLVE(src_iter, w1);
- pixels += r1;
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r2 = CONVOLVE(src_iter, w2);
- pixels += r2;
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r = CONVOLVE(src_iter, w);
- pixels += r;
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels = ACT_OP(pixels);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels);
-}
-#elif defined(PROCESS_4X_2Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w) convolve_stride2(s, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w) convolve_stride1(s, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[2] convolve_stride1(ImageIterator src_iter, float w)
-{
- vec4 s[2];
- s[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, int(STRIDE_Y)));
-
- s[0] *= w;
- s[1] *= w;
-
- return s;
-}
-
-vec4[2] convolve_stride2(ImageIterator src_iter, float w)
-{
- vec4 s1[2];
- vec4 s2[2];
- vec4 r[2];
-
- s1[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s1[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, 0));
- r[0] = vec4(s1[0].xz, s1[1].xz);
-
- s2[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, int(STRIDE_Y)));
- s2[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, int(STRIDE_Y)));
- r[1] = vec4(s2[0].xz, s2[1].xz);
-
- r[0] *= w;
- r[1] *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[2];
- pixels[0] = vec4(0.f);
- pixels[1] = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1[2] = CONVOLVE(src_iter, w1);
- pixels[0] += r1[0];
- pixels[1] += r1[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r2[2] = CONVOLVE(src_iter, w2);
- pixels[0] += r2[0];
- pixels[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r[2] = CONVOLVE(src_iter, w);
- pixels[0] += r[0];
- pixels[1] += r[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels[0] += b;
- pixels[1] += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
-}
-#elif defined(PROCESS_4X_3Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w) convolve_stride2(s, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w) convolve_stride1(s, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[3] convolve_stride1(ImageIterator src_iter, float w)
-{
- vec4 s[3];
- s[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, int(STRIDE_Y)));
- s[2] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, (2 * int(STRIDE_Y))));
-
- s[0] *= w;
- s[1] *= w;
- s[2] *= w;
-
- return s;
-}
-
-vec4[3] convolve_stride2(ImageIterator src_iter, float w)
-{
- vec4 s1[2];
- vec4 s2[2];
- vec4 s3[2];
- vec4 r[3];
-
- s1[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s1[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, 0));
- r[0] = vec4(s1[0].xz, s1[1].xz);
-
- s2[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, int(STRIDE_Y)));
- s2[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, int(STRIDE_Y)));
- r[1] = vec4(s2[0].xz, s2[1].xz);
-
- s3[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, (2 * int(STRIDE_Y))));
- s3[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, (2 * int(STRIDE_Y))));
- r[2] = vec4(s3[0].xz, s3[1].xz);
-
- r[0] *= w;
- r[1] *= w;
- r[2] *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[3];
- pixels[0] = vec4(0.f);
- pixels[1] = vec4(0.f);
- pixels[2] = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1[3] = CONVOLVE(src_iter, w1);
- pixels[0] += r1[0];
- pixels[1] += r1[1];
- pixels[2] += r1[2];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r2[3] = CONVOLVE(src_iter, w2);
- pixels[0] += r2[0];
- pixels[1] += r2[1];
- pixels[2] += r2[2];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r[3] = CONVOLVE(src_iter, w);
- pixels[0] += r[0];
- pixels[1] += r[1];
- pixels[2] += r[2];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels[0] += b;
- pixels[1] += b;
- pixels[2] += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels[2] = ACT_OP(pixels[2]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
-}
-#elif defined(PROCESS_4X_4Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w, x1, y1) convolve_stride2(s, w, x1, y1)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w, x1, y1) convolve_stride1(s, w, x1, y1)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[2] convolve_stride1(ImageIterator src_iter, float w, int x1, int y1)
-{
- vec4 s[2];
- s[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, x1, y1));
- s[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, x1, (y1 + int(STRIDE_Y))));
-
- s[0] *= w;
- s[1] *= w;
-
- return s;
-}
-
-vec4[2] convolve_stride2(ImageIterator src_iter, float w, int x1, int y1)
-{
- vec4 s1[2];
- vec4 s2[2];
- vec4 r[2];
-
- s1[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, x1, y1));
- s1[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, (4 + x1), y1));
- r[0] = vec4(s1[0].xz, s1[1].xz);
-
- s2[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, x1, (y1 + int(STRIDE_Y))));
- s2[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, (4 + x1), (y1 + int(STRIDE_Y))));
- r[1] = vec4(s2[0].xz, s2[1].xz);
-
- r[0] *= w;
- r[1] *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[2];
- vec4 pixels1[2];
- pixels[0] = vec4(0.f);
- pixels[1] = vec4(0.f);
- pixels1[0] = vec4(0.f);
- pixels1[1] = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1[2] = CONVOLVE(src_iter, w1, 0, 0);
- vec4 r2[2] = CONVOLVE(src_iter, w1, 0, (2 * int(STRIDE_Y)));
- pixels[0] += r1[0];
- pixels[1] += r1[1];
- pixels1[0] += r2[0];
- pixels1[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r3[2] = CONVOLVE(src_iter, w2, 0, 0);
- vec4 r4[2] = CONVOLVE(src_iter, w2, 0, (2 * int(STRIDE_Y)));
- pixels[0] += r3[0];
- pixels[1] += r3[1];
- pixels1[0] += r4[0];
- pixels1[1] += r4[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r1[2] = CONVOLVE(src_iter, w, 0, 0);
- vec4 r2[2] = CONVOLVE(src_iter, w, 0, (2 * int(STRIDE_Y)));
- pixels[0] += r1[0];
- pixels[1] += r1[1];
- pixels1[0] += r2[0];
- pixels1[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels[0] += b;
- pixels[1] += b;
- pixels1[0] += b;
- pixels1[1] += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels1[0] = ACT_OP(pixels1[0]);
- pixels1[1] = ACT_OP(pixels1[1]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels1[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 3, 0), pixels1[1]);
-}
-#elif defined(PROCESS_4X_2Y_2Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w) convolve_stride2(s, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w) convolve_stride1(s, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[2] convolve_stride1(ImageIterator src_iter, float w)
-{
- vec4 s[2];
- s[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, int(STRIDE_Y)));
-
- s[0] *= w;
- s[1] *= w;
-
- return s;
-}
-
-vec4[2] convolve_stride2(ImageIterator src_iter, float w)
-{
- vec4 s1[2];
- vec4 s2[2];
- vec4 r[2];
-
- s1[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- s1[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, 0));
- r[0] = vec4(s1[0].xz, s1[1].xz);
-
- s2[0] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, int(STRIDE_Y)));
- s2[1] = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 4, int(STRIDE_Y)));
- r[1] = vec4(s2[0].xz, s2[1].xz);
-
- r[0] *= w;
- r[1] *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- uint z_base_index = uint(gl_GlobalInvocationID.z) << uint(1);
-
- // store orginal src current offset
- int s_offset_in_bytes = src_iter.current_offset_in_bytes;
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_base_index * weights_stride_w);
-
- for(int z = 0; z < 2; ++z)
- {
- uint z_index = z_base_index + uint(z);
-
- src_iter.current_offset_in_bytes = s_offset_in_bytes;
-
- vec4 pixels[2];
- pixels[0] = vec4(0.f);
- pixels[1] = vec4(0.f);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1[2] = CONVOLVE(src_iter, w1);
- pixels[0] += r1[0];
- pixels[1] += r1[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r2[2] = CONVOLVE(src_iter, w2);
- pixels[0] += r2[0];
- pixels[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r[2] = CONVOLVE(src_iter, w);
- pixels[0] += r[0];
- pixels[1] += r[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels[0] += b;
- pixels[1] += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_attrs.stride_z);
- }
-}
-#elif defined(PROCESS_8X_1Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w) convolve_stride2(s, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w) convolve_stride1(s, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[2] convolve_stride1(ImageIterator src_iter, float w)
-{
- vec4 s[2];
- s = LOAD_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
-
- s[0] *= w;
- s[1] *= w;
-
- return s;
-}
-
-vec4[2] convolve_stride2(ImageIterator src_iter, float w)
-{
- vec4 s1[2];
- vec4 s2[2];
- vec4 r[2];
-
- s1 = LOAD_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
- r[0] = vec4(s1[0].xz, s1[1].xz);
- s2 = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 8, 0));
- r[1] = vec4(s2[0].xz, s2[1].xz);
-
- r[0] *= w;
- r[1] *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[2];
- pixels[0] = vec4(0.f);
- pixels[1] = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1[2] = CONVOLVE(src_iter, w1);
- pixels[0] += r1[0];
- pixels[1] += r1[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r2[2] = CONVOLVE(src_iter, w2);
- pixels[0] += r2[0];
- pixels[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r[2] = CONVOLVE(src_iter, w);
- pixels[0] += r[0];
- pixels[1] += r[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels[0] += b;
- pixels[1] += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels);
-}
-#elif defined(PROCESS_8X_2Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE(s, w, x1, y1) convolve_stride2(s, w, x1, y1)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE(s, w, x1, y1) convolve_stride1(s, w, x1, y1)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[2] convolve_stride1(ImageIterator src_iter, float w, int x1, int y1)
-{
- vec4 s[2];
- s = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, x1, y1));
-
- s[0] *= w;
- s[1] *= w;
-
- return s;
-}
-
-vec4[2] convolve_stride2(ImageIterator src_iter, float w, int x1, int y1)
-{
- vec4 s1[2];
- vec4 s2[2];
- vec4 r[2];
-
- s1 = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, x1, y1));
- r[0] = vec4(s1[0].xz, s1[1].xz);
- s2 = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, (8 + x1), y1));
- r[1] = vec4(s2[0].xz, s2[1].xz);
-
- r[0] *= w;
- r[1] *= w;
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[2];
- vec4 pixels1[2];
- pixels[0] = vec4(0.f);
- pixels[1] = vec4(0.f);
- pixels1[0] = vec4(0.f);
- pixels1[1] = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
-#ifdef WEIGHTS_OPTIMIZATION
- float w1, w2;
- int nums = (int(weights_depth)) / 2;
- for(int d = 0; d < nums; ++d)
- {
- vec2 vec2_w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter);
-
- w1 = vec2_w.x;
- vec4 r1[2] = CONVOLVE(src_iter, w1, 0, 0);
- vec4 r2[2] = CONVOLVE(src_iter, w1, 0, (int(STRIDE_Y)));
- pixels[0] += r1[0];
- pixels[1] += r1[1];
- pixels1[0] += r2[0];
- pixels1[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
-
- w2 = vec2_w.y;
- vec4 r3[2] = CONVOLVE(src_iter, w2, 0, 0);
- vec4 r4[2] = CONVOLVE(src_iter, w2, 0, (int(STRIDE_Y)));
- pixels[0] += r3[0];
- pixels[1] += r3[1];
- pixels1[0] += r4[0];
- pixels1[1] += r4[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z * uint(2));
- }
-#else /* WEIGHTS_OPTIMIZATION */
- float w;
- for(int d = 0; d < int(weights_depth); ++d)
- {
- w = LOAD_UNPACK2_CURRENT_ITEM_HALF(weights_ptr, weights_iter).x;
-
- vec4 r1[2] = CONVOLVE(src_iter, w, 0, 0);
- vec4 r2[2] = CONVOLVE(src_iter, w, 0, (int(STRIDE_Y)));
- pixels[0] += r1[0];
- pixels[1] += r1[1];
- pixels1[0] += r2[0];
- pixels1[1] += r2[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-#endif /* WEIGHTS_OPTIMIZATION */
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels[0] += b;
- pixels[1] += b;
- pixels1[0] += b;
- pixels1[1] += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels1[0] = ACT_OP(pixels1[0]);
- pixels1[1] = ACT_OP(pixels1[1]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels);
- STORE_PACK8_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels1);
-}
-#endif /* PROCESS_4X_1Y_1Z */
-#else /* DATA_TYPE_FP32 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/direct_convolution3x3.cs b/src/core/GLES_COMPUTE/cs_shaders/direct_convolution3x3.cs
deleted file mode 100644
index c9a2121a88..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/direct_convolution3x3.cs
+++ /dev/null
@@ -1,1155 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#ifdef FUSED_ACTIVATION
-#include "activation_layer_helpers_cs.h"
-#endif /* FUSED_ACTIVATION */
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-/** This kernel performs a direct convolution to convolve the low three dimensions.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note This kernel has multiple optimized direct convolution options for FP16.
- * The direct convolution option must be passed at compile time using "#define PROCESS_nX_nY_nZ" e.g. "#define PROCESS_8X_1Y_1Z"
- * @note The convolution stride x must be passed at compile time using "#define STRIDE_X n" e.g. "#define STRIDE_X 1"
- * This OpenGL ES shader works with stride_x = 1 and 2
- * @note In case biases will be added to the convolution "#define HAS_BIAS" has to be passed to append the final matrix with 1 in each row.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] weights_ptr Pointer to the weights tensor. Supported data types: same as @p src_ptr
- * @param[in] weights_attrs The attributes of the weights tensor
- * @param[in] biases_ptr Pointer to the biases tensor. Same as @p src_ptr
- * @param[in] biases_attrs The attributes of the weights tensor
- * @param[in] weights_stride_w Stride of the weights tensor in the 4th dimension
- * @param[in] weights_depth The third dimensions of the weights tensors
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- Tensor3DAttributes weights_attrs;
-#ifdef BIAS
- VectorAttributes biases_attrs;
-#endif /* BIAS */
- uint weights_stride_w;
- uint weights_depth;
-};
-
-#if defined(DATA_TYPE_FP32)
-#if defined(PROCESS_1X_1Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, float, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- float pixels = 0.f;
-
- uint z_index = gl_GlobalInvocationID.z;
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- vec3 temp;
- vec3 w;
-
- temp = VLOAD3(vec3, src_ptr, IMAGE_OFFSET(src_iter, 0, 0));
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
-
- pixels += temp.x * w[0] + temp.y * w[1] + temp.z * w[2];
-
- temp = VLOAD3(vec3, src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
-
- pixels += temp.x * w[0] + temp.y * w[1] + temp.z * w[2];
-
- temp = VLOAD3(vec3, src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- pixels += temp.x * w[0] + temp.y * w[1] + temp.z * w[2];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- pixels += LOAD(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels = ACT_OP(pixels);
-#endif /* FUSED_ACTIVATION */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, pixels);
-}
-
-#elif defined(PROCESS_8X_1Y_1Z)
-
-TENSOR_DECLARATION(1, srcBuffer, vec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, vec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, float, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE1x3(offset, w) convolve1x3_stride2(offset, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE1x3(offset, w) convolve1x3_stride1(offset, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4[2] convolve1x3_stride1(uint offset, vec3 w)
-{
- vec4 middle;
- vec4 right;
- vec4 tmp[3];
- vec4 r[2];
-
- tmp = VLOAD3(vec4[3], src_ptr, offset);
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- r[0] = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- middle = vec4(tmp[1].yzw, tmp[2].x);
- right = vec4(tmp[1].zw, tmp[2].xy);
-
- r[1] = tmp[1] * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-vec4[2] convolve1x3_stride2(uint offset, vec3 w)
-{
- vec4 left;
- vec4 middle;
- vec4 right;
- vec4 tmp1[3];
- vec4 tmp2[2];
- vec4 r[2];
-
- tmp1 = VLOAD3(vec4[3], src_ptr, offset);
-
- left = vec4(tmp1[0].xz, tmp1[1].xz);
- middle = vec4(tmp1[0].yw, tmp1[1].yw);
- right = vec4(tmp1[0].z, tmp1[1].xz, tmp1[2].x);
-
- r[0] = left * w[0] + middle * w[1] + right * w[2];
-
- tmp2 = VLOAD2(vec4[2], src_ptr, offset + uint(3));
-
- left = vec4(tmp1[2].xz, tmp2[0].xz);
- middle = vec4(tmp1[2].yw, tmp2[0].yw);
- right = vec4(tmp1[2].z, tmp2[0].xz, tmp2[1].x);
-
- r[1] = left * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[2];
- pixels[0] = vec4(0);
- pixels[1] = vec4(0);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- vec3 w;
- vec4 r[2];
-
- // first line
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
-
- r = CONVOLVE1x3(CURRENT_ITEM_OFFSET(src_iter), w);
- pixels[0] += r[0];
- pixels[1] += r[1];
-
- // second line
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
-
- r = CONVOLVE1x3(IMAGE_OFFSET(src_iter, 0, 1), w);
- pixels[0] += r[0];
- pixels[1] += r[1];
-
- // third line
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- r = CONVOLVE1x3(IMAGE_OFFSET(src_iter, 0, 2), w);
- pixels[0] += r[0];
- pixels[1] += r[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- float b = LOAD(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
- pixels[0] += vec4(b);
- pixels[1] += vec4(b);
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
-#endif /* FUSED_ACTIVATION */
-
- VSTORE2_CURRENT_ITEM(dst_ptr, dst_iter, pixels);
-}
-
-#elif defined(PROCESS_4X_1Y_1Z)
-
-TENSOR_DECLARATION(1, srcBuffer, vec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, vec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, float, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE1x3(offset, w) convolve1x3_stride2(offset, w)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE1x3(offset, w) convolve1x3_stride1(offset, w)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4 convolve1x3_stride1(uint offset, vec3 w)
-{
- vec4 tmp[2];
- vec4 middle;
- vec4 right;
-
- tmp = VLOAD2(vec4[2], src_ptr, offset);
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- tmp[1] = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- return tmp[1];
-}
-
-vec4 convolve1x3_stride2(uint offset, vec3 w)
-{
- vec4 left;
- vec4 middle;
- vec4 right;
-
- vec4 tmp[3];
-
- tmp = VLOAD3(vec4[3], src_ptr, offset);
-
- left = vec4(tmp[0].xz, tmp[1].xz);
- middle = vec4(tmp[0].yw, tmp[1].yw);
- right = vec4(tmp[0].z, tmp[1].xz, tmp[2].x);
-
- tmp[0] = left * w[0] + middle * w[1] + right * w[2];
-
- return tmp[0];
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels;
- pixels = vec4(0.f);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- vec3 w;
-
- // first line
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
- pixels += CONVOLVE1x3(CURRENT_ITEM_OFFSET(src_iter), w);
-
- // second line
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- pixels += CONVOLVE1x3(IMAGE_OFFSET(src_iter, 0, 1), w);
-
- // third line
- w = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
- pixels += CONVOLVE1x3(IMAGE_OFFSET(src_iter, 0, 2), w);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- float b = LOAD(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
- pixels += b;
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels = ACT_OP(pixels);
-#endif /* FUSED_ACTIVATION */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, pixels);
-}
-
-#elif defined(PROCESS_4X_3Y_1Z)
-
-TENSOR_DECLARATION(1, srcBuffer, vec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, vec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, float, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#define CONVOLVE1x3(left, middle, right, w) convolve1x3_stride1(left, middle, right, w)
-
-vec4 convolve1x3_stride1(vec4 left, vec4 middle, vec4 right, vec3 w)
-{
- vec4 r;
-
- r = left * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[3];
- pixels[0] = vec4(0);
- pixels[1] = vec4(0);
- pixels[2] = vec4(0);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- vec3 w[3];
-
- w[0] = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
- w[1] = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- w[2] = VLOAD3(vec3, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec4 s[2];
- vec4 middle;
- vec4 right;
- // first line
- s = VLOAD2_CURRENT_ITEM(vec4[2], src_ptr, src_iter);
- middle = vec4(s[0].yzw, s[1].x);
- right = vec4(s[0].zw, s[1].xy);
- pixels[0] += CONVOLVE1x3(s[0], middle, right, w[0]);
-
- // second line
- s = VLOAD2(vec4[2], src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- middle = vec4(s[0].yzw, s[1].x);
- right = vec4(s[0].zw, s[1].xy);
- pixels[0] += CONVOLVE1x3(s[0], middle, right, w[1]);
- pixels[1] += CONVOLVE1x3(s[0], middle, right, w[0]);
-
- // third line
- s = VLOAD2(vec4[2], src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- middle = vec4(s[0].yzw, s[1].x);
- right = vec4(s[0].zw, s[1].xy);
- pixels[0] += CONVOLVE1x3(s[0], middle, right, w[2]);
- pixels[1] += CONVOLVE1x3(s[0], middle, right, w[1]);
- pixels[2] += CONVOLVE1x3(s[0], middle, right, w[0]);
-
- // forth line
- s = VLOAD2(vec4[2], src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
- middle = vec4(s[0].yzw, s[1].x);
- right = vec4(s[0].zw, s[1].xy);
- pixels[1] += CONVOLVE1x3(s[0], middle, right, w[2]);
- pixels[2] += CONVOLVE1x3(s[0], middle, right, w[1]);
-
- // fifth line
- s = VLOAD2(vec4[2], src_ptr, IMAGE_OFFSET(src_iter, 0, 4));
- middle = vec4(s[0].yzw, s[1].x);
- right = vec4(s[0].zw, s[1].xy);
- pixels[2] += CONVOLVE1x3(s[0], middle, right, w[2]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- float b = LOAD(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- pixels[0] += vec4(b);
- pixels[1] += vec4(b);
- pixels[2] += vec4(b);
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels[2] = ACT_OP(pixels[2]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, pixels[0]);
- STORE(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
-}
-
-#endif // PROCESS_nX_nY
-
-#elif defined(DATA_TYPE_FP16)
-
-#if defined(PROCESS_8X_3Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#define CONVOLVE1x3(s, w) convolve1x3_stride1(s, w)
-
-vec4[2] convolve1x3_stride1(vec4 tmp[3], vec3 w)
-{
- vec4 middle;
- vec4 right;
- vec4 r[2];
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- r[0] = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- middle = vec4(tmp[1].yzw, tmp[2].x);
- right = vec4(tmp[1].zw, tmp[2].xy);
-
- r[1] = tmp[1] * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-vec4[3] vload2_src_unpack12_half(uint offset)
-{
- uvec4 packed_s[2];
- vec4 s[3];
-
- packed_s = VLOAD2(uvec4[2], src_ptr, offset);
-
- s[0] = vec4(unpackHalf2x16(packed_s[0].x), unpackHalf2x16(packed_s[0].y));
- s[1] = vec4(unpackHalf2x16(packed_s[0].z), unpackHalf2x16(packed_s[0].w));
- s[2] = vec4(unpackHalf2x16(packed_s[1].x), unpackHalf2x16(packed_s[1].y));
-
- return s;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[3][2];
- int i, j;
- for(i = 0; i < 3; i++)
- {
- for(j = 0; j < 2; j++)
- {
- pixels[i][j] = vec4(0);
- }
- }
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- uvec2 packed_w[3];
-
- packed_w[0] = VLOAD2_CURRENT_ITEM(uvec2, weights_ptr, weights_iter);
- packed_w[1] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- packed_w[2] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec3 w[3];
- w[0] = vec3(unpackHalf2x16(packed_w[0].x), unpackHalf2x16(packed_w[0].y).x);
- w[1] = vec3(unpackHalf2x16(packed_w[1].x), unpackHalf2x16(packed_w[1].y).x);
- w[2] = vec3(unpackHalf2x16(packed_w[2].x), unpackHalf2x16(packed_w[2].y).x);
-
- uvec4 packed_s[2];
- vec4 s[3];
- vec4 r[2];
-
- // first line
- s = vload2_src_unpack12_half(CURRENT_ITEM_OFFSET(src_iter));
-
- r = CONVOLVE1x3(s, w[0]);
- pixels[0][0] += r[0];
- pixels[0][1] += r[1];
-
- // second line
- s = vload2_src_unpack12_half(IMAGE_OFFSET(src_iter, 0, 1));
-
- r = CONVOLVE1x3(s, w[1]);
- pixels[0][0] += r[0];
- pixels[0][1] += r[1];
- r = CONVOLVE1x3(s, w[0]);
- pixels[1][0] += r[0];
- pixels[1][1] += r[1];
-
- // third line
- s = vload2_src_unpack12_half(IMAGE_OFFSET(src_iter, 0, 2));
-
- r = CONVOLVE1x3(s, w[2]);
- pixels[0][0] += r[0];
- pixels[0][1] += r[1];
- r = CONVOLVE1x3(s, w[1]);
- pixels[1][0] += r[0];
- pixels[1][1] += r[1];
- r = CONVOLVE1x3(s, w[0]);
- pixels[2][0] += r[0];
- pixels[2][1] += r[1];
-
- // forth line
- s = vload2_src_unpack12_half(IMAGE_OFFSET(src_iter, 0, 3));
-
- r = CONVOLVE1x3(s, w[2]);
- pixels[1][0] += r[0];
- pixels[1][1] += r[1];
- r = CONVOLVE1x3(s, w[1]);
- pixels[2][0] += r[0];
- pixels[2][1] += r[1];
-
- // fifth line
- s = vload2_src_unpack12_half(IMAGE_OFFSET(src_iter, 0, 4));
-
- r = CONVOLVE1x3(s, w[2]);
- pixels[2][0] += r[0];
- pixels[2][1] += r[1];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- for(i = 0; i < 3; i++)
- {
- for(j = 0; j < 2; j++)
- {
- pixels[i][j] += vec4(b);
- }
- }
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels[2] = ACT_OP(pixels[2]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK8_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK8_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
-}
-
-#elif defined(PROCESS_4X_1Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#if STRIDE_X == 2
-#define CONVOLVE1x3(s, w) convolve1x3_stride2(s, w)
-#define LOAD_AND_UNPACK(offset) VLOAD3_UNPACK12_HALF(src_ptr, offset)
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
-#define CONVOLVE1x3(s, w) convolve1x3_stride1(s, w)
-#define LOAD_AND_UNPACK(offset) VLOAD2_UNPACK8_HALF(src_ptr, offset)
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
-
-vec4 convolve1x3_stride1(vec4 tmp[2], vec3 w)
-{
- vec4 middle;
- vec4 right;
- vec4 r;
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- r = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-vec4 convolve1x3_stride2(vec4 tmp[3], vec3 w)
-{
- vec4 left;
- vec4 middle;
- vec4 right;
- vec4 r;
-
- left = vec4(tmp[0].xz, tmp[1].xz);
- middle = vec4(tmp[0].yw, tmp[1].yw);
- right = vec4(tmp[0].z, tmp[1].xz, tmp[2].x);
-
- r = left * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- uvec2 packed_d;
-
- vec4 pixels = vec4(0);
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- uvec2 packed_w[3];
-
- packed_w[0] = VLOAD2_CURRENT_ITEM(uvec2, weights_ptr, weights_iter);
- packed_w[1] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- packed_w[2] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec3 w[3];
- w[0] = vec3(unpackHalf2x16(packed_w[0].x), unpackHalf2x16(packed_w[0].y).x);
- w[1] = vec3(unpackHalf2x16(packed_w[1].x), unpackHalf2x16(packed_w[1].y).x);
- w[2] = vec3(unpackHalf2x16(packed_w[2].x), unpackHalf2x16(packed_w[2].y).x);
-
-#if STRIDE_X == 2
- vec4 s[3];
-#elif STRIDE_X == 1 /* STRIDE_X == 1 */
- vec4 s[2];
-#else /* STRIDE_X not equals 1 or 2 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 2 */
- vec4 r;
-
- // first line
- s = LOAD_AND_UNPACK(CURRENT_ITEM_OFFSET(src_iter));
- pixels += CONVOLVE1x3(s, w[0]);
-
- // second line
- s = LOAD_AND_UNPACK(IMAGE_OFFSET(src_iter, 0, 1));
- pixels += CONVOLVE1x3(s, w[1]);
-
- // third line
- s = LOAD_AND_UNPACK(IMAGE_OFFSET(src_iter, 0, 2));
- pixels += CONVOLVE1x3(s, w[2]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- pixels += vec4(b);
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels = ACT_OP(pixels);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels);
-}
-
-#elif defined(PROCESS_4X_3Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#define CONVOLVE1x3(s, w) convolve1x3_stride1(s, w)
-
-vec4 convolve1x3_stride1(vec4 tmp[2], vec3 w)
-{
- vec4 middle;
- vec4 right;
- vec4 r;
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- r = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[3];
- int i;
-
- for(i = 0; i < 3; i++)
- {
- pixels[i] = vec4(0);
- }
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- uvec2 packed_w[3];
-
- packed_w[0] = VLOAD2_CURRENT_ITEM(uvec2, weights_ptr, weights_iter);
- packed_w[1] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- packed_w[2] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec3 w[3];
- w[0] = vec3(unpackHalf2x16(packed_w[0].x), unpackHalf2x16(packed_w[0].y).x);
- w[1] = vec3(unpackHalf2x16(packed_w[1].x), unpackHalf2x16(packed_w[1].y).x);
- w[2] = vec3(unpackHalf2x16(packed_w[2].x), unpackHalf2x16(packed_w[2].y).x);
-
- vec4 s[2];
- vec4 r;
-
- // first line
- s = VLOAD2_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
- pixels[0] += CONVOLVE1x3(s, w[0]);
-
- // second line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- pixels[0] += CONVOLVE1x3(s, w[1]);
- pixels[1] += CONVOLVE1x3(s, w[0]);
-
- // third line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- pixels[0] += CONVOLVE1x3(s, w[2]);
- pixels[1] += CONVOLVE1x3(s, w[1]);
- pixels[2] += CONVOLVE1x3(s, w[0]);
-
- // forth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
- pixels[1] += CONVOLVE1x3(s, w[2]);
- pixels[2] += CONVOLVE1x3(s, w[1]);
-
- // fifth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 4));
- pixels[2] += CONVOLVE1x3(s, w[2]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- for(i = 0; i < 3; i++)
- {
- pixels[i] += vec4(b);
- }
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels[2] = ACT_OP(pixels[2]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
-}
-
-#elif defined(PROCESS_4X_4Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#define CONVOLVE1x3(s, w) convolve1x3_stride1(s, w)
-
-vec4 convolve1x3_stride1(vec4 tmp[2], vec3 w)
-{
- vec4 middle;
- vec4 right;
- vec4 r;
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- r = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[4];
- int i;
-
- for(i = 0; i < 4; i++)
- {
- pixels[i] = vec4(0);
- }
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- uvec2 packed_w[3];
-
- packed_w[0] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
- packed_w[1] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- packed_w[2] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec3 w[3];
- w[0] = vec3(unpackHalf2x16(packed_w[0].x), unpackHalf2x16(packed_w[0].y).x);
- w[1] = vec3(unpackHalf2x16(packed_w[1].x), unpackHalf2x16(packed_w[1].y).x);
- w[2] = vec3(unpackHalf2x16(packed_w[2].x), unpackHalf2x16(packed_w[2].y).x);
-
- vec4 s[2];
- vec4 r;
-
- // first line
- s = VLOAD2_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
- pixels[0] += CONVOLVE1x3(s, w[0]);
-
- // second line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- pixels[0] += CONVOLVE1x3(s, w[1]);
- pixels[1] += CONVOLVE1x3(s, w[0]);
-
- // third line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- pixels[0] += CONVOLVE1x3(s, w[2]);
- pixels[1] += CONVOLVE1x3(s, w[1]);
- pixels[2] += CONVOLVE1x3(s, w[0]);
-
- // forth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
- pixels[1] += CONVOLVE1x3(s, w[2]);
- pixels[2] += CONVOLVE1x3(s, w[1]);
- pixels[3] += CONVOLVE1x3(s, w[0]);
-
- // fifth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 4));
- pixels[2] += CONVOLVE1x3(s, w[2]);
- pixels[3] += CONVOLVE1x3(s, w[1]);
-
- // sixth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 5));
- pixels[3] += CONVOLVE1x3(s, w[2]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- for(i = 0; i < 4; i++)
- {
- pixels[i] += vec4(b);
- }
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels[2] = ACT_OP(pixels[2]);
- pixels[3] = ACT_OP(pixels[3]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 3, 0), pixels[3]);
-}
-#elif defined(PROCESS_4X_3Y_2Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-#define CONVOLVE1x3(s, w) convolve1x3_stride1(s, w)
-
-vec4 convolve1x3_stride1(vec4 tmp[2], vec3 w)
-{
- vec4 middle;
- vec4 right;
- vec4 r;
-
- middle = vec4(tmp[0].yzw, tmp[1].x);
- right = vec4(tmp[0].zw, tmp[1].xy);
-
- r = tmp[0] * w[0] + middle * w[1] + right * w[2];
-
- return r;
-}
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 pixels[3];
- int i;
-
- uint z_base_index = gl_GlobalInvocationID.z << 1;
-
- // store orginal src current offset
- uint s_offset_in_bytes = CURRENT_ITEM_OFFSET_IN_BYTES(srcc_iter);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_base_index * weights_stride_w);
-
- for(int z = 0; z < 2; ++z)
- {
- uint z_index = z_base_index + uint(z);
-
- SET_TENSOR_ITERATOR_OFFSET_IN_BYTES(src_iter, s_offset_in_bytes);
-
- for(i = 0; i < 3; i++)
- {
- pixels[i] = vec4(0);
- }
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- // load 3 weights once
- uvec2 packed_w[3];
-
- packed_w[0] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
- packed_w[1] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- packed_w[2] = VLOAD2(uvec2, weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
-
- vec3 w[3];
- w[0] = vec3(unpackHalf2x16(packed_w[0].x), unpackHalf2x16(packed_w[0].y).x);
- w[1] = vec3(unpackHalf2x16(packed_w[1].x), unpackHalf2x16(packed_w[1].y).x);
- w[2] = vec3(unpackHalf2x16(packed_w[2].x), unpackHalf2x16(packed_w[2].y).x);
-
- vec4 s[2];
- vec4 r;
-
- // first line
- s = VLOAD2_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
- pixels[0] += CONVOLVE1x3(s, w[0]);
-
- // second line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- pixels[0] += CONVOLVE1x3(s, w[1]);
- pixels[1] += CONVOLVE1x3(s, w[0]);
-
- // third line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- pixels[0] += CONVOLVE1x3(s, w[2]);
- pixels[1] += CONVOLVE1x3(s, w[1]);
- pixels[2] += CONVOLVE1x3(s, w[0]);
-
- // forth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
- pixels[1] += CONVOLVE1x3(s, w[2]);
- pixels[2] += CONVOLVE1x3(s, w[1]);
-
- // fifth line
- s = VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 4));
- pixels[2] += CONVOLVE1x3(s, w[2]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-
- if(z_index % uint(2) == uint(0))
- {
- b = vec2_b.x;
- }
- else
- {
- b = vec2_b.y;
- }
-
- for(i = 0; i < 3; i++)
- {
- pixels[i] += vec4(b);
- }
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels[0] = ACT_OP(pixels[0]);
- pixels[1] = ACT_OP(pixels[1]);
- pixels[2] = ACT_OP(pixels[2]);
- pixels[3] = ACT_OP(pixels[3]);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, pixels[0]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 1, 0), pixels[1]);
- STORE_PACK4_HALF(dst_ptr, TENSOR3D_OFFSET(dst_iter, 0, 2, 0), pixels[2]);
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, dst_stride_z);
- }
-}
-
-#endif /* PROCESS_nX_nY_nZ */
-
-#else /* DATA_TYPE_FP32 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/direct_convolution5x5.cs b/src/core/GLES_COMPUTE/cs_shaders/direct_convolution5x5.cs
deleted file mode 100644
index e47db549c9..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/direct_convolution5x5.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#ifdef FUSED_ACTIVATION
-#include "activation_layer_helpers_cs.h"
-#endif /* FUSED_ACTIVATION */
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-/** This kernel performs a direct convolution to convolve the low three dimensions
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note This kernel has multiple optimized direct convolution options for FP16.
- * The direct convolution option must be passed at compile time using "#define PROCESS_nX_nY_nZ" e.g. "#define PROCESS_8X_1Y_1Z"
- * @note The convolution stride x must be passed at compile time using "#define STRIDE_X n" e.g. "#define STRIDE_X 1"
- * This OpenGL ES shader works with stride_x = 1 and 2
- * @note If biases are used then "define HAS_BIAS" has to be passed at compile time
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[out] weights_ptr Pointer to the weights tensor. Supported data types: same as @p src_ptr
- * @param[in] weights_attrs The attributes of the weights tensor
- * @param[in] biases_ptr Pointer to the biases tensor. Same as @p src_ptr
- * @param[in] biases_attrs The attributes of the weights tensor
- * @param[in] weights_stride_w Stride of the weights tensor in the 4th dimension
- * @param[in] weights_depth The third dimensions of the weights tensors
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- Tensor3DAttributes weights_attrs;
-#ifdef BIAS
- VectorAttributes biases_attrs;
-#endif /* BIAS */
- uint weights_stride_w;
- uint weights_depth;
-};
-
-#ifdef DATA_TYPE_FP32
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, float, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- float pixels = 0.f;
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- float temp[5];
- float temp_weight[5];
- for(int d = 0; d < int(weights_depth); ++d)
- {
- temp = VLOAD5(float[5], src_ptr, IMAGE_OFFSET(src_iter, 0, 0));
- temp_weight = VLOAD5(float[5], weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 0, 0));
- pixels += temp[0] * temp_weight[0] + temp[1] * temp_weight[1] + temp[2] * temp_weight[2] + temp[3] * temp_weight[3] + temp[4] * temp_weight[4];
-
- temp = VLOAD5(float[5], src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- temp_weight = VLOAD5(float[5], weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 1, 0));
- pixels += temp[0] * temp_weight[0] + temp[1] * temp_weight[1] + temp[2] * temp_weight[2] + temp[3] * temp_weight[3] + temp[4] * temp_weight[4];
-
- temp = VLOAD5(float[5], src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- temp_weight = VLOAD5(float[5], weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 2, 0));
- pixels += temp[0] * temp_weight[0] + temp[1] * temp_weight[1] + temp[2] * temp_weight[2] + temp[3] * temp_weight[3] + temp[4] * temp_weight[4];
-
- temp = VLOAD5(float[5], src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
- temp_weight = VLOAD5(float[5], weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 3, 0));
- pixels += temp[0] * temp_weight[0] + temp[1] * temp_weight[1] + temp[2] * temp_weight[2] + temp[3] * temp_weight[3] + temp[4] * temp_weight[4];
-
- temp = VLOAD5(float[5], src_ptr, IMAGE_OFFSET(src_iter, 0, 4));
- temp_weight = VLOAD5(float[5], weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, 4, 0));
- pixels += temp[0] * temp_weight[0] + temp[1] * temp_weight[1] + temp[2] * temp_weight[2] + temp[3] * temp_weight[3] + temp[4] * temp_weight[4];
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- pixels += LOAD(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- pixels = ACT_OP(pixels);
-#endif /* FUSED_ACTIVATION */
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, pixels);
-}
-#elif defined(DATA_TYPE_FP16)
-
-// Common definitions for DATA_TYPE_FP16
-#if STRIDE_X == 1
-#define LOAD_SRC_AT_ROW(row) VLOAD2_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, row))
-#define CONVOLVE1x5(src, weight) convolve1x5_stride1(src, weight)
-#elif STRIDE_X == 2 /* STRIDE_X == 1 */
-#define LOAD_SRC_AT_ROW(row) VLOAD3_UNPACK12_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, row))
-#define CONVOLVE1x5(src, weight) convolve1x5_stride2(src, weight)
-#else /* STRDIDE_X == 1 */
-#error STRIDE_X larger than 2 is not supported
-#endif /* STRIDE_X == 1 */
-
-#define LOAD_WEIGHT_AT_ROW(row) VLOAD3_UNPACK6_HALF(weights_ptr, TENSOR3D_OFFSET(weights_iter, 0, row, 0))
-
-vec4 convolve1x5_stride1(vec4 tmp[2], vec2 w[3])
-{
- vec4 src0 = tmp[0];
- vec4 src1 = vec4(tmp[0].yzw, tmp[1].x);
- vec4 src2 = vec4(tmp[0].zw, tmp[1].xy);
- vec4 src3 = vec4(tmp[0].w, tmp[1].xyz);
- vec4 src4 = tmp[1];
- vec4 ret = src0 * w[0].x + src1 * w[0].y + src2 * w[1].x + src3 * w[1].y + src4 * w[2].x;
-
- return ret;
-}
-
-vec4 convolve1x5_stride2(vec4 tmp[3], vec2 w[3])
-{
- vec4 src0 = vec4(tmp[0].xz, tmp[1].xz);
- vec4 src1 = vec4(tmp[0].yw, tmp[1].yw);
- vec4 src2 = vec4(tmp[0].z, tmp[1].xz, tmp[2].x);
- vec4 src3 = vec4(tmp[0].w, tmp[1].yw, tmp[2].y);
- vec4 src4 = vec4(tmp[1].x, tmp[1].z, tmp[2].xz);
- vec4 ret = src0 * w[0].x + src1 * w[0].y + src2 * w[1].x + src3 * w[1].y + src4 * w[2].x;
-
- return ret;
-}
-
-#if defined(PROCESS_4X_1Y_1Z)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, weightsBuffer, uint, weights_ptr, weights_shift, 2, readonly);
-#ifdef BIAS
-TENSOR_DECLARATION(4, biasesBuffer, uint, biases_ptr, biases_shift, 2, readonly);
-#endif /* BIAS */
-
-void main()
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator weights_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(weights_attrs, weights_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
-#ifdef BIAS
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR_NO_STEP(biases_attrs, biases_shift);
-#endif /* BIAS */
-
- vec4 res = vec4(0);
- vec2 w[3];
- vec4 s[STRIDE_X + 1];
-
- uint z_index = gl_GlobalInvocationID.z;
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, z_index * weights_stride_w);
-
- for(int d = 0; d < int(weights_depth); ++d)
- {
- for(int row = 0; row < 5; row++)
- {
- w = LOAD_WEIGHT_AT_ROW(row);
- s = LOAD_SRC_AT_ROW(row);
- res += CONVOLVE1x5(s, w);
- }
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, src_attrs.stride_z);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(weights_iter, weights_attrs.stride_z);
- }
-
-#ifdef BIAS
- vec2 vec2_b;
- float b;
-
- vec2_b = LOAD_UNPACK2_HALF(biases_ptr, VECTOR_OFFSET(biases_iter, z_index));
- b = (z_index % uint(2) == uint(0)) ? vec2_b.x : vec2_b.y;
- res += vec4(b);
-#endif /* BIAS */
-
-#ifdef FUSED_ACTIVATION
- res = ACT_OP(res);
-#endif /* FUSED_ACTIVATION */
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, res);
-}
-
-#endif /* PROCESS_nX_nY_nZ */
-#else /* DATA_TYPE_FP32 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/dropout.cs b/src/core/GLES_COMPUTE/cs_shaders/dropout.cs
deleted file mode 100644
index 89ac8fea2e..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/dropout.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif /*DATA_TYPE_FP16*/
-
-uint hash(uint x)
-{
- x += (x << 10u);
- x ^= (x >> 6u);
- x += (x << 3u);
- x ^= (x >> 11u);
- x += (x << 15u);
- return x;
-}
-
-uint hash(uvec3 v)
-{
- return hash(v.x ^ hash(v.y) ^ hash(v.z));
-}
-
-float float_construct(uint m)
-{
- const uint ieee_mantissa = 0x007FFFFFu;
- const uint ieee_one = 0x3F800000u;
-
- m &= ieee_mantissa;
- m |= ieee_one;
-
- float f = uintBitsToFloat(m);
- return f - 1.0;
-}
-
-float rand(vec3 v, float seed)
-{
- return float_construct(hash(floatBitsToUint(v + seed)));
-}
-
-/** Dropout is used to improve over-fit on neural networks.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] mask_ptr Pointer to the mask tensor. Supported data types: same as @p src_ptr
- * @param[in] mask_attrs The attributes of the mask tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes mask_attrs;
- Tensor3DAttributes dst_attrs;
-};
-
-#ifdef DATA_TYPE_FP32
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, maskBuffer, float, mask_ptr, mask_shift, 2, restrict);
-TENSOR_DECLARATION(3, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator mask_iter = CONVERT_TO_TENSOR3D_ITERATOR(mask_attrs, mask_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float random = 0.f;
- float inputv = 0.f;
- float maskv = 0.f;
- float outputv = 0.f;
-
-#ifdef FORWARD
- random = rand(vec3(gl_GlobalInvocationID.xyz), SEED);
- maskv = (random > RATIO) ? 1.f : 0.f;
- STORE_CURRENT_ITEM(mask_ptr, mask_iter, maskv);
-#else /* FORWARD */
- maskv = LOAD_CURRENT_ITEM(mask_ptr, mask_iter);
-#endif /* FORWARD */
-
- inputv = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- outputv = maskv * inputv * float(SCALE);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, outputv);
-}
-
-#elif defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, maskBuffer, uint, mask_ptr, mask_shift, 2, restrict);
-TENSOR_DECLARATION(3, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator mask_iter = CONVERT_TO_TENSOR3D_ITERATOR(mask_attrs, mask_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float random1 = 0.f;
- float random2 = 0.f;
- vec2 input_vec = vec2(0, 0);
- vec2 output_vec = vec2(0, 0);
- vec2 mask_vec = vec2(0, 0);
-
-#ifdef FORWARD
- random1 = rand(vec3(gl_GlobalInvocationID.xyz), SEED);
- random2 = rand(vec3(float(gl_GlobalInvocationID.x) + 0.5f, gl_GlobalInvocationID.yz), SEED);
- mask_vec.x = (random1 > RATIO) ? 1.f : 0.f;
- mask_vec.y = (random2 > RATIO) ? 1.f : 0.f;
-
- STORE_PACK2_CURRENT_ITEM_HALF(mask_ptr, mask_iter, mask_vec);
-#else /* FORWARD */
- mask_vec = LOAD_UNPACK2_CURRENT_ITEM_HALF(mask_ptr, mask_iter);
-#endif /* FORWARD */
-
- input_vec = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- output_vec = mask_vec * input_vec * float(SCALE);
-
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, output_vec);
-}
-
-#else /* DATA_TYPE_FP32 */
-
-#endif /* DATA_TYPE_FP32 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs b/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs
deleted file mode 100644
index 4e96a5ec74..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-#ifdef FILL_IMAGE_BORDERS_REPLICATE
-
-/** Fill N pixel of the padding edge of a single channel image by replicating the closest valid pixel.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @attention The border size for top, bottom, left, right needs to be passed at the compile time.
- * e.g. BORDER_SIZE_TOP=0 BORDER_SIZE_BOTTOM=2 BORDER_SIZE_LEFT=0 BORDER_SIZE_RIGHT=2
- *
- * @param[in,out] buf_ptr Pointer to the source image. Supported data types: F16/F32
- * @param[in] buf_attrs The attributes of the source image
- * @param[in] width Width of the valid region of the image
- * @param[in] height Height of the valid region of the image
- * @param[in] start_pos_x X coordinate indicating the start point of the valid region
- * @param[in] start_pos_y Y coordinate indicating the start point of the valid region
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes buf_attrs;
- uint width;
- uint height;
- int start_pos_x;
- int start_pos_y;
-};
-
-#if defined(DATA_TYPE_FP32)
-
-TENSOR_DECLARATION(1, bufBuffer, float, buf_ptr, buf_shift, 2, restrict);
-
-void main()
-{
- ImageIterator buf_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(buf_attrs, buf_shift);
-
- // Update pointer to point to the starting point of the valid region
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(buf_iter, start_pos_y * int(buf_attrs.stride_y) + start_pos_x * int(buf_attrs.stride_x));
-
- int total_width = BORDER_SIZE_LEFT + int(width) + BORDER_SIZE_RIGHT;
- int gid0 = int(gl_GlobalInvocationID.x);
- int gidH = gid0 - total_width;
- int gidW = gid0 - BORDER_SIZE_LEFT;
-
- if(gidH >= 0)
- {
- // Handle left border
- float left_val = LOAD(buf_ptr, IMAGE_OFFSET(buf_iter, 0, gidH));
- for(int i = 0; i < BORDER_SIZE_LEFT; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, -(i + 1), gidH), left_val);
- }
- // Handle right border
- float right_val = LOAD(buf_ptr, IMAGE_OFFSET(buf_iter, int(width) - 1, gidH));
- for(int i = 0; i < BORDER_SIZE_RIGHT; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, int(width) + i, gidH), right_val);
- }
- }
- else
- {
- // Get value for corners
- int val_idx = gidW;
- if(gidW < 0 || gidW > (int(width) - 1))
- {
- val_idx = gidW < 0 ? 0 : int(width) - 1;
- }
-
- // Handle top border
- float top_val = LOAD(buf_ptr, IMAGE_OFFSET(buf_iter, val_idx, 0));
- for(int i = 0; i < BORDER_SIZE_TOP; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, gidW, -(i + 1)), top_val);
- }
- // Handle bottom border
- float bottom_val = LOAD(buf_ptr, IMAGE_OFFSET(buf_iter, val_idx, int(height) - 1));
- for(int i = 0; i < BORDER_SIZE_BOTTOM; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, gidW, int(height) + i), bottom_val);
- }
- }
-}
-#elif defined(DATA_TYPE_FP16)
-
-TENSOR_DECLARATION(1, bufBuffer, uint, buf_ptr, buf_shift, 2, restrict);
-
-void set_replicate(uint offset, int pos, vec2 replicate_value)
-{
- vec2 b = LOAD_UNPACK2_HALF(buf_ptr, offset);
-
- if(pos % 2 == 0)
- {
- b.x = replicate_value.y;
- }
- else
- {
- b.y = replicate_value.x;
- }
-
- STORE_PACK2_HALF(buf_ptr, offset, b);
-}
-
-void main()
-{
- ImageIterator buf_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(buf_attrs, buf_shift);
-
- // Update pointer to point to the starting point of the valid region
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(buf_iter, start_pos_y * int(buf_attrs.stride_y) + start_pos_x * int(buf_attrs.stride_x));
-
- int total_width = BORDER_SIZE_LEFT + int(width) + BORDER_SIZE_RIGHT;
- int gid0 = int(gl_GlobalInvocationID.x);
- int gidH = gid0 - total_width;
- int gidW = gid0 - BORDER_SIZE_LEFT;
-
- if(gidH >= 0)
- {
- // Handle left border
- vec2 left_val = LOAD_UNPACK2_HALF(buf_ptr, IMAGE_OFFSET(buf_iter, 0, gidH));
- for(int i = 0; i < BORDER_SIZE_LEFT; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, -(i + 1), gidH);
- int pos = BORDER_SIZE_LEFT - i - 1;
- if(i == 0)
- {
- if(pos % 2 == 0)
- {
- set_replicate(offset, pos, left_val);
- }
- }
- else
- {
- if(pos % 2 == 0)
- {
- if(BORDER_SIZE_LEFT % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, left_val.xx);
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, left_val.yy);
- }
- i++;
- }
- }
- }
- // Handle right border
- vec2 right_val_origin = LOAD_UNPACK2_HALF(buf_ptr, IMAGE_OFFSET(buf_iter, int(width) - 1, gidH));
- vec2 right_val;
- if((((BORDER_SIZE_LEFT + int(width)) % 2)) == 1)
- {
- right_val = vec2(right_val_origin.x, right_val_origin.x);
- }
- else
- {
- right_val = vec2(right_val_origin.y, right_val_origin.y);
- }
- for(int i = 0; i < BORDER_SIZE_RIGHT; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, int(width) + i, gidH);
- int pos = i + BORDER_SIZE_LEFT + int(width);
-
- if(i == 0)
- {
- if(pos % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, right_val);
- i++;
- }
- else
- {
- set_replicate(offset, pos, right_val);
- }
- }
- else
- {
- if(pos % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, right_val);
- i++;
- }
- }
- }
- }
- else
- {
- // Get value for corners
- int val_idx = gidW;
- if(gidW < 0 || (gidW > (int(width) - 1)))
- {
- val_idx = gidW < 0 ? 0 : (int(width) - 1);
- }
-
- // Handle top border
- vec2 top_val = LOAD_UNPACK2_HALF(buf_ptr, IMAGE_OFFSET(buf_iter, val_idx, 0));
- for(int i = 0; i < BORDER_SIZE_TOP; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, gidW, -(i + 1));
-
- if(gid0 % 2 == 0)
- {
- if(gidW == (int(width) - 1))
- {
- if(((BORDER_SIZE_LEFT + int(width)) % 2 == 1))
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val.xx);
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val.yy);
- }
- }
- else
- {
- if(gidW < 0)
- {
- if(BORDER_SIZE_LEFT % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val.xx);
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val.yy);
- }
- }
- else if(gidW >= int(width))
- {
- if((BORDER_SIZE_LEFT + int(width)) % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val.yy);
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val.xx);
- }
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, top_val);
- }
- }
- }
- }
- // Handle bottom border
- vec2 bottom_val = LOAD_UNPACK2_HALF(buf_ptr, IMAGE_OFFSET(buf_iter, val_idx, int(height) - 1));
- for(int i = 0; i < BORDER_SIZE_BOTTOM; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, gidW, int(height) + i);
-
- if(gid0 % 2 == 0)
- {
- if(gidW == (int(width) - 1))
- {
- STORE_PACK2_HALF(buf_ptr, offset, bottom_val.xx);
- }
- else
- {
- if(gidW < 0)
- {
- if(BORDER_SIZE_LEFT % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, bottom_val.xx);
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, bottom_val.yy);
- }
- }
- else if(gidW >= int(width))
- {
- if((BORDER_SIZE_LEFT + int(width)) % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, bottom_val.yy);
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, bottom_val.xx);
- }
- }
- else
- {
- STORE_PACK2_HALF(buf_ptr, offset, bottom_val);
- }
- }
- }
- }
- }
-}
-
-#endif /* DATA_TYPE_FP32 */
-
-#endif /* FILL_IMAGE_BORDERS_REPLICATE */
-
-#ifdef FILL_IMAGE_BORDERS_CONSTANT
-
-/** Fill N pixels of the padding edge of a single channel image with a constant value.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @attention The border size for top, bottom, left, right needs to be passed at the compile time.
- * e.g. BORDER_SIZE_TOP=0 BORDER_SIZE_BOTTOM=2 BORDER_SIZE_LEFT=0 BORDER_SIZE_RIGHT=2
- *
- * @param[out] buf_ptr Pointer to the source image. Supported data types: F16/F32
- * @param[in] buf_attrs The attributes of the source image
- * @param[in] width Width of the valid region of the image
- * @param[in] height Height of the valid region of the image
- * @param[in] start_pos_x X coordinate indicating the start point of the valid region
- * @param[in] start_pos_y Y coordinate indicating the start point of the valid region
- * @param[in] constant_value Constant value to use to fill the edges
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes buf_attrs;
- uint width;
- uint height;
- int start_pos_x;
- int start_pos_y;
- float constant_value;
-};
-
-#if defined(DATA_TYPE_FP32)
-TENSOR_DECLARATION(1, bufBuffer, float, buf_ptr, buf_shift, 2, writeonly);
-
-void main()
-{
- ImageIterator buf_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(buf_attrs, buf_shift);
-
- // Update pointer to point to the starting point of the valid region
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(buf_iter, start_pos_y * int(buf_attrs.stride_y) + start_pos_x * int(buf_attrs.stride_x));
-
- int total_width = BORDER_SIZE_LEFT + int(width) + BORDER_SIZE_RIGHT;
- int gid0 = int(gl_GlobalInvocationID.x);
- int gidH = gid0 - total_width;
- int gidW = gid0 - BORDER_SIZE_LEFT;
-
- if(gidH >= 0)
- {
- // Handle left border
- for(int i = 0; i < BORDER_SIZE_LEFT; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, -(i + 1), gidH), constant_value);
- }
- // Handle right border
- for(int i = 0; i < BORDER_SIZE_RIGHT; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, int(width) + i, gidH), constant_value);
- }
- }
- else
- {
- // Handle top border
- for(int i = 0; i < BORDER_SIZE_TOP; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, gidW, -(i + 1)), constant_value);
- }
- // Handle bottom border
- for(int i = 0; i < BORDER_SIZE_BOTTOM; ++i)
- {
- STORE(buf_ptr, IMAGE_OFFSET(buf_iter, gidW, int(height) + i), constant_value);
- }
- }
-}
-
-#elif defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, bufBuffer, uint, buf_ptr, buf_shift, 2, restrict);
-
-void set_constant(uint offset, int pos)
-{
- vec2 b = LOAD_UNPACK2_HALF(buf_ptr, offset);
-
- if(pos % 2 == 0)
- {
- b.x = constant_value;
- }
- else
- {
- b.y = constant_value;
- }
-
- STORE_PACK2_HALF(buf_ptr, offset, b);
-}
-
-void main()
-{
- ImageIterator buf_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(buf_attrs, buf_shift);
-
- int total_width = BORDER_SIZE_LEFT + int(width) + BORDER_SIZE_RIGHT;
- int gid0 = int(gl_GlobalInvocationID.x);
- int gidH = gid0 - total_width;
- int gidW = gid0 - BORDER_SIZE_LEFT;
-
- // Update pointer to point to the starting point of the valid region
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(buf_iter, start_pos_y * int(buf_attrs.stride_y) + start_pos_x * int(buf_attrs.stride_x));
-
- vec2 b = vec2(constant_value, constant_value);
-
- if(gidH >= 0)
- {
- // Handle left border
- for(int i = 0; i < BORDER_SIZE_LEFT; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, -(i + 1), gidH);
- int pos = BORDER_SIZE_LEFT - i - 1;
-
- if(i == 0)
- {
- if(pos % 2 == 0)
- {
- set_constant(offset, pos);
- }
- }
- else
- {
- if(pos % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, b);
- }
- }
- }
- // Handle right border
- for(int i = 0; i < BORDER_SIZE_RIGHT; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, int(width) + i, gidH);
- int pos = i + BORDER_SIZE_LEFT + int(width);
-
- if(i == 0)
- {
- if(pos % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, b);
- }
- else
- {
- set_constant(offset, pos);
- }
- }
- else
- {
- if(pos % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, b);
- }
- }
- }
- }
- else
- {
- // Handle top border
- for(int i = 0; i < BORDER_SIZE_TOP; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, gidW, -(i + 1));
-
- if(gid0 % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, b);
- }
- }
- // Handle bottom border
- for(int i = 0; i < BORDER_SIZE_BOTTOM; ++i)
- {
- uint offset = IMAGE_OFFSET(buf_iter, gidW, int(height) + i);
-
- if(gid0 % 2 == 0)
- {
- STORE_PACK2_HALF(buf_ptr, offset, b);
- }
- }
- }
-}
-
-#endif /* DATA_TYPE_FP32 */
-
-#endif /* FILL_IMAGE_BORDERS_CONSTANT */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/gemm.cs b/src/core/GLES_COMPUTE/cs_shaders/gemm.cs
deleted file mode 100644
index d41b48c2a7..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/gemm.cs
+++ /dev/null
@@ -1,1130 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-#if defined(DATA_TYPE_FP32)
-#ifdef GEMM_TRANSPOSE1xW
-/** This OpenGL ES kernel computes the "vector" 1x4 transposition of input matrix
- *
- * @param[in] src_ptr Pointer to the source matrix. Supported data types: F32
- * @param[in] src_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- /* Compute address for Matrix B - source */
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- /* Compute address for Matrix B transposed - destination. X and Y are swapped */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, gl_GlobalInvocationID.y * uint(16) + gl_GlobalInvocationID.x * dst_attrs.stride_y);
-
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src_ptr, src_iter);
- VSTORE4_CURRENT_ITEM(dst_ptr, dst_iter, b0);
-}
-#endif /* GEMM_TRANSPOSE1xW */
-
-#ifdef GEMM_INTERLEAVE4x4
-/** This OpenGLES kernel reshapes the input matrix interleaving the values
- *
- * @param[in] src_ptr Pointer to the source matrix. Supported data types: F32
- * @param[in] src_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- /* Compute source and destination addresses */
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- int i;
- int j;
-
- for(i = 0; i < 4; ++i)
- {
- for(j = 0; j < 4; ++j)
- {
- float res = LOAD(src_ptr, IMAGE_OFFSET(src_iter, i, j));
- STORE(dst_ptr, TENSOR_OFFSET_ADVANCE(dst_iter, (i * 4 + j)), res);
- }
- }
-}
-#endif /* GEMM_INTERLEAVE4x4 */
-
-#ifdef GEMM_ACCUMULATE_BIASES
-/** This kernel accumulates each row with the biases vector
- *
- * @param[in, out] accum_ptr Pointer to the accumulate tensor. Supported data type: F32
- * @param[in] accum_attrs The attributes of the accumulate tensor
- * @param[in] biases_ptr Pointer to the biases vector. Same as @p accum_ptr
- * @param[in] biases_attrs The attributes of the biases tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes accum_attrs;
- VectorAttributes biases_attrs;
-};
-TENSOR_DECLARATION(1, accumBuffer, float, accum_ptr, accum_shift, 2, restrict);
-TENSOR_DECLARATION(2, biasesBuffer, float, biases_ptr, biases_shift, 2, readonly);
-
-void main(void)
-{
- ImageIterator accum_iter = CONVERT_TO_IMAGE_ITERATOR(accum_attrs, accum_shift);
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR(biases_attrs, biases_shift);
-
- for(int i = 0; i < 16; ++i)
- {
- float accum_value = LOAD(accum_ptr, TENSOR_OFFSET_ADVANCE(accum_iter, i));
- float biases_value = LOAD(biases_ptr, TENSOR_OFFSET_ADVANCE(biases_iter, i));
- accum_value = biases_value + accum_value;
-
- // Store result in the accummulate buffer
- STORE(accum_ptr, TENSOR_OFFSET_ADVANCE(accum_iter, i), accum_value);
- }
-}
-#endif /* GEMM_ACCUMULATE_BIASES */
-
-#ifdef GEMM_MM_INTERLEAVED_TRANSPOSED /* unvalidate */
-/** This OpenGL ES kernel is optimised for Midgard. It computes the matrix multiplication between matrix A (src0) and matrix B (src1)
- * Matrix A and matrix B must be reshaped respectively with @ref gemm_interleave4x4_32bit and @ref gemm_transpose1x4 before running the matrix multiplication
- *
- * @note The optional value of scalar alpha is passed at compile time using -DALPHA=alpha
- *
- * @param[in] src0_ptr Pointer to the source matrix. Supported data types: F32
- * @param[in] src0_attrs The attributes of the source matrix
- * @param[in] src1_ptr Pointer to the source matrix. Supported data types: same as @p src0_ptr
- * @param[in] src1_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src0_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src0_attrs;
- ImageAttributes src1_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, src0Buffer, float, src0_ptr, src0_shift, 2, readonly);
-TENSOR_DECLARATION(2, src1Buffer, float, src1_ptr, src1_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- /* Compute address for matrix A and B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * (src0_attrs.stride_y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(gl_GlobalInvocationID.x) * (src1_attrs.stride_y));
- /* Compute end row address for matrix B */
- int end_row_mtx_b = int(TENSOR_OFFSET_ADVANCE(src1_iter, COLS_B));
-
- /* Reset accumulators */
- vec4 c00 = vec4(0.0f);
- vec4 c10 = vec4(0.0f);
- vec4 c20 = vec4(0.0f);
- vec4 c30 = vec4(0.0f);
-
- // FIXME: loop unrolling really needed for GLES?
- for(; int(CURRENT_ITEM_OFFSET(src1_iter)) <= (end_row_mtx_b - 8); TENSOR_ITERATOR_ADVANCE(src0_iter, 8), TENSOR_ITERATOR_ADVANCE(src1_iter, 8))
- {
- /* Load values from matrix A (interleaved) and matrix B (transposed) */
- vec4 a0 = VLOAD4_CURRENT_ITEM(vec4, src0_ptr, src0_iter);
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
-
- c00 += vec4(a0.x) * b0;
- c10 += vec4(a0.y) * b0;
- c20 += vec4(a0.z) * b0;
- c30 += vec4(a0.w) * b0;
-
- /* Load values from matrix A (interleaved) and matrix B (transposed) */
- a0 = VLOAD4(vec4, src0_ptr, TENSOR_OFFSET_ADVANCE(src0_iter, 4));
- b0 = VLOAD4(vec4, src1_ptr, TENSOR_OFFSET_ADVANCE(src1_iter, 4));
-
- c00 += vec4(a0.x) * b0;
- c10 += vec4(a0.y) * b0;
- c20 += vec4(a0.z) * b0;
- c30 += vec4(a0.w) * b0;
- }
-
- for(; int(CURRENT_ITEM_OFFSET(src1_iter)) < end_row_mtx_b; TENSOR_ITERATOR_ADVANCE(src0_iter, 4), TENSOR_ITERATOR_ADVANCE(src1_iter, 4))
- {
- /* Load values from matrix A (interleaved) and matrix B (transposed) */
- vec4 a0 = VLOAD4_CURRENT_ITEM(vec4, src0_ptr, src0_iter);
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
-
- c00 += vec4(a0.x) * b0;
- c10 += vec4(a0.y) * b0;
- c20 += vec4(a0.z) * b0;
- c30 += vec4(a0.w) * b0;
- }
-
- /* Multiply by the weight of matrix product */
- c00 = c00 * vec4(ALPHA);
- c10 = c10 * vec4(ALPHA);
- c20 = c20 * vec4(ALPHA);
- c30 = c30 * vec4(ALPHA);
-
- /* Store 4x4 block */
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 0), c00);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), c10);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), c20);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), c30);
-}
-#endif /* GEMM_MM_INTERLEAVED_TRANSPOSED */
-
-#ifdef GEMM_MM_FLOATING_POINT
-/** This OpenGL ES kernel computes the matrix multiplication between matrix A (src0) and matrix B (src1)
- * Matrix A and matrix B must be reshaped respectively with @ref gemm_interleave4x4_32bit and @ref gemm_transpose1x4 before running the matrix multiplication
- *
- * @note The number of elements processed along the x and y directions must be passed at compile time using -DNUM_ELEMS_PROCESSED_PER_THREAD_X and -DNUM_ELEMS_PROCESSED_PER_THREAD_Y.
- * @note The number of matrix A columns must be passed at compile time using -DCOLS_A.
- * @note The optional value of scalar alpha is passed at compile time using -DALPHA=alpha
- *
- * @param[in] src0_ptr Pointer to the source matrix. Supported data types: F32
- * @param[in] src0_attrs The attributes of the source matrix
- * @param[in] src1_ptr Pointer to the source matrix. Supported data types: same as @p src0_ptr
- * @param[in] src1_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src0_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src0_attrs;
- ImageAttributes src1_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, src0Buffer, float, src0_ptr, src0_shift, 2, readonly);
-TENSOR_DECLARATION(2, src1Buffer, float, src1_ptr, src1_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- int idx = int(gl_GlobalInvocationID.x) * int(NUM_ELEMS_PROCESSED_PER_THREAD_X);
- /* Compute the address for the vector A and matrix B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * (src0_attrs.stride_y) * uint(NUM_ELEMS_PROCESSED_PER_THREAD_Y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, idx * 4);
-
- /* Compute end row address for matrix A */
- int end_row_vec_a = int(TENSOR_OFFSET_ADVANCE_IN_BYTES(src0_iter, COLS_A * 4));
-
- /* Reset accumulators */
- vec4 acc0 = vec4(0.0f);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 acc1 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 acc2 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 acc3 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- for(; int(CURRENT_ITEM_OFFSET(src0_iter)) <= (end_row_vec_a - 2); TENSOR_ITERATOR_ADVANCE(src0_iter, 2), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(2) * src1_attrs.stride_y))
- {
- vec2 a0 = VLOAD2_CURRENT_ITEM(vec2, src0_ptr, src0_iter);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec2 a1 = VLOAD2(vec2, src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec2 a2 = VLOAD2(vec2, src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec2 a3 = VLOAD2(vec2, src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
- vec4 b1 = VLOAD4(vec4, src1_ptr, IMAGE_OFFSET(src1_iter, 0, 1));
-
- acc0 += b0 * vec4(a0.x);
- acc0 += b1 * vec4(a0.y);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1.x);
- acc1 += b1 * vec4(a1.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2.x);
- acc2 += b1 * vec4(a2.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3.x);
- acc3 += b1 * vec4(a3.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- }
-
- for(; int(CURRENT_ITEM_OFFSET(src0_iter)) < end_row_vec_a; TENSOR_ITERATOR_ADVANCE(src0_iter, 1), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y))
- {
- // Load values from matrix A
- float a0 = LOAD_CURRENT_ITEM(src0_ptr, src0_iter);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- float a1 = LOAD(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
- //float a1 = 0;
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- float a2 = LOAD(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- float a3 = LOAD(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
-
- acc0 += b0 * vec4(a0);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- }
-
- /* Multiply by the weight of vector-matrix product */
- acc0 = acc0 * vec4(ALPHA);
- VSTORE4_CURRENT_ITEM(dst_ptr, dst_iter, acc0);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 = acc1 * vec4(ALPHA);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), acc1);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 = acc2 * vec4(ALPHA);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), acc2);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 = acc3 * vec4(ALPHA);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), acc3);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-}
-#endif /* GEMM_MM_FLOATING_POINT */
-
-#ifdef GEMM_MM_FLOATING_POINT_BIFROST
-/** This OpenGL ES kernel computes the matrix multiplication between matrix A (src0) and matrix B (src1)
- * Matrix A and matrix B in case both matrices have not been reshaped
- *
- * @note The number of elements processed along the x and y directions must be passed at compile time using -DNUM_ELEMS_PROCESSED_PER_THREAD_X and -DNUM_ELEMS_PROCESSED_PER_THREAD_Y.
- * @note The number of matrix A columns must be passed at compile time using -DCOLS_A.
- * @note The optional value of scalar alpha is passed at compile time using -DALPHA=alpha
- *
- * @param[in] src0_ptr Pointer to the source matrix. Supported data types: F32
- * @param[in] src0_attrs The attributes of the source matrix
- * @param[in] src1_ptr Pointer to the source matrix. Supported data types: same as @p src0_ptr
- * @param[in] src1_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src0_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src0_attrs;
- ImageAttributes src1_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, src0Buffer, float, src0_ptr, src0_shift, 2, readonly);
-TENSOR_DECLARATION(2, src1Buffer, float, src1_ptr, src1_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- int idx = int(gl_GlobalInvocationID.x) * int(NUM_ELEMS_PROCESSED_PER_THREAD_X);
- /* Compute the address for the vector A and matrix B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * (src0_attrs.stride_y) * uint(NUM_ELEMS_PROCESSED_PER_THREAD_Y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, idx * 4);
-
- /* Reset accumulators */
- vec4 acc0 = vec4(0.0f);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 acc1 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 acc2 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 acc3 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- // A and B src indices get incremented at the same time.
- int i = 0;
- for(; i <= (COLS_A - 4); i += 4)
- {
- // Load values from matrix A and matrix B
- vec4 a0 = VLOAD4_CURRENT_ITEM(vec4, src0_ptr, src0_iter);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 a1 = VLOAD4(vec4, src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 a2 = VLOAD4(vec4, src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 a3 = VLOAD4(vec4, src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y);
-
- // Multiply and accumulate
- acc0 += b0 * vec4(a0.x);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1.x);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2.x);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3.x);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- // Load values from matrix B
- b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y);
-
- // Multiply and accumulate
- acc0 += b0 * vec4(a0.y);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- // Load values from matrix B
- b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y);
-
- // Multiply and accumulate
- acc0 += b0 * vec4(a0.z);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1.z);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2.z);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3.z);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- // Load values from matrix B
- b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y);
-
- // Multiply and accumulate
- acc0 += b0 * vec4(a0.w);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1.w);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2.w);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3.w);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- TENSOR_ITERATOR_ADVANCE(src0_iter, 4);
- }
-
- for(; i < COLS_A; ++i)
- {
- // Load values from matrix A
- float a0 = LOAD_CURRENT_ITEM(src0_ptr, src0_iter);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- float a1 = LOAD(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- float a2 = LOAD(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- float a3 = LOAD(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 b0 = VLOAD4_CURRENT_ITEM(vec4, src1_ptr, src1_iter);
-
- // Multiply and accumulate
- acc0 += b0 * vec4(a0);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y);
- TENSOR_ITERATOR_ADVANCE(src0_iter, 1);
- }
-
- /* Multiply by the weight of vector-matrix product */
- acc0 = acc0 * vec4(ALPHA);
- VSTORE4_CURRENT_ITEM(dst_ptr, dst_iter, acc0);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 = acc1 * vec4(ALPHA);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), acc1);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 = acc2 * vec4(ALPHA);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), acc2);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 = acc3 * vec4(ALPHA);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), acc3);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-}
-#endif /* GEMM_MM_FLOATING_POINT_BIFROST */
-
-#ifdef GEMM_MATRIXADDITION
-/** This OpenGL ES kernel performs the in-place matrix addition between 2 matrices taking into account that the second matrix might be weighted by a scalar value beta:
- *
- * @attention The beta's value need to be passed at compile time using BETA
- *
- * @param[in] src_ptr Pointer to the source matrix. Supported data types: F32
- * @param[in] src_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, restrict);
-
-void main(void)
-{
- /* Compute source and destination addresses */
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- /* Load values from A x B */
- vec4 alpha_ab = VLOAD4_CURRENT_ITEM(vec4, dst_ptr, dst_iter);
- vec4 c = VLOAD4_CURRENT_ITEM(vec4, src_ptr, src_iter);
-
- /* Computes alpha * axb + beta * c */
- vec4 out1 = alpha_ab + vec4(float(BETA) * c);
-
- /* Store final result in axb matrix */
- VSTORE4_CURRENT_ITEM(dst_ptr, dst_iter, out1);
-}
-#endif /* GEMM_MATRIXADDITION */
-
-#elif defined(DATA_TYPE_FP16)
-
-#ifdef GEMM_TRANSPOSE1xW
-/** This OpenGL ES kernel computes the "vector" 1x8 transposition of input matrix
- *
- * @param[in] src_ptr Pointer to the source matrix. Supported data types: F16
- * @param[in] src_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main(void)
-{
- /* Compute address for Matrix B - source */
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- /* Compute address for Matrix B transposed - destination. X and Y are swapped */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, gl_GlobalInvocationID.y * uint(16) + gl_GlobalInvocationID.x * dst_attrs.stride_y);
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, LOAD_CURRENT_ITEM(src_ptr, src_iter));
-}
-#endif /* GEMM_TRANSPOSE1xW */
-
-#ifdef GEMM_INTERLEAVE4x4
-/** This OpenGLES kernel reshapes the input matrix interleaving the values
- *
- * @param[in] src_ptr Pointer to the source matrix. Supported data types: F16
- * @param[in] src_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main(void)
-{
- /* Compute source and destination addresses */
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- vec4 s0[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
- vec4 s1[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- vec4 s2[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- vec4 s3[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
-
- vec4 s[2];
- s[0] = vec4(s0[0].x, s1[0].x, s2[0].x, s3[0].x);
- s[1] = vec4(s0[0].y, s1[0].y, s2[0].y, s3[0].y);
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, s);
-
- s[0] = vec4(s0[0].z, s1[0].z, s2[0].z, s3[0].z);
- s[1] = vec4(s0[0].w, s1[0].w, s2[0].w, s3[0].w);
- STORE_PACK8_HALF(dst_ptr, TENSOR_OFFSET_ADVANCE(dst_iter, 1u), s);
-
- s[0] = vec4(s0[1].x, s1[1].x, s2[1].x, s3[1].x);
- s[1] = vec4(s0[1].y, s1[1].y, s2[1].y, s3[1].y);
- STORE_PACK8_HALF(dst_ptr, TENSOR_OFFSET_ADVANCE(dst_iter, 2u), s);
-
- s[0] = vec4(s0[1].z, s1[1].z, s2[1].z, s3[1].z);
- s[1] = vec4(s0[1].w, s1[1].w, s2[1].w, s3[1].w);
- STORE_PACK8_HALF(dst_ptr, TENSOR_OFFSET_ADVANCE(dst_iter, 3u), s);
-}
-#endif /* GEMM_INTERLEAVE4x4 */
-
-#ifdef GEMM_MM_FLOATING_POINT
-/** This OpenGL ES kernel computes the matrix multiplication between matrix A(src0) and matrix B(src1)
- * Matrix A and matrix B must be reshaped respectively with @ref gemm_interleave4x4_16bit and @ref gemm_transpose1x4 before running the matrix multiplication
- *
- * @note The optional value of scalar alpha is passed at compile time using -DALPHA=alpha
- *
- * @param[in] src0_ptr Pointer to the source matrix.Supported data types: F16
- * @param[in] src0_attrs The attributes of the source matrix
- * @param[in] src1_ptr Pointer to the source matrix. Supported data types: same as @p src0_ptr
- * @param[in] src1_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src0_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src0_attrs;
- ImageAttributes src1_attrs;
- ImageAttributes dst_attrs;
-};
-
-#if defined(MM_PROCESS_4X)
-TENSOR_DECLARATION(1, src0Buffer, uint, src0_ptr, src0_shift, 2, readonly);
-TENSOR_DECLARATION(2, src1Buffer, uvec2, src1_ptr, src1_shift, 3, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- int idx = int(gl_GlobalInvocationID.x) * int(NUM_ELEMS_PROCESSED_PER_THREAD_X);
- /* Compute the address for the vector A and matrix B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * src0_attrs.stride_y * uint(NUM_ELEMS_PROCESSED_PER_THREAD_Y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(idx) * src1_attrs.stride_x);
-
- /* Compute end row address for matrix A */
- uint end_row_vec_a = uint(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) + uint(COLS_A << 1);
-
- /* Reset accumulators */
- vec4 acc0 = vec4(0.0f);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 acc1 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 acc2 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 acc3 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- for(; int(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) <= int(end_row_vec_a - uint(4));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, 2 * 2), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(2) * src1_attrs.stride_y))
- {
- vec2 a0 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec2 a1 = LOAD_UNPACK2_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec2 a2 = LOAD_UNPACK2_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec2 a3 = LOAD_UNPACK2_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- vec4 b0 = LOAD_UNPACK4_CURRENT_ITEM_HALF(src1_ptr, src1_iter);
- vec4 b1 = LOAD_UNPACK4_HALF(src1_ptr, IMAGE_OFFSET(src1_iter, 0, 1));
-
- acc0 += b0 * vec4(a0.x);
- acc0 += b1 * vec4(a0.y);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * vec4(a1.x);
- acc1 += b1 * vec4(a1.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * vec4(a2.x);
- acc2 += b1 * vec4(a2.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * vec4(a3.x);
- acc3 += b1 * vec4(a3.y);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- }
-
- for(; int(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) < int(end_row_vec_a); TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, 2 * 2), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, src1_attrs.stride_y))
- {
- vec2 a0 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec2 a1 = LOAD_UNPACK2_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec2 a2 = LOAD_UNPACK2_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec2 a3 = LOAD_UNPACK2_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- vec4 b0 = LOAD_UNPACK4_CURRENT_ITEM_HALF(src1_ptr, src1_iter);
-
- acc0 += b0 * (a0.x);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b0 * (a1.x);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b0 * (a2.x);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b0 * (a3.x);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- }
-
- /* Multiply by the weight of vector-matrix product */
- acc0 = acc0 * vec4(ALPHA);
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, acc0);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), acc1);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), acc2);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), acc3);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-}
-#elif defined(MM_PROCESS_4X_OPTIMIZED) /* PROCESS_4X */
-TENSOR_DECLARATION(1, src0Buffer, uvec4, src0_ptr, src0_shift, 4, readonly);
-TENSOR_DECLARATION(2, src1Buffer, uvec2, src1_ptr, src1_shift, 3, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- int idx = int(gl_GlobalInvocationID.x) * int(NUM_ELEMS_PROCESSED_PER_THREAD_X);
- /* Compute the address for the vector A and matrix B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * src0_attrs.stride_y * uint(NUM_ELEMS_PROCESSED_PER_THREAD_Y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(idx) * src1_attrs.stride_x);
-
- /* Compute end row address for matrix A */
- uint end_row_vec_a = uint(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) + uint(COLS_A << 1);
-
- /* Reset accumulators */
- vec4 acc0 = vec4(0.0f);
-
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 acc1 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 acc2 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 acc3 = vec4(0.0f);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- for(; int(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) <= int(end_row_vec_a - uint(16));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(8) * src0_attrs.stride_x), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(8) * src1_attrs.stride_y))
- {
- vec4 a0[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
-
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 a1[2] = LOAD_UNPACK8_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 a2[2] = LOAD_UNPACK8_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 a3[2] = LOAD_UNPACK8_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- vec4 b;
-
- for(int i = 0; i < 8; i++)
- {
- int j = i >> 2;
- int k = i % 4;
-
- b = LOAD_UNPACK4_HALF(src1_ptr, IMAGE_OFFSET(src1_iter, 0, i));
-
- acc0 += b * vec4(a0[j][k]);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b * vec4(a1[j][k]);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b * vec4(a2[j][k]);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b * vec4(a3[j][k]);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- }
- }
-
- for(; int(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) < int(end_row_vec_a); TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, 2 * 8), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(8) * src1_attrs.stride_y))
- {
- vec4 a0[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
-
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- vec4 a1[2] = LOAD_UNPACK8_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 1));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- vec4 a2[2] = LOAD_UNPACK8_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 2));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- vec4 a3[2] = LOAD_UNPACK8_HALF(src0_ptr, IMAGE_OFFSET(src0_iter, 0, 3));
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-
- vec4 b;
-
- int leftover = COLS_A % 8;
-
- for(int i = 0; i < leftover; i++)
- {
- int j = i >> 2;
- int k = i % 4;
-
- b = LOAD_UNPACK4_HALF(src1_ptr, IMAGE_OFFSET(src1_iter, 0, i));
-
- acc0 += b * vec4(a0[j][k]);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- acc1 += b * vec4(a1[j][k]);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- acc2 += b * vec4(a2[j][k]);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- acc3 += b * vec4(a3[j][k]);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- }
- }
-
- /* Multiply by the weight of vector-matrix product */
- acc0 = acc0 * vec4(ALPHA);
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, acc0);
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), acc1);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 1
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), acc2);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 2
-#if NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), acc3);
-#endif // NUM_ELEMS_PROCESSED_PER_THREAD_Y > 3
-}
-#elif defined(MM_PROCESS_8X) /* PROCESS_8X */
-TENSOR_DECLARATION(1, src0Buffer, uvec4, src0_ptr, src0_shift, 4, readonly);
-TENSOR_DECLARATION(2, src1Buffer, uvec4, src1_ptr, src1_shift, 4, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- int idx = int(gl_GlobalInvocationID.x) * int(NUM_ELEMS_PROCESSED_PER_THREAD_X);
- /* Compute the address for the vector A and matrix B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * src0_attrs.stride_y * uint(NUM_ELEMS_PROCESSED_PER_THREAD_Y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(idx) * src1_attrs.stride_x);
-
- /* Compute end row address for matrix A */
- uint end_row_vec_a = uint(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) + uint(COLS_A << 1);
-
- /* Reset accumulators */
- vec4 acc[2];
-
- acc[0] = vec4(0.0f);
- acc[1] = vec4(0.0f);
-
- for(; int(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) <= int(end_row_vec_a - uint(16));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(8) * src0_attrs.stride_x), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(8) * src1_attrs.stride_y))
- {
- vec4 a[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
- vec4 b[2];
-
- for(int i = 0; i < 8; i++)
- {
- int j = i >> 2;
- int k = i % 4;
-
- b = LOAD_UNPACK8_HALF(src1_ptr, IMAGE_OFFSET(src1_iter, 0, i));
-
- acc[0] += b[0] * vec4(a[j][k]);
- acc[1] += b[1] * vec4(a[j][k]);
- }
- }
-
- for(; int(CURRENT_ITEM_OFFSET_IN_BYTES(src0_iter)) < int(end_row_vec_a);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(8) * uint(2)), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(8) * src1_attrs.stride_y))
- {
- vec4 a[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
- vec4 b[2];
-
- int leftover = COLS_A % 8;
-
- for(int i = 0; i < leftover; i++)
- {
- int j = i >> 2;
- int k = i % 4;
-
- b = LOAD_UNPACK8_HALF(src1_ptr, IMAGE_OFFSET(src1_iter, 0, i));
-
- acc[0] += b[0] * vec4(a[j][k]);
- acc[1] += b[1] * vec4(a[j][k]);
- }
- }
-
- /* Multiply by the weight of vector-matrix product */
- acc[0] = acc[0] * vec4(ALPHA);
- acc[1] = acc[1] * vec4(ALPHA);
-
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, acc);
-}
-#endif /* PROCESS_8X */
-#endif /* GEMM_MM_FLOATING_POINT */
-
-#ifdef GEMM_ACCUMULATE_BIASES
-#if defined(ACCUM_PROCESS_4X)
-/** This kernel accumulates each row with the biases vector
- *
- * @param[in, out] accum_ptr Pointer to the accumulate tensor. Supported data type: F16
- * @param[in] accum_attrs The attributes of the accumulate tensor
- * @param[in] biases_ptr Pointer to the biases vector. Same as @p accum_ptr
- * @param[in] biases_attrs The attributes of the biases tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes accum_attrs;
- VectorAttributes biases_attrs;
-};
-
-TENSOR_DECLARATION(1, accumBuffer, uvec2, accum_ptr, accum_shift, 3, restrict);
-TENSOR_DECLARATION(2, biasesBuffer, uvec2, biases_ptr, biases_shift, 3, readonly);
-
-void main(void)
-{
- ImageIterator accum_iter = CONVERT_TO_IMAGE_ITERATOR(accum_attrs, accum_shift);
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR(biases_attrs, biases_shift);
-
- vec4 u[2];
- u[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(accum_ptr, accum_iter);
- u[1] = LOAD_UNPACK4_CURRENT_ITEM_HALF(biases_ptr, biases_iter);
-
- vec4 tmp;
- tmp = u[0] + u[1];
- STORE_PACK4_CURRENT_ITEM_HALF(accum_ptr, accum_iter, tmp);
-}
-#elif defined(ACCUM_PROCESS_8X) /* ACCUM_PROCESS_8X */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes accum_attrs;
- VectorAttributes biases_attrs;
-};
-
-TENSOR_DECLARATION(1, accumBuffer, uvec4, accum_ptr, accum_shift, 4, restrict);
-TENSOR_DECLARATION(2, biasesBuffer, uvec4, biases_ptr, biases_shift, 4, readonly);
-
-void main(void)
-{
- ImageIterator accum_iter = CONVERT_TO_IMAGE_ITERATOR(accum_attrs, accum_shift);
- VectorIterator biases_iter = CONVERT_TO_VECTOR_ITERATOR(biases_attrs, biases_shift);
-
- vec4 u[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(accum_ptr, accum_iter);
- vec4 v[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(biases_ptr, biases_iter);
-
- vec4 r[2];
- r[0] = u[0] + v[0];
- r[1] = u[1] + v[1];
- STORE_PACK8_CURRENT_ITEM_HALF(accum_ptr, accum_iter, r);
-}
-#endif /* ACCUM_PROCESS_8X */
-#endif /* GEMM_ACCUMULATE_BIASES */
-
-#ifdef GEMM_MM_INTERLEAVED_TRANSPOSED
-/** This OpenGL ES kernel is optimised for Midgard. It computes the matrix multiplication between matrix A (src0) and matrix B (src1)
- * Matrix A and matrix B must be reshaped respectively with @ref gemm_interleave4x4_32bit and @ref gemm_transpose1x4 before running the matrix multiplication
- *
- * @note The optional value of scalar alpha is passed at compile time using -DALPHA=alpha
- *
- * @param[in] src0_ptr Pointer to the source matrix. Supported data types: F16
- * @param[in] src0_attrs The attributes of the source matrix
- * @param[in] src1_ptr Pointer to the source matrix. Supported data types: same as @p src0_ptr
- * @param[in] src1_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data types: same as @p src0_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src0_attrs;
- ImageAttributes src1_attrs;
- ImageAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, src0Buffer, uvec2, src0_ptr, src0_shift, 3, readonly);
-TENSOR_DECLARATION(2, src1Buffer, uvec4, src1_ptr, src1_shift, 4, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main()
-{
- ImageIterator src0_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src0_attrs, src0_shift);
- ImageIterator src1_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(src1_attrs, src1_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- /* Compute address for matrix A and B */
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, uint(gl_GlobalInvocationID.y) * (src0_attrs.stride_y));
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, uint(gl_GlobalInvocationID.x) * (src1_attrs.stride_y));
- /* Compute end row address for matrix B */
- int end_row_mtx_b = (int(CURRENT_ITEM_OFFSET_IN_BYTES(src1_iter)) >> 1) + int(COLS_B);
-
- /* Reset accumulators */
- vec4 c00[2];
- vec4 c10[2];
- vec4 c20[2];
- vec4 c30[2];
- c00[0] = vec4(0.0f);
- c00[1] = vec4(0.0f);
- c10[0] = vec4(0.0f);
- c10[1] = vec4(0.0f);
- c20[0] = vec4(0.0f);
- c20[1] = vec4(0.0f);
- c30[0] = vec4(0.0f);
- c30[1] = vec4(0.0f);
-
- // FIXME: loop unrolling really needed for GLES?
- for(; (int(CURRENT_ITEM_OFFSET_IN_BYTES(src1_iter)) >> 1) <= (end_row_mtx_b - 16); TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, 16), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, 32))
- {
- /* Load values from matrix A (interleaved) and matrix B (transposed) */
- vec4 a0 = LOAD_UNPACK4_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
- vec4 b0[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src1_ptr, src1_iter);
-
- c00[0] += vec4(a0.x) * b0[0];
- c00[1] += vec4(a0.x) * b0[1];
- c10[0] += vec4(a0.y) * b0[0];
- c10[1] += vec4(a0.y) * b0[1];
- c20[0] += vec4(a0.z) * b0[0];
- c20[1] += vec4(a0.z) * b0[1];
- c30[0] += vec4(a0.w) * b0[0];
- c30[1] += vec4(a0.w) * b0[1];
-
- /* Load values from matrix A (interleaved) and matrix B (transposed) */
- a0 = LOAD_UNPACK4_HALF(src0_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src0_iter, 8));
- b0 = LOAD_UNPACK8_HALF(src1_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src1_iter, 16));
-
- c00[0] += vec4(a0.x) * b0[0];
- c00[1] += vec4(a0.x) * b0[1];
- c10[0] += vec4(a0.y) * b0[0];
- c10[1] += vec4(a0.y) * b0[1];
- c20[0] += vec4(a0.z) * b0[0];
- c20[1] += vec4(a0.z) * b0[1];
- c30[0] += vec4(a0.w) * b0[0];
- c30[1] += vec4(a0.w) * b0[1];
- }
-
- for(; (int(CURRENT_ITEM_OFFSET_IN_BYTES(src1_iter)) >> 1) < end_row_mtx_b; TENSOR_ITERATOR_ADVANCE_IN_BYTES(src0_iter, 8), TENSOR_ITERATOR_ADVANCE_IN_BYTES(src1_iter, 16))
- {
- /* Load values from matrix A (interleaved) and matrix B (transposed) */
- vec4 a0 = LOAD_UNPACK4_CURRENT_ITEM_HALF(src0_ptr, src0_iter);
- vec4 b0[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src1_ptr, src1_iter);
-
- c00[0] += vec4(a0.x) * b0[0];
- c00[1] += vec4(a0.x) * b0[1];
- c10[0] += vec4(a0.y) * b0[0];
- c10[1] += vec4(a0.y) * b0[1];
- c20[0] += vec4(a0.z) * b0[0];
- c20[1] += vec4(a0.z) * b0[1];
- c30[0] += vec4(a0.w) * b0[0];
- c30[1] += vec4(a0.w) * b0[1];
- }
-
- /* Multiply by the weight of matrix product */
- c00[0] = c00[0] * vec4(ALPHA);
- c00[1] = c00[1] * vec4(ALPHA);
- c10[0] = c10[0] * vec4(ALPHA);
- c10[1] = c10[1] * vec4(ALPHA);
- c20[0] = c20[0] * vec4(ALPHA);
- c20[1] = c20[1] * vec4(ALPHA);
- c30[0] = c30[0] * vec4(ALPHA);
- c30[1] = c30[1] * vec4(ALPHA);
-
- /* Store 4x8 block */
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 0), c00);
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), c10);
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), c20);
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), c30);
-}
-#endif /* GEMM_MM_INTERLEAVED_TRANSPOSED */
-#else /* DATA_TYPE_FP16 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP32 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/helpers_cs.h b/src/core/GLES_COMPUTE/cs_shaders/helpers_cs.h
deleted file mode 100644
index 4e3551700f..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/helpers_cs.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef ARM_COMPUTE_HELPER_CS_H
-#define ARM_COMPUTE_HELPER_CS_H
-
-#define SHADER_PARAMS_DECLARATION \
- layout(std140, binding = 0) uniform shader_params
-
-#define TENSOR_DECLARATION(location, buffer_type, type, ptr_name, shift_name, element_shift, access) \
- layout(std430, binding = location) access buffer buffer_type \
- { \
- type ptr_name[]; \
- }; \
- const uint shift_name = uint(element_shift)
-
-struct VectorAttributes
-{
- uint stride_x; /**< Stride of the vector in X dimension (in bytes) */
- uint step_x; /**< stride_x * number of elements along X processed per workitem (in bytes) */
- uint offset_first_element_in_bytes; /**< The offset of the first element in the vector (in bytes) */
- uint padding; /**< The padding to rounding up the structure to a multiple of a vec4 */
-};
-
-struct ImageAttributes
-{
- uint stride_x; /**< Stride of the image in X dimension (in bytes) */
- uint step_x; /**< stride_x * number of elements along X processed per workitem (in bytes) */
- uint stride_y; /**< Stride of the image in Y dimension (in bytes) */
- uint step_y; /**< stride_y * number of elements along Y processed per workitem (in bytes) */
- uint offset_first_element_in_bytes; /**< The offset of the first element in the image (in bytes) */
- uint padding1; /**< The padding to rounding up the structure to a multiple of a vec4 */
- uint padding2; /**< The padding to rounding up the structure to a multiple of a vec4 */
- uint padding3; /**< The padding to rounding up the structure to a multiple of a vec4 */
-};
-
-struct Tensor3DAttributes
-{
- uint stride_x; /**< Stride of the tensor in X dimension (in bytes) */
- uint step_x; /**< stride_x * number of elements along X processed per workitem (in bytes) */
- uint stride_y; /**< Stride of the tensor in Y dimension (in bytes) */
- uint step_y; /**< stride_y * number of elements along Y processed per workitem (in bytes) */
- uint stride_z; /**< Stride of the tensor in Z dimension (in bytes) */
- uint step_z; /**< stride_z * number of elements along Z processed per workitem (in bytes) */
- uint offset_first_element_in_bytes; /**< The offset of the first element in the tensor (in bytes) */
- uint padding; /**< The padding to rounding up the structure to a multiple of a vec4 */
-};
-
-struct VectorIterator
-{
- int current_offset_in_bytes; /**< Current offset of vector (in bytes) */
- int stride_x; /**< Stride of the vector in X dimension (in bytes) */
- int element_shift; /**< The number of bits to shift by for one element */
-};
-
-struct ImageIterator
-{
- int current_offset_in_bytes; /**< Current offset of image (in bytes) */
- int stride_x; /**< Stride of the image in X dimension (in bytes) */
- int stride_y; /**< Stride of the image in Y dimension (in bytes) */
- int element_shift; /**< The number of bits to shift by for one element */
-};
-
-struct Tensor3DIterator
-{
- int current_offset_in_bytes; /**< Current offset of tensor (in bytes) */
- int stride_x; /**< Stride of the tensor in X dimension (in bytes) */
- int stride_y; /**< Stride of the tensor in Y dimension (in bytes) */
- int stride_z; /**< Stride of the tensor in Z dimension (in bytes) */
- int element_shift; /**< The number of bits to shift by for one element */
-};
-
-#define CONVERT_TO_VECTOR_ITERATOR(attrs, element_shift) \
- update_vector_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, attrs.step_x)
-
-#define CONVERT_TO_VECTOR_ITERATOR_NO_STEP(attrs, element_shift) \
- update_vector_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, uint(0))
-
-#define CONVERT_TO_IMAGE_ITERATOR(attrs, element_shift) \
- update_image_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, attrs.step_x, attrs.stride_y, attrs.step_y)
-
-#define CONVERT_TO_IMAGE_ITERATOR_NO_STEP(attrs, element_shift) \
- update_image_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, uint(0), attrs.stride_y, uint(0))
-
-#define CONVERT_TO_TENSOR3D_ITERATOR(attrs, element_shift) \
- update_tensor3D_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, attrs.step_x, attrs.stride_y, attrs.step_y, attrs.stride_z, attrs.step_z)
-
-#define CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(attrs, element_shift) \
- update_tensor3D_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, uint(0), attrs.stride_y, uint(0), attrs.stride_z, uint(0))
-
-#define CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(attrs, element_shift) \
- update_image_from_tensor3D_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, attrs.step_x, attrs.stride_y, attrs.step_y, attrs.stride_z, attrs.step_z)
-
-#define CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(attrs, element_shift) \
- update_image_from_tensor3D_iter_offset(element_shift, attrs.offset_first_element_in_bytes, \
- attrs.stride_x, uint(0), attrs.stride_y, uint(0), attrs.stride_z, attrs.step_z)
-
-/** Wrap vector information into a VectorIterator structure, and make the offset to be this workitem's position.
- *
- * @param[in] element_shift The number of bits to shift by for one element
- * @param[in] offset_first_element_in_bytes The offset of the first element in the source vector
- * @param[in] stride_x Stride of the vector in X dimension (in bytes)
- * @param[in] step_x stride_x * number of elements along X processed per workitem (in bytes)
- *
- * @return A VectorIterator object
- */
-VectorIterator update_vector_iter_offset(uint element_shift, uint offset_first_element_in_bytes, uint stride_x, uint step_x)
-{
- VectorIterator vector_iter;
- vector_iter.element_shift = int(element_shift);
- vector_iter.stride_x = int(stride_x);
- vector_iter.current_offset_in_bytes = int(offset_first_element_in_bytes + gl_GlobalInvocationID.x * step_x);
-
- return vector_iter;
-}
-
-/** Wrap image information into an ImageIterator structure, and make the offset to be this workitem's position.
- *
- * @param[in] element_shift The number of bits to shift by for one element
- * @param[in] offset_first_element_in_bytes The offset of the first element in the source image
- * @param[in] stride_x Stride of the image in X dimension (in bytes)
- * @param[in] step_x stride_x * number of elements along X processed per workitem (in bytes)
- * @param[in] stride_y Stride of the image in Y dimension (in bytes)
- * @param[in] step_y stride_y * number of elements along Y processed per workitem (in bytes)
- *
- * @return An ImageIterator object
- */
-ImageIterator update_image_iter_offset(uint element_shift, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y)
-{
- ImageIterator image_iter;
- image_iter.element_shift = int(element_shift);
- image_iter.stride_x = int(stride_x);
- image_iter.stride_y = int(stride_y);
- image_iter.current_offset_in_bytes = int(offset_first_element_in_bytes + gl_GlobalInvocationID.x * step_x + gl_GlobalInvocationID.y * step_y);
-
- return image_iter;
-}
-
-/** Wrap 3D tensor information into a Tensor3DIterator structure, and make the offset to be this workitem's position.
- *
- * @param[in] element_shift The number of bits to shift by for one element
- * @param[in] offset_first_element_in_bytes The offset of the first element in the source tersor
- * @param[in] stride_x Stride of the tersor in X dimension (in bytes)
- * @param[in] step_x stride_x * number of elements along X processed per workitem (in bytes)
- * @param[in] stride_y Stride of the tersor in Y dimension (in bytes)
- * @param[in] step_y stride_y * number of elements along Y processed per workitem (in bytes)
- * @param[in] stride_z Stride of the tersor in Z dimension (in bytes)
- * @param[in] step_z stride_z * number of elements along Z processed per workitem (in bytes)
- *
- * @return A 3D Tensor3DIterator object
- */
-Tensor3DIterator update_tensor3D_iter_offset(uint element_shift, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y, uint stride_z, uint step_z)
-{
- Tensor3DIterator tensor_iter;
- tensor_iter.element_shift = int(element_shift);
- tensor_iter.stride_x = int(stride_x);
- tensor_iter.stride_y = int(stride_y);
- tensor_iter.stride_z = int(stride_z);
- tensor_iter.current_offset_in_bytes = int(offset_first_element_in_bytes + gl_GlobalInvocationID.x * step_x + gl_GlobalInvocationID.y * step_y + gl_GlobalInvocationID.z * step_z);
-
- return tensor_iter;
-}
-
-/** Wrap 3D tensor information into an ImageIterator structure, and make the offset to be this workitem's position.
- *
- * @param[in] element_shift The number of bits to shift by for one element
- * @param[in] offset_first_element_in_bytes The offset of the first element in the source tensor
- * @param[in] stride_x Stride of the tensor in X dimension (in bytes)
- * @param[in] step_x stride_x * number of elements along X processed per workitem (in bytes)
- * @param[in] stride_y Stride of the tensor in Y dimension (in bytes)
- * @param[in] step_y stride_y * number of elements along Y processed per workitem (in bytes)
- * @param[in] stride_z Stride of the tensor in Z dimension (in bytes)
- * @param[in] step_z stride_z * number of elements along Z processed per workitem (in bytes)
- *
- * @return An ImageIterator object
- */
-ImageIterator update_image_from_tensor3D_iter_offset(uint element_shift, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y, uint stride_z, uint step_z)
-{
- ImageIterator image_iter;
- image_iter.element_shift = int(element_shift);
- image_iter.stride_x = int(stride_x);
- image_iter.stride_y = int(stride_y);
- image_iter.current_offset_in_bytes = int(offset_first_element_in_bytes + gl_GlobalInvocationID.x * step_x + gl_GlobalInvocationID.y * step_y + gl_GlobalInvocationID.z * step_z);
-
- return image_iter;
-}
-
-#define VECTOR_OFFSET(tensor_iter, x) \
- uint(vector_offset_in_bytes(tensor_iter, int(x)) >> tensor_iter.element_shift)
-
-#define IMAGE_OFFSET(tensor_iter, x, y) \
- uint(image_offset_in_bytes(tensor_iter, int(x), int(y)) >> tensor_iter.element_shift)
-
-#define TENSOR3D_OFFSET(tensor_iter, x, y, z) \
- uint(tensor3D_offset_in_bytes(tensor_iter, int(x), int(y), int(z)) >> tensor_iter.element_shift)
-
-#define TENSOR_OFFSET_ADVANCE(tensor_iter, n) \
- uint((tensor_iter.current_offset_in_bytes >> tensor_iter.element_shift) + int(n))
-
-#define TENSOR_OFFSET_ADVANCE_IN_BYTES(tensor_iter, n) \
- uint((tensor_iter.current_offset_in_bytes + int(n)) >> tensor_iter.element_shift)
-
-#define CURRENT_ITEM_OFFSET(tensor_iter) \
- uint(tensor_iter.current_offset_in_bytes >> tensor_iter.element_shift)
-
-#define CURRENT_ITEM_OFFSET_IN_BYTES(tensor_iter) \
- uint(tensor_iter.current_offset_in_bytes)
-
-#define TENSOR_ITERATOR_ADVANCE(tensor_iter, n) \
- tensor_iter.current_offset_in_bytes += (int(n) << tensor_iter.element_shift)
-
-#define TENSOR_ITERATOR_ADVANCE_IN_BYTES(tensor_iter, n) \
- tensor_iter.current_offset_in_bytes += int(n)
-
-#define SET_TENSOR_ITERATOR_OFFSET_IN_BYTES(tensor_iter, n) \
- tensor_iter.current_offset_in_bytes = int(n)
-
-/** Get the offset of a VectorIterator
- *
- * @param[in] vector_iter The VectorIterator object pointed to the starting position of the buffer
- * @param[in] x Relative X position
- *
- * @return The relative offset of the VectorIterator object (in bytes)
- */
-uint vector_offset_in_bytes(VectorIterator vector_iter, int x)
-{
- return uint(vector_iter.current_offset_in_bytes + x * vector_iter.stride_x);
-}
-
-/** Get the offset of an ImageIterator
- *
- * @param[in] vector_iter The ImageIterator object pointed to the starting position of the buffer
- * @param[in] x Relative X position
- * @param[in] y Relative Y position
- *
- * @return The relative offset of the ImageIterator object (in bytes)
- */
-uint image_offset_in_bytes(ImageIterator image_iter, int x, int y)
-{
- return uint(image_iter.current_offset_in_bytes + x * image_iter.stride_x + y * image_iter.stride_y);
-}
-
-/** Get the offset of a Tensor3DIterator
- *
- * @param[in] vector_iter The Tensor3DIterator object pointed to the starting position of the buffer
- * @param[in] x Relative X position
- * @param[in] y Relative Y position
- * @param[in] z Relative Z position
- *
- * @return The relative offset of the Tensor3DIterator object (in bytes)
- */
-uint tensor3D_offset_in_bytes(Tensor3DIterator tensor_iter, int x, int y, int z)
-{
- return uint(tensor_iter.current_offset_in_bytes + x * tensor_iter.stride_x + y * tensor_iter.stride_y + z * tensor_iter.stride_z);
-}
-
-#define LOAD(tensor_ptr, offset) tensor_ptr[offset]
-#define STORE(tensor_ptr, offset, data) tensor_ptr[offset] = data
-#define LOAD_CURRENT_ITEM(tensor_ptr, tensor_iter) tensor_ptr[CURRENT_ITEM_OFFSET(tensor_iter)]
-#define STORE_CURRENT_ITEM(tensor_ptr, tensor_iter, data) tensor_ptr[CURRENT_ITEM_OFFSET(tensor_iter)] = data
-
-#define VLOAD2(return_type, tensor_ptr, offset) \
- return_type(LOAD(tensor_ptr, offset), \
- LOAD(tensor_ptr, (offset) + uint(1)))
-
-#define VSTORE2(tensor_ptr, offset, data) \
- STORE(tensor_ptr, offset, data[0]); \
- STORE(tensor_ptr, (offset) + uint(1), data[1])
-
-#define VLOAD2_CURRENT_ITEM(return_type, tensor_ptr, tensor_iter) VLOAD2(return_type, tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE2_CURRENT_ITEM(tensor_ptr, tensor_iter, data) VSTORE2(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD3(return_type, tensor_ptr, offset) \
- return_type(LOAD(tensor_ptr, offset), \
- LOAD(tensor_ptr, (offset) + uint(1)), \
- LOAD(tensor_ptr, (offset) + uint(2)))
-
-#define VSTORE3(tensor_ptr, offset, data) \
- STORE(tensor_ptr, offset, data[0]); \
- STORE(tensor_ptr, (offset) + uint(1), data[1]); \
- STORE(tensor_ptr, (offset) + uint(2), data[2])
-
-#define VLOAD3_CURRENT_ITEM(return_type, tensor_ptr, tensor_iter) VLOAD3(return_type, tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE3_CURRENT_ITEM(tensor_ptr, tensor_iter, data) VSTORE3(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD4(return_type, tensor_ptr, offset) \
- return_type(LOAD(tensor_ptr, offset), \
- LOAD(tensor_ptr, (offset) + uint(1)), \
- LOAD(tensor_ptr, (offset) + uint(2)), \
- LOAD(tensor_ptr, (offset) + uint(3)))
-
-#define VSTORE4(tensor_ptr, offset, data) \
- STORE(tensor_ptr, offset, data[0]); \
- STORE(tensor_ptr, (offset) + uint(1), data[1]); \
- STORE(tensor_ptr, (offset) + uint(2), data[2]); \
- STORE(tensor_ptr, (offset) + uint(3), data[3])
-
-#define VLOAD4_CURRENT_ITEM(return_type, tensor_ptr, tensor_iter) VLOAD4(return_type, tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE4_CURRENT_ITEM(tensor_ptr, tensor_iter, data) VSTORE4(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD5(return_type, tensor_ptr, offset) \
- return_type(LOAD(tensor_ptr, offset), \
- LOAD(tensor_ptr, (offset) + uint(1)), \
- LOAD(tensor_ptr, (offset) + uint(2)), \
- LOAD(tensor_ptr, (offset) + uint(3)), \
- LOAD(tensor_ptr, (offset) + uint(4)))
-
-#define VSTORE5(tensor_ptr, offset, data) \
- STORE(tensor_ptr, offset, data[0]); \
- STORE(tensor_ptr, (offset) + uint(1), data[1]); \
- STORE(tensor_ptr, (offset) + uint(2), data[2]); \
- STORE(tensor_ptr, (offset) + uint(3), data[3]); \
- STORE(tensor_ptr, (offset) + uint(4), data[4])
-
-#define VLOAD5_CURRENT_ITEM(return_type, tensor_ptr, tensor_iter) VLOAD5(return_type, tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE5_CURRENT_ITEM(tensor_ptr, tensor_iter, data) VSTORE5(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-/** Converting the vec4 object to 4 half-precision (16-bits) floating point values and packing into a uvec2 object
- *
- * @param[in] data The vec4 object to be packed
- *
- * @return The packed uvec2 object
- */
-highp uvec2 pack4_half(mediump vec4 data)
-{
- return uvec2(packHalf2x16(data.xy), packHalf2x16(data.zw));
-}
-
-/** Unpacking the uvec2 object to 4 half-precision (16-bits) floating point values and converting to a vec4 object
- *
- * @param[in] packed_data The uvec2 object to be unpacked
- *
- * @return The unpacked vec4 object
- */
-mediump vec4 unpack4_half(highp uvec2 packed_data)
-{
- return vec4(unpackHalf2x16(packed_data.x), unpackHalf2x16(packed_data.y));
-}
-
-/** Unpacking the uvec3 object to 6 half-precision (16-bits) floating point values and converting to a vec2[3] object
- *
- * @param[in] packed_data The uvec3 object to be unpacked
- *
- * @return The unpacked vec2[3] object
- */
-mediump vec2[3] unpack6_half(highp uvec3 packed_data)
-{
- return vec2[3](unpackHalf2x16(packed_data[0]),
- unpackHalf2x16(packed_data[1]),
- unpackHalf2x16(packed_data[2]));
-}
-
-/** Converting the vec4[2] object to 8 half-precision (16-bits) floating point values and packing into a uvec4 object
- *
- * @param[in] data The vec4[2] object to be packed
- *
- * @return The packed uvec4 object
- */
-highp uvec4 pack8_half(mediump vec4 data[2])
-{
- return uvec4(packHalf2x16(data[0].xy), packHalf2x16(data[0].zw),
- packHalf2x16(data[1].xy), packHalf2x16(data[1].zw));
-}
-
-/** Unpacking the uvec4 object to 8 half-precision (16-bits) floating point values and converting to a vec4[2] object
- *
- * @param[in] packed_data The uvec4 object to be unpacked
- *
- * @return The unpacked vec4[2] object
- */
-mediump vec4[2] unpack8_half(highp uvec4 packed_data)
-{
- return vec4[2](vec4(unpackHalf2x16(packed_data.x), unpackHalf2x16(packed_data.y)),
- vec4(unpackHalf2x16(packed_data.z), unpackHalf2x16(packed_data.w)));
-}
-
-/** Unpacking the uvec2[3] object to 12 half-precision (16-bits) floating point values and converting to a vec4[3] object
- *
- * @param[in] packed_data The uvec2[3] object to be unpacked
- *
- * @return The unpacked vec4[3] object
- */
-mediump vec4[3] unpack12_half(highp uvec2[3] packed_data)
-{
- return vec4[3](vec4(unpackHalf2x16(packed_data[0].x), unpackHalf2x16(packed_data[0].y)),
- vec4(unpackHalf2x16(packed_data[1].x), unpackHalf2x16(packed_data[1].y)),
- vec4(unpackHalf2x16(packed_data[2].x), unpackHalf2x16(packed_data[2].y)));
-}
-
-// For half-precision (16-bits) floating point packed into a "uint" element
-#define LOAD_UNPACK2_HALF(tensor_ptr, offset) unpackHalf2x16(uint(LOAD(tensor_ptr, offset)))
-#define STORE_PACK2_HALF(tensor_ptr, offset, data) STORE(tensor_ptr, offset, packHalf2x16(data))
-#define LOAD_UNPACK2_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) LOAD_UNPACK2_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define STORE_PACK2_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter, data) STORE_PACK2_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD2_UNPACK4_HALF(tensor_ptr, offset) unpack4_half(VLOAD2(uvec2, tensor_ptr, offset))
-#define VSTORE2_PACK4_HALF(tensor_ptr, offset, data) VSTORE2(tensor_ptr, offset, pack4_half(data))
-#define VLOAD2_UNPACK4_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) VLOAD2_UNPACK4_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE2_PACK4_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter, data) VSTORE2_PACK4_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD3_UNPACK6_HALF(tensor_ptr, offset) unpack6_half(VLOAD3(uvec3, tensor_ptr, offset))
-#define VLOAD3_UNPACK6_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) VLOAD3_UNPACK6_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-
-#define VLOAD4_UNPACK8_HALF(tensor_ptr, offset) unpack8_half(VLOAD4(uvec4, tensor_ptr, offset))
-#define VSTORE4_PACK8_HALF(tensor_ptr, offset, data) VSTORE4(tensor_ptr, offset, pack8_half(data))
-#define VLOAD4_UNPACK8_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) VLOAD4_UNPACK8_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE4_PACK8_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter, data) VSTORE4_PACK8_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-// For half-precision (16-bits) floating point packed into a "uvec2" element
-#define LOAD_UNPACK4_HALF(tensor_ptr, offset) unpack4_half(uvec2(LOAD(tensor_ptr, offset)))
-#define STORE_PACK4_HALF(tensor_ptr, offset, data) STORE(tensor_ptr, offset, pack4_half(data))
-#define LOAD_UNPACK4_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) LOAD_UNPACK4_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define STORE_PACK4_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter, data) STORE_PACK4_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD2_UNPACK8_HALF(tensor_ptr, offset) unpack8_half(VLOAD2(uvec4, tensor_ptr, offset))
-#define VSTORE2_PACK8_HALF(tensor_ptr, offset, data) VSTORE2(tensor_ptr, offset, pack8_half(data))
-#define VLOAD2_UNPACK8_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) VLOAD2_UNPACK8_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define VSTORE2_PACK8_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter, data) VSTORE2_PACK8_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#define VLOAD3_UNPACK12_HALF(tensor_ptr, offset) unpack12_half(VLOAD3(uvec2[3], tensor_ptr, offset))
-#define VLOAD3_UNPACK12_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) VLOAD3_UNPACK12_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-
-// For half-precision (16-bits) floating point packed into a "uvec4" element
-#define LOAD_UNPACK8_HALF(tensor_ptr, offset) unpack8_half(uvec4(LOAD(tensor_ptr, offset)))
-#define STORE_PACK8_HALF(tensor_ptr, offset, data) STORE(tensor_ptr, offset, pack8_half(data))
-#define LOAD_UNPACK8_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter) LOAD_UNPACK8_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define STORE_PACK8_CURRENT_ITEM_HALF(tensor_ptr, tensor_iter, data) STORE_PACK8_HALF(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-/** Converting the uvec4 object to 4 low-precision uint values and packing into a uint object
- *
- * @param[in] data The uvec4 object to be packed
- *
- * @return The packed uint object
- */
-highp uint pack4_u8(lowp uvec4 data)
-{
- highp uint r = uint(0);
-
- for(int i = 0; i < 4; i++)
- {
- r |= data[i] << uint(i * 8);
- }
-
- return r;
-}
-
-/** Unpacking the uint object to 4 low-precision uint values and converting to a uvec4 object
- *
- * @param[in] packed_data The uint object to be unpacked
- *
- * @return The unpacked uvec4 object
- */
-lowp uvec4 unpack4_u8(highp uint packed_data)
-{
- lowp uvec4 uvec;
-
- for(int i = 0; i < 4; i++)
- {
- uvec[i] = (packed_data >> uint(i * 8)) & uint(0xFF);
- }
-
- return uvec;
-}
-
-#define LOAD_UNPACK4_U8(tensor_ptr, offset) unpack4_u8(uint(LOAD(tensor_ptr, offset)))
-#define STORE_PACK4_U8(tensor_ptr, offset, data) STORE(tensor_ptr, offset, pack4_u8(data))
-#define LOAD_UNPACK4_CURRENT_ITEM_U8(tensor_ptr, tensor_iter) LOAD_UNPACK4_U8(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter))
-#define STORE_PACK4_CURRENT_ITEM_U8(tensor_ptr, tensor_iter, data) STORE_PACK4_U8(tensor_ptr, CURRENT_ITEM_OFFSET(tensor_iter), data)
-
-#endif // ARM_COMPUTE_HELPER_CS_H
diff --git a/src/core/GLES_COMPUTE/cs_shaders/normalization_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/normalization_layer.cs
deleted file mode 100644
index a5ec68c0c5..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/normalization_layer.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-/** Apply cross map normalization and in map normalization
- *
- * @note Alpha parameter / norm_size should be given as a preprocessor argument using "#define COEFF x"
- * @note BETA parameter in the normalization equation should be given as a preprocessor argument using "#define BETA x"
- * @note KAPPA parameter in the normalization equation should be given as a preprocessor argument using "#define KAPPA x"
- * @note Number of elements on the right or left side to normalize across should be given as a preprocessor argument using "#define RADIUS x"
- *
- * @param[in] src1_ptr Pointer to the first source tensor. Supported data types: F32
- * @param[in] src1_attrs The attributes of the first source tensor
- * @param[in] src2_ptr Pointer to the second source tensor. Supported data types: Same as @p src1_ptr
- * @param[in] src2_attrs The attributes of the second source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: Same as @p src1_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src1_attrs;
- Tensor3DAttributes src2_attrs;
- Tensor3DAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, src1Buffer, float, src1_ptr, src1_shift, 2, readonly);
-TENSOR_DECLARATION(2, src2Buffer, float, src2_ptr, src2_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-#ifdef CROSS_MAP
-void main(void)
-{
- Tensor3DIterator src1_iter = CONVERT_TO_TENSOR3D_ITERATOR(src1_attrs, src1_shift);
- Tensor3DIterator src2_iter = CONVERT_TO_TENSOR3D_ITERATOR(src2_attrs, src2_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float acc = 0.0;
-
- int num_of_slices = int(gl_NumWorkGroups.z * gl_WorkGroupSize.z);
- int current_slice = int(gl_GlobalInvocationID.z);
-
- int left_slice = max(current_slice - int(RADIUS), int(0));
- int right_slice = min(current_slice + int(RADIUS), int(num_of_slices - 1));
-
- for(int i = left_slice; i <= right_slice; i++)
- {
- acc += LOAD(src2_ptr, TENSOR3D_OFFSET(src2_iter, 0, 0, i - current_slice));
- }
-
- float normalized = pow(float(KAPPA) + float(COEFF) * acc, float(BETA));
-
- float normalized_pixel = (LOAD_CURRENT_ITEM(src1_ptr, src1_iter)) / normalized;
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, normalized_pixel);
-}
-
-#elif defined(IN_MAP_1D)
-void main(void)
-{
- Tensor3DIterator src1_iter = CONVERT_TO_TENSOR3D_ITERATOR(src1_attrs, src1_shift);
- Tensor3DIterator src2_iter = CONVERT_TO_TENSOR3D_ITERATOR(src2_attrs, src2_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float acc = 0.0;
-
- int num_of_items_x = int(gl_NumWorkGroups.x * gl_WorkGroupSize.x);
- int current_pos = int(gl_GlobalInvocationID.x);
-
- int left_pos = max(current_pos - int(RADIUS), int(0));
- int right_pos = min(current_pos + int(RADIUS), int(num_of_items_x + -1));
-
- for(int i = left_pos; i <= right_pos; i++)
- {
- acc += LOAD(src2_ptr, TENSOR3D_OFFSET(src2_iter, i - current_pos, 0, 0));
- }
-
- float normalized = pow(float(KAPPA) + float(COEFF) * acc, float(BETA));
-
- float normalized_pixel = (LOAD_CURRENT_ITEM(src1_ptr, src1_iter)) / normalized;
-
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, normalized_pixel);
-}
-#endif /*CROSS_MAP*/
diff --git a/src/core/GLES_COMPUTE/cs_shaders/normalize_planar_yuv_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/normalize_planar_yuv_layer.cs
deleted file mode 100644
index 6a46845d79..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/normalize_planar_yuv_layer.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-precision mediump float;
-
-/** Apply normalize_planar_yuv layer.
- *
- * @param[in] src_ptr Pointer to the first source tensor. Supported data types: F16
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] mean_ptr Pointer to the mean source tensor. Supported data types: same as @p src_ptr
- * @param[in] mean_attrs The attributes of the mean tensor
- * @param[in] sd_ptr Standard deviation values tensor,pointer to the sd tensor. Supported data types: same as @p src_ptr
- * @param[in] sd_attrs The attributes of the sd tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- VectorAttributes mean_attrs;
- VectorAttributes sd_attrs;
-};
-
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-TENSOR_DECLARATION(3, meanBuffer, uvec2, mean_ptr, mean_shift, 3, readonly);
-TENSOR_DECLARATION(4, sdBuffer, uvec2, sd_ptr, sd_shift, 3, readonly);
-
-void main(void)
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
- VectorIterator mean_iter = CONVERT_TO_VECTOR_ITERATOR(mean_attrs, mean_shift);
- VectorIterator sd_iter = CONVERT_TO_VECTOR_ITERATOR(sd_attrs, sd_shift);
-
- vec4 unpacked_s[3];
- vec4 tmp;
- vec4 result;
-
- uint current_slice = gl_GlobalInvocationID.z;
- unpacked_s[0] = LOAD_UNPACK4_CURRENT_ITEM_HALF(src_ptr, src_iter);
- unpacked_s[1] = LOAD_UNPACK4_HALF(mean_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(mean_iter, current_slice * mean_attrs.stride_x));
- unpacked_s[2] = LOAD_UNPACK4_HALF(sd_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(sd_iter, current_slice * sd_attrs.stride_x));
-
- if((current_slice % uint(4)) == uint(0))
- {
- tmp = unpacked_s[0] - unpacked_s[1].x;
- result = tmp / unpacked_s[2].x;
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
- }
- else if((current_slice % uint(4)) == uint(1))
- {
- tmp = unpacked_s[0] - unpacked_s[1].y;
- result = tmp / unpacked_s[2].y;
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
- }
- else if((current_slice % uint(4)) == uint(2))
- {
- tmp = unpacked_s[0] - unpacked_s[1].z;
- result = tmp / unpacked_s[2].z;
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
- }
- else
- {
- tmp = unpacked_s[0] - unpacked_s[1].w;
- result = tmp / unpacked_s[2].w;
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, result);
- }
-}
diff --git a/src/core/GLES_COMPUTE/cs_shaders/pixelwise_mul_float.cs b/src/core/GLES_COMPUTE/cs_shaders/pixelwise_mul_float.cs
deleted file mode 100644
index 936839f97e..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/pixelwise_mul_float.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-/** Performs a pixelwise multiplication with float scale of float inputs.
- *
- * @param[in] src1_ptr Pointer to the first source tensor. Supported data types: F32
- * @param[in] src1_attrs The attributes of the first source tensor
- * @param[in] src2_ptr Pointer to the second source tensor. Supported data types: Same as @p src1_ptr
- * @param[in] src2_attrs The attributes of the second source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: Same as @p src1_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] scale Float scaling factor. Supported data types: F32
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src1_attrs;
- Tensor3DAttributes src2_attrs;
- Tensor3DAttributes dst_attrs;
-};
-TENSOR_DECLARATION(1, src1Buffer, float, src1_ptr, src1_shift, 2, readonly);
-TENSOR_DECLARATION(2, src2Buffer, float, src2_ptr, src2_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main()
-{
- // Get pixels pointer
- Tensor3DIterator src1_iter = CONVERT_TO_TENSOR3D_ITERATOR(src1_attrs, src1_shift);
- Tensor3DIterator src2_iter = CONVERT_TO_TENSOR3D_ITERATOR(src2_attrs, src2_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- float result = LOAD_CURRENT_ITEM(src1_ptr, src1_iter) * LOAD_CURRENT_ITEM(src2_ptr, src2_iter) * float(SCALE);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, result);
-}
diff --git a/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs
deleted file mode 100644
index 6ca4265056..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs
+++ /dev/null
@@ -1,1052 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-/** Performs a pooling function
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note The pool size must be passed at compile time using "#define POOLING_LAYER_n". e.g. "#define POOLING_LAYER_2"
- * n must be one of these: 2, 3, 7, N
- * Pool size must be passed using POOL_SIZE if POOLING_LAYER_N is defined. e.g. POOL_SIZE=13;
- * @note In case of average pooling the following information must be passed at compile time:
- * POOL_AVG must be provided otherwise max pooling will be performed.
- * MAX_WIDTH and MAX_HEIGHT which are the maximum accessible indeces in x and y dimensions (width + pad)
- * STRIDE_X and STRIDE_Y which are the steps of the window along the x and y directions
- * PAD_X and PAD_Y which are the pooling paddings in x and y dimension
- *
- * @param[in] src_ptr Pointer to the source image. Supported data types: F32/F16
- * @param[in] src_attrs The attributes of the source image
- * @param[out] dst_ptr Pointer to the destination image. Supported data types: same as @p src_ptr
- * @param[in] src_attrs The attributes of the destination image
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
-};
-
-// Common definitions
-#if defined(POOL_AVG) || defined(POOL_L2)
-#define POOL_OP(res, a, b) ((res) = (a) + (b))
-#define POOL_OP_float(res, a, b) (res = a + b)
-#define POOL_OP_vec2(res, a, b) ((res) = (a) + (b))
-#else /* defined(POOL_AVG) || defined(POOL_L2) */
-#define POOL_OP(res, a, b) \
- (res) = (a); \
- if(isnan(a.x) || (a.x < b.x)) \
- { \
- res.x = b.x; \
- } \
- if(isnan(a.y) || (a.y < b.y)) \
- { \
- res.y = b.y; \
- } \
- if(isnan(a.z) || (a.z < b.z)) \
- { \
- res.z = b.z; \
- } \
- if(isnan(a.w) || (a.w < b.w)) \
- { \
- res.w = b.w; \
- }
-#define POOL_OP_float(res, a, b) \
- (res) = (a); \
- if(isnan(a) || (a < b)) \
- { \
- res = b; \
- }
-#define POOL_OP_vec2(res, a, b) \
- (res) = (a); \
- if(isnan(a.x) || (a.x < b.x)) \
- { \
- res.x = b.x; \
- } \
- if(isnan(a.y) || (a.y < b.y)) \
- { \
- res.y = b.y; \
- }
-#endif /* defined(POOL_AVG) || defined(POOL_L2) */
-
-#if defined(POOL_L2)
-#define POW2_OP(x, vec_size) ((x) * (x))
-#else /* defined(POOL_L2) */
-#define POW2_OP(x, vec_size) (x)
-#endif /* defined(POOL_L2) */
-
-#define DIV_OP(x, y) (x * (1.f / y))
-#define SQRT_OP(x) sqrt((x))
-
-#if defined(DATA_TYPE_FP32)
-
-float calculate_max(const int, Tensor3DIterator, const int, const int, const int, const int, const int, const int);
-float calculate_avg(const int, Tensor3DIterator, const int, const int, const int, const int, const int, const int);
-
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-#if defined(POOL_SIZE)
-// Set the initial value for the pooling operation accordingly with the data type
-#if defined(POOL_AVG) || defined(POOL_L2)
-#define INITIAL_VALUE 0.0f
-#else /* defined(POOL_AVG) || defined(POOL_L2) */
-#define INITIAL_VALUE -3.402823466385289e+38
-#endif // POOL_AVG
-#endif //POOL_SIZE
-
-float calculate_max(const int pool_size, Tensor3DIterator src_iter, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)
-{
- int start_x = int(gl_GlobalInvocationID.x) * stride_x - pad_x;
- int start_y = int(gl_GlobalInvocationID.y) * stride_y - pad_y;
- int end_x = int(min(start_x + pool_size, upper_bound_w));
- int end_y = int(min(start_y + pool_size, upper_bound_h));
-
- float data_max;
- data_max = LOAD_CURRENT_ITEM(src_ptr, src_iter);
-
- for(int i = 0; (start_y + i) < end_y; ++i)
- {
- for(int j = 0; (start_x + j) < end_x; ++j)
- {
- float data = LOAD(src_ptr, TENSOR3D_OFFSET(src_iter, j, i, 0));
- POOL_OP_float(data_max, data_max, data);
- }
- }
-
- return data_max;
-}
-
-float calculate_avg(const int pool_size, Tensor3DIterator src_iter, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)
-{
- int start_x = int(gl_GlobalInvocationID.x) * stride_x - pad_x;
- int start_y = int(gl_GlobalInvocationID.y) * stride_y - pad_y;
- int end_x = int(min(start_x + pool_size, upper_bound_w));
- int end_y = int(min(start_y + pool_size, upper_bound_h));
-
- float data_total = 0.0f;
- for(int i = 0; (start_x + i) < end_x; i++)
- {
- for(int j = 0; (start_y + j) < end_y; ++j)
- {
- float data = LOAD(src_ptr, TENSOR3D_OFFSET(src_iter, i, j, 0));
- if(isnan(data))
- {
- data = 0.0f;
- }
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data = POW2_OP(data, 1);
-#endif /* defined(POOL_L2) */
- data_total = data_total + data;
- }
- }
-
-#if defined(EXCLUDE_PADDING)
- start_x = max(0, start_x);
- start_y = max(0, start_y);
-#endif /* defined(EXCLUDE_PADDING) */
-
- return data_total / float((end_y - start_y) * (end_x - start_x));
-}
-
-#if defined(POOLING_LAYER_2) || defined(POOLING_LAYER_3) || defined(POOLING_LAYER_7)
-
-#if defined(POOLING_LAYER_2)
-#define POOL_SIZE 2
-#elif defined(POOLING_LAYER_3)
-#define POOL_SIZE 3
-#elif defined(POOLING_LAYER_7)
-#define POOL_SIZE 7
-#else // POOLING_LAYER_n
-#error Please define POOLING_LAYER_N instead.
-#endif // POOLING_LAYER_n
-
-void main(void)
-{
- // Get pixels pointer
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- //Load and calculate data
- float res;
-#if defined(POOL_AVG) || defined(POOL_L2)
- res = calculate_avg(POOL_SIZE, src_iter, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y);
-#else /*POOL_AVG*/
- res = calculate_max(POOL_SIZE, src_iter, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y);
-#endif /*POOL_AVG*/
-
-#if defined(POOL_L2)
- // Take square root of the result in L2 pooling
- res = SQRT_OP(res);
-#endif /* defined(POOL_L2) */
-
- // Store result
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, res);
-}
-
-#elif defined(POOLING_LAYER_3_OPTIMIZED)
-
-#define POOLING3x3_STRIDE1(res, input_ptr, input_iter) \
- vec4 data00 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0)); \
- vec2 data01 = VLOAD2(vec2, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(4)); \
- vec4 data10 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0)); \
- vec2 data11 = VLOAD2(vec2, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(4)); \
- vec4 data20 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0)); \
- vec2 data21 = VLOAD2(vec2, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(4)); \
- data00 = POW2_OP(data00, 4); \
- data01 = POW2_OP(data01, 2); \
- data10 = POW2_OP(data10, 4); \
- data11 = POW2_OP(data11, 2); \
- data20 = POW2_OP(data20, 4); \
- data21 = POW2_OP(data21, 2); \
- \
- vec4 values000; \
- vec4 values001; \
- vec4 values010; \
- vec4 values100; \
- vec4 values101; \
- vec4 values11; \
- vec4 values200; \
- vec4 values201; \
- vec4 values21; \
- values000.xyzw = data00.xyzy; \
- values001.xyzw = data00.zwzw; \
- values010.x = data01.x; \
- values010.y = data00.w; \
- values010.zw = data01.xy; \
- values100.xyzw = data10.xyzy; \
- values101.xyzw = data10.zwzw; \
- values11.x = data11.x; \
- values11.y = data10.w; \
- values11.zw = data11.xy; \
- values200.xyzw = data20.xyzy; \
- values201.xyzw = data20.zwzw; \
- values21.x = data21.x; \
- values21.y = data20.w; \
- values21.zw = data21.xy; \
- POOL_OP(values000.xyzw, values000.xyzw, values100.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values101.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values11.xyzw); \
- POOL_OP(values000.xyzw, values000.xyzw, values200.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values201.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values21.xyzw); \
- POOL_OP(res.xyzw, vec4(values000.xw, values001.z, values010.y), vec4(values000.y, values001.xw, values010.z)); \
- POOL_OP(res.xyzw, res.xyzw, vec4(values000.z, values001.y, values010.xw))
-
-#define POOLING3x3_STRIDE2(res, input_ptr, input_iter) \
- vec4 data000 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0)); \
- vec4 data001 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(4)); \
- float data010 = LOAD(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(8)); \
- vec4 data100 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0)); \
- vec4 data101 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(4)); \
- float data11 = LOAD(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(8)); \
- vec4 data200 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0)); \
- vec4 data201 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(4)); \
- float data21 = LOAD(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(8)); \
- data000 = POW2_OP(data000, 4); \
- data001 = POW2_OP(data001, 4); \
- data010 = POW2_OP(data010, 1); \
- data100 = POW2_OP(data100, 4); \
- data101 = POW2_OP(data101, 4); \
- data11 = POW2_OP(data11, 1); \
- data200 = POW2_OP(data200, 4); \
- data201 = POW2_OP(data201, 4); \
- data21 = POW2_OP(data21, 1); \
- \
- vec4 values000; \
- vec4 values001; \
- vec4 values010; \
- vec4 values100; \
- vec4 values101; \
- vec4 values11; \
- vec4 values200; \
- vec4 values201; \
- vec4 values21; \
- values000.xyzw = data000.xyzz; \
- values001.xyzw = vec4(data000.w, data001.xxy); \
- values010.xyzw = vec4(data001.zzw, data010); \
- values100.xyzw = data100.xyzz; \
- values101.xyzw = vec4(data100.w, data101.xxy); \
- values11.xyzw = vec4(data101.zzw, data11); \
- values200.xyzw = data200.xyzz; \
- values201.xyzw = vec4(data200.w, data201.xxy); \
- values21.xyzw = vec4(data201.zzw, data21); \
- POOL_OP(values000.xyzw, values000.xyzw, values100.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values101.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values11.xyzw); \
- POOL_OP(values000.xyzw, values000.xyzw, values200.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values201.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values21.xyzw); \
- POOL_OP(res.xyzw, vec4(values000.xw, values001.z, values010.y), vec4(values000.y, values001.xw, values010.z)); \
- POOL_OP(res.xyzw, res.xyzw, vec4(values000.z, values001.y, values010.xw))
-
-#define POOLING3x3_STRIDE3(res, input_ptr, input_iter) \
- vec4 data000 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0)); \
- vec4 data001 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(4)); \
- vec4 data010 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(8)); \
- vec4 data100 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0)); \
- vec4 data101 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(4)); \
- vec4 data11 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(8)); \
- vec4 data200 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0)); \
- vec4 data201 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(4)); \
- vec4 data21 = VLOAD4(vec4, input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(8)); \
- data000 = POW2_OP(data000, 4); \
- data001 = POW2_OP(data001, 4); \
- data010 = POW2_OP(data010, 4); \
- data100 = POW2_OP(data100, 4); \
- data101 = POW2_OP(data101, 4); \
- data11 = POW2_OP(data11, 4); \
- data200 = POW2_OP(data200, 4); \
- data201 = POW2_OP(data201, 4); \
- data21 = POW2_OP(data21, 4); \
- \
- POOL_OP(data000.xyzw, data000.xyzw, data100.xyzw); \
- POOL_OP(data001.xyzw, data001.xyzw, data101.xyzw); \
- POOL_OP(data010.xyzw, data010.xyzw, data11.xyzw); \
- POOL_OP(data000.xyzw, data000.xyzw, data200.xyzw); \
- POOL_OP(data001.xyzw, data001.xyzw, data201.xyzw); \
- POOL_OP(data010.xyzw, data010.xyzw, data21.xyzw); \
- POOL_OP(res.xyzw, vec4(data000.xw, data001.z, data010.y), vec4(data000.y, data001.xw, data010.z)); \
- POOL_OP(res.xyzw, res.xyzw, vec4(data000.z, data001.y, data010.xw))
-
-void main(void)
-{
- // Get pixels pointer
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec4 res;
- // Perform pooling 3x3 for 4 output elements
-#if STRIDE_X == 1
- POOLING3x3_STRIDE1(res, src_ptr, src_iter);
-#elif STRIDE_X == 2
- POOLING3x3_STRIDE2(res, src_ptr, src_iter);
-#elif STRIDE_X == 3
- POOLING3x3_STRIDE3(res, src_ptr, src_iter);
-#endif /*STRIDE_X == 1*/
-
- // Divide by pool region in case of average pooling
-#if defined(POOL_AVG) || defined(POOL_L2)
- ivec4 start_x = ((ivec4(int(gl_GlobalInvocationID.x) * 4) + ivec4(0, 1, 2, 3)) * (ivec4(STRIDE_X))) - (ivec4(PAD_X));
- int start_y = int(gl_GlobalInvocationID.y) * STRIDE_Y - PAD_Y;
- ivec4 end_x = min((start_x + (ivec4(3))), (ivec4(MAX_WIDTH)));
- int end_y = min((start_y + 3), MAX_HEIGHT);
-#if defined(EXCLUDE_PADDING)
- start_x = max(ivec4(0), start_x);
- start_y = max(0, start_y);
-#endif /* defined(EXCLUDE_PADDING) */
- res *= (vec4((1.f)) / vec4((ivec4(end_y - start_y)) * (end_x - start_x)));
-#endif /*POOL_AVG*/
-
-#if defined(POOL_L2)
- // Take square root of the result in L2 pooling
- res = SQRT_OP(res);
-#endif /* defined(POOL_L2) */
-
- VSTORE4_CURRENT_ITEM(dst_ptr, dst_iter, res);
-}
-
-#elif defined(POOLING_LAYER_N)
-
-void main(void)
-{
- // Get pixels pointer
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec4 vdata0 = vec4(INITIAL_VALUE);
- vec4 vdata1 = vec4(INITIAL_VALUE);
- float sdata = float(INITIAL_VALUE);
-
- for(int y = 0; y < int(POOL_SIZE); y++)
- {
- int x = 0;
- for(; x <= (int(POOL_SIZE) - 8); x += 8)
- {
- vec4 data2 = VLOAD4(vec4, src_ptr, TENSOR3D_OFFSET(src_iter, x, y, 0));
- vec4 data3 = VLOAD4(vec4, src_ptr, TENSOR3D_OFFSET(src_iter, x, y, 0) + uint(4));
-
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data2 *= data2;
- data3 *= data3;
-#endif /* defined(POOL_L2) */
-
- POOL_OP(vdata0, vdata0, data2);
- POOL_OP(vdata1, vdata1, data3);
- }
-
- // Leftover
- for(; x < int(POOL_SIZE); ++x)
- {
- float data4 = LOAD(src_ptr, TENSOR3D_OFFSET(src_iter, x, y, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data4 *= data4;
-#endif /* defined(POOL_L2) */
- POOL_OP_float(sdata, sdata, data4);
- }
- }
-
- //Reduce result
- vec4 reduce4;
- POOL_OP(reduce4, vdata0.xyzw, vdata1.xyzw);
- vec2 reduce2;
- POOL_OP_vec2(reduce2, reduce4.xy, reduce4.zw);
- float res;
- POOL_OP_float(res, reduce2.x, reduce2.y);
- POOL_OP_float(res, res, sdata);
-
-#if defined(POOL_AVG) || defined(POOL_L2)
- {
- // Divide by pool region in case of average pooling
- int start_x = int(gl_GlobalInvocationID.x) * STRIDE_X - PAD_X;
- int start_y = int(gl_GlobalInvocationID.y) * STRIDE_Y - PAD_Y;
- int end_x = int(min(start_x + POOL_SIZE, MAX_WIDTH));
- int end_y = int(min(start_y + POOL_SIZE, MAX_HEIGHT));
-#if defined(EXCLUDE_PADDING)
- start_x = max(0, start_x);
- start_y = max(0, start_y);
-#endif /* defined(EXCLUDE_PADDING) */
- float res1 = float((end_y - start_y) * (end_x - start_x));
- res = DIV_OP(res, res1);
- }
-#endif /* defined(POOL_AVG) || defined(POOL_L2) */
-
-#if defined(POOL_L2)
- // Take square root of the result in L2 pooling
- res = SQRT_OP(res);
-#endif /* defined(POOL_L2) */
-
- // Store result
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, res);
-}
-#endif // POOLING_LAYER_N
-
-#elif defined(DATA_TYPE_FP16)
-
-vec2 calculate_max(const int, Tensor3DIterator, const int, const int, const int, const int, const int, const int);
-vec2 calculate_avg(const int, Tensor3DIterator, const int, const int, const int, const int, const int, const int);
-
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-
-#if defined(POOL_SIZE)
-// Set the initial value for the pooling operation accordingly with the data type
-#if defined(POOL_AVG) || defined(POOL_L2)
-#define INITIAL_VALUE 0.0f
-#else /* defined(POOL_AVG) || defined(POOL_L2) */
-#define INITIAL_VALUE -65504.0f
-#endif //POOL_AVG
-#endif //POOL_SIZE
-
-vec2 calculate_max(const int pool_size, Tensor3DIterator src_iter, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)
-{
- int start_x1 = int(gl_GlobalInvocationID.x) * stride_x - pad_x;
- int start_y1 = int(gl_GlobalInvocationID.y) * stride_y - pad_y;
- int end_x1 = int(min(start_x1 + pool_size, upper_bound_w));
- int end_y1 = int(min(start_y1 + pool_size, upper_bound_h));
-
- int start_x2 = start_x1 + stride_x;
- int start_y2 = start_y1;
- int end_x2 = int(min(start_x2 + pool_size, upper_bound_w));
- int end_y2 = int(min(start_y2 + pool_size, upper_bound_h));
-
- //Initialize maximum
- vec2 data_max = vec2(0);
-
- //Load and Set initial maximum1
- vec2 data_init1 = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- data_max.x = data_init1.x;
-
- //Load and Set initial maximum2
- if(end_x1 < upper_bound_w)
- {
- if((stride_x % 2) == 0)
- {
- vec2 data_init2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, stride_x, 0, 0));
- data_max.y = data_init2.x;
- }
- else
- {
- vec2 data_init2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, stride_x - 1, 0, 0));
- data_max.y = data_init2.y;
- }
- }
-
- for(int i = 0; (start_y1 + i) < end_y1; i++)
- for(int j = 0; (start_x1 + j) < end_x1; j = j + 2)
- {
- //Calculate maximum1
- if((start_x1 + j + 1) < end_x1)
- {
- vec2 data1 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, j, i, 0));
- float data_mr1;
- POOL_OP_float(data_mr1, data1.x, data1.y);
- POOL_OP_float(data_max.x, data_max.x, data_mr1);
- }
- else
- {
- vec2 data1 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, j, i, 0));
- POOL_OP_float(data_max.x, data_max.x, data1.x);
- }
-
- //Calculate maximum2
- if((start_x2 + j) < end_x2 && end_x1 < upper_bound_w)
- {
- if((stride_x % 2) == 0)
- {
- vec2 data2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (j + stride_x), i, 0));
-
- if((start_x2 + j + 1) < end_x2)
- {
- float data_mr2;
- POOL_OP_float(data_mr2, data2.x, data2.y);
- POOL_OP_float(data_max.y, data_max.y, data_mr2);
- }
- else
- {
- POOL_OP_float(data_max.y, data_max.y, data2.x);
- }
- }
- else
- {
- vec2 data2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (j + stride_x - 1), i, 0));
- vec2 data3 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (j + stride_x + 1), i, 0));
- if((start_x2 + j + 1) < end_x2)
- {
- float data_mr2;
- POOL_OP_float(data_mr2, data3.x, data2.y);
- POOL_OP_float(data_max.y, data_max.y, data_mr2);
- }
- else
- {
- POOL_OP_float(data_max.y, data_max.y, data2.y);
- }
- }
- }
- }
- return data_max;
-}
-
-vec2 calculate_avg(const int pool_size, Tensor3DIterator src_iter, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)
-{
- int start_x1 = (2 * int(gl_GlobalInvocationID.x)) * stride_x - pad_x;
- int start_y1 = int(gl_GlobalInvocationID.y) * stride_y - pad_y;
- int end_x1 = int(min(start_x1 + pool_size, upper_bound_w));
- int end_y1 = int(min(start_y1 + pool_size, upper_bound_h));
-
- int start_x2 = start_x1 + stride_x;
- int start_y2 = start_y1;
- int end_x2 = int(min(start_x2 + pool_size, upper_bound_w));
- int end_y2 = int(min(start_y2 + pool_size, upper_bound_h));
-
- //Initialize sum
- float data_total1 = float(0);
- float data_total2 = float(0);
- for(int i = 0; (start_y1 + i) < end_y1; i++)
- for(int j = 0; (start_x1 + j) < end_x1; j = j + 2)
- {
- vec2 data1 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, j, i, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data1 = POW2_OP(data1, 2);
-#endif /* defined(POOL_L2) */
- //Calculate sum1
- if((start_x1 + j + 1) < end_x1)
- {
- data_total1 = data_total1 + data1.x + data1.y;
- }
- else
- {
- data_total1 = data_total1 + data1.x;
- }
-
- //Calculate sum2
- if((start_x2 + j) < end_x2 && end_x1 <= upper_bound_w)
- {
- if((stride_x % 2) == 0)
- {
- vec2 data2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (j + stride_x), i, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data2 = POW2_OP(data2, 2);
-#endif /* defined(POOL_L2) */
- if((start_x2 + j + 1) < end_x2)
- {
- data_total2 = data_total2 + data2.x + data2.y;
- }
- else
- {
- data_total2 = data_total2 + data2.x;
- }
- }
- else
- {
- vec2 data2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (j + stride_x - 1), i, 0));
- vec2 data3 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (j + stride_x + 1), i, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data2 = POW2_OP(data2, 2);
- data3 = POW2_OP(data3, 2);
-#endif /* defined(POOL_L2) */
- if((start_x2 + j + 1) < end_x2)
- {
- data_total2 = data_total2 + data3.x + data2.y;
- }
- else
- {
- data_total2 = data_total2 + data2.y;
- }
- }
- }
- }
-#if defined(EXCLUDE_PADDING)
- start_x1 = max(0, start_x1);
- start_y1 = max(0, start_y1);
- start_x2 = max(0, start_x2);
- start_y2 = max(0, start_y2);
-#endif /* defined(EXCLUDE_PADDING) */
-
- //Calculate average
- vec2 data_avg;
- data_avg.x = data_total1 / float((end_y1 - start_y1) * (end_x1 - start_x1));
- data_avg.y = data_total2 / float((end_y2 - start_y2) * (end_x2 - start_x2));
-
- return data_avg;
-}
-
-#if defined(POOLING_LAYER_2) || defined(POOLING_LAYER_3) || defined(POOLING_LAYER_7)
-
-#if defined(POOLING_LAYER_2)
-#define POOL_SIZE 2
-#elif defined(POOLING_LAYER_3)
-#define POOL_SIZE 3
-#elif defined(POOLING_LAYER_7)
-#define POOL_SIZE 7
-#else // POOLING_LAYER_n
-#error Please define POOLING_LAYER_N instead.
-#endif // POOLING_LAYER_n
-
-void main(void)
-{
- // Get pixels pointer
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- //Load and calculate data
- vec2 data;
-#if defined(POOL_AVG) || defined(POOL_L2)
- data = calculate_avg(POOL_SIZE, src_iter, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y);
-#else /*POOL_AVG*/
- data = calculate_max(POOL_SIZE, src_iter, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y);
-#endif /*POOL_AVG*/
-
-#if defined(POOL_L2)
- // Take square root of the result in L2 pooling
- data = SQRT_OP(data);
-#endif /* defined(POOL_L2) */
-
- // Store result
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, data);
-}
-
-#elif defined(POOLING_LAYER_3_OPTIMIZED)
-
-#define POOLING3x3_STRIDE1_fp16(res, input_ptr, input_iter) \
- vec4 data00 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0)); \
- vec2 data01 = LOAD_UNPACK2_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(2)); \
- vec4 data10 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0)); \
- vec2 data11 = LOAD_UNPACK2_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(2)); \
- vec4 data20 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0)); \
- vec2 data21 = LOAD_UNPACK2_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(2)); \
- data00 = POW2_OP(data00, 4); \
- data01 = POW2_OP(data01, 2); \
- data10 = POW2_OP(data10, 4); \
- data11 = POW2_OP(data11, 2); \
- data20 = POW2_OP(data20, 4); \
- data21 = POW2_OP(data21, 2); \
- \
- vec4 values000; \
- vec4 values001; \
- vec4 values010; \
- vec4 values100; \
- vec4 values101; \
- vec4 values11; \
- vec4 values200; \
- vec4 values201; \
- vec4 values21; \
- values000.xyzw = data00.xyzy; \
- values001.xyzw = data00.zwzw; \
- values010.x = data01.x; \
- values010.y = data00.w; \
- values010.zw = data01.xy; \
- values100.xyzw = data10.xyzy; \
- values101.xyzw = data10.zwzw; \
- values11.x = data11.x; \
- values11.y = data10.w; \
- values11.zw = data11.xy; \
- values200.xyzw = data20.xyzy; \
- values201.xyzw = data20.zwzw; \
- values21.x = data21.x; \
- values21.y = data20.w; \
- values21.zw = data21.xy; \
- POOL_OP(values000.xyzw, values000.xyzw, values100.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values101.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values11.xyzw); \
- POOL_OP(values000.xyzw, values000.xyzw, values200.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values201.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values21.xyzw); \
- POOL_OP(res.xyzw, vec4(values000.xw, values001.z, values010.y), vec4(values000.y, values001.xw, values010.z)); \
- POOL_OP(res.xyzw, res.xyzw, vec4(values000.z, values001.y, values010.xw))
-
-#define POOLING3x3_STRIDE2_fp16(res, input_ptr, input_iter) \
- vec4 data000; \
- vec4 data001; \
- float data010; \
- vec4 data100; \
- vec4 data101; \
- float data11; \
- vec4 data200; \
- vec4 data201; \
- float data21; \
- vec2 datamiddle0; \
- vec2 datamiddle1; \
- vec2 datamiddle2; \
- data000 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0)); \
- data001 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(2)); \
- datamiddle0 = LOAD_UNPACK2_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(4)); \
- data010 = datamiddle0.x; \
- data100 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0)); \
- data101 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(2)); \
- datamiddle1 = LOAD_UNPACK2_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(4)); \
- data11 = datamiddle1.x; \
- data200 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0)); \
- data201 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(2)); \
- datamiddle2 = LOAD_UNPACK2_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(4)); \
- data21 = datamiddle2.x; \
- data000 = POW2_OP(data000, 4); \
- data001 = POW2_OP(data001, 4); \
- data010 = POW2_OP(data010, 1); \
- data100 = POW2_OP(data100, 4); \
- data101 = POW2_OP(data101, 4); \
- data11 = POW2_OP(data11, 1); \
- data200 = POW2_OP(data200, 4); \
- data201 = POW2_OP(data201, 4); \
- data21 = POW2_OP(data21, 1); \
- \
- vec4 values000; \
- vec4 values001; \
- vec4 values010; \
- vec4 values100; \
- vec4 values101; \
- vec4 values11; \
- vec4 values200; \
- vec4 values201; \
- vec4 values21; \
- values000.xyzw = data000.xyzz; \
- values001.xyzw = vec4(data000.w, data001.xxy); \
- values010.xyzw = vec4(data001.zzw, data010); \
- values100.xyzw = data100.xyzz; \
- values101.xyzw = vec4(data100.w, data101.xxy); \
- values11.xyzw = vec4(data101.zzw, data11); \
- values200.xyzw = data200.xyzz; \
- values201.xyzw = vec4(data200.w, data201.xxy); \
- values21.xyzw = vec4(data201.zzw, data21); \
- POOL_OP(values000.xyzw, values000.xyzw, values100.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values101.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values11.xyzw); \
- POOL_OP(values000.xyzw, values000.xyzw, values200.xyzw); \
- POOL_OP(values001.xyzw, values001.xyzw, values201.xyzw); \
- POOL_OP(values010.xyzw, values010.xyzw, values21.xyzw); \
- POOL_OP(res.xyzw, vec4(values000.xw, values001.z, values010.y), vec4(values000.y, values001.xw, values010.z)); \
- POOL_OP(res.xyzw, res.xyzw, vec4(values000.z, values001.y, values010.xw))
-
-#define POOLING3x3_STRIDE3_fp16(res, input_ptr, input_iter) \
- vec4 data000 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0)); \
- vec4 data001 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(2)); \
- vec4 data010 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 0, 0) + uint(4)); \
- vec4 data100 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0)); \
- vec4 data101 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(2)); \
- vec4 data11 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 1, 0) + uint(4)); \
- vec4 data200 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0)); \
- vec4 data201 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(2)); \
- vec4 data21 = VLOAD2_UNPACK4_HALF(input_ptr, TENSOR3D_OFFSET(input_iter, 0, 2, 0) + uint(4)); \
- data000 = POW2_OP(data000, 4); \
- data001 = POW2_OP(data001, 4); \
- data010 = POW2_OP(data010, 4); \
- data100 = POW2_OP(data100, 4); \
- data101 = POW2_OP(data101, 4); \
- data11 = POW2_OP(data11, 4); \
- data200 = POW2_OP(data200, 4); \
- data201 = POW2_OP(data201, 4); \
- data21 = POW2_OP(data21, 4); \
- \
- POOL_OP(data000.xyzw, data000.xyzw, data100.xyzw); \
- POOL_OP(data001.xyzw, data001.xyzw, data101.xyzw); \
- POOL_OP(data010.xyzw, data010.xyzw, data11.xyzw); \
- POOL_OP(data000.xyzw, data000.xyzw, data200.xyzw); \
- POOL_OP(data001.xyzw, data001.xyzw, data201.xyzw); \
- POOL_OP(data010.xyzw, data010.xyzw, data21.xyzw); \
- POOL_OP(res.xyzw, vec4(data000.xw, data001.z, data010.y), vec4(data000.y, data001.xw, data010.z)); \
- POOL_OP(res.xyzw, res.xyzw, vec4(data000.z, data001.y, data010.xw))
-
-void main(void)
-{
- // Get pixels pointer
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec4 res;
- // Perform pooling 3x3 for 4 output elements
-#if STRIDE_X == 1
- POOLING3x3_STRIDE1_fp16(res, src_ptr, src_iter);
-#elif STRIDE_X == 2
- POOLING3x3_STRIDE2_fp16(res, src_ptr, src_iter);
-#elif STRIDE_X == 3
- POOLING3x3_STRIDE3_fp16(res, src_ptr, src_iter);
-#endif /*STRIDE_X == 1*/
-
- // Divide by pool region in case of average pooling
-#if defined(POOL_AVG) || defined(POOL_L2)
- ivec4 start_x = ((ivec4(int(gl_GlobalInvocationID.x) * 4) + ivec4(0, 1, 2, 3)) * (ivec4(STRIDE_X))) - (ivec4(PAD_X));
- int start_y = int(gl_GlobalInvocationID.y) * STRIDE_Y - PAD_Y;
- ivec4 end_x = min((start_x + (ivec4(3))), (ivec4(MAX_WIDTH)));
- int end_y = min((start_y + 3), MAX_HEIGHT);
-#if defined(EXCLUDE_PADDING)
- start_x = max(ivec4(0), start_x);
- start_y = max(0, start_y);
-#endif /* defined(EXCLUDE_PADDING) */
- res *= (vec4((1.f)) / vec4((ivec4(end_y - start_y)) * (end_x - start_x)));
-#endif /*POOL_AVG*/
-
-#if defined(POOL_L2)
- // Take square root of the result in L2 pooling
- res = SQRT_OP(res);
-#endif /* defined(POOL_L2) */
-
- VSTORE2_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, res);
-}
-
-#elif defined(POOLING_LAYER_N)
-
-void main(void)
-{
- // Get pixels pointer
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec4 vdata00 = vec4(INITIAL_VALUE);
- vec4 vdata01 = vec4(INITIAL_VALUE);
- vec4 vdata10 = vec4(INITIAL_VALUE);
- vec4 vdata11 = vec4(INITIAL_VALUE);
- vec2 sdata = vec2(INITIAL_VALUE);
-
- for(int y = 0; y < int(POOL_SIZE); y++)
- {
- int x = 0;
- for(; x <= (int(POOL_SIZE) - 8); x += 8)
- {
- vec4 data2 = VLOAD2_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x, y, 0));
- vec4 data3 = VLOAD2_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x, y, 0) + uint(2));
-
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data2 *= data2;
- data3 *= data3;
-#endif /* defined(POOL_L2) */
-
- POOL_OP(vdata00, vdata00, data2);
- POOL_OP(vdata10, vdata10, data3);
- }
-
- // Leftover
- for(; x < int(POOL_SIZE); x = x + 2)
- {
- vec2 data4middle = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x, y, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data4middle *= data4middle;
-#endif /* defined(POOL_L2) */
- if((x + 1) >= int(POOL_SIZE))
- {
- POOL_OP_float(sdata.x, sdata.x, data4middle.x);
- }
- else
- {
- float data4;
- POOL_OP_float(data4, data4middle.x, data4middle.y);
- POOL_OP_float(sdata.x, sdata.x, data4);
- }
- }
- }
-
- for(int y = 0; y < int(POOL_SIZE); y++)
- {
- if((STRIDE_X % 2) == 0)
- {
- int x1 = STRIDE_X;
- for(; x1 <= (int(POOL_SIZE + STRIDE_X) - 8); x1 += 8)
- {
- vec4 data2 = VLOAD2_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x1, y, 0));
- vec4 data3 = VLOAD2_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x1, y, 0) + uint(2));
-
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data2 *= data2;
- data3 *= data3;
-#endif /* defined(POOL_L2) */
-
- POOL_OP(vdata01, vdata01, data2);
- POOL_OP(vdata11, vdata11, data3);
- }
-
- // Leftover
- for(; x1 < int(POOL_SIZE + STRIDE_X); x1 = x1 + 2)
- {
- vec2 data4middle;
- data4middle = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x1, y, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data4middle *= data4middle;
-#endif /* defined(POOL_L2) */
- if((x1 + 1) >= int(POOL_SIZE + STRIDE_X))
- {
- POOL_OP_float(sdata.y, sdata.y, data4middle.x);
- }
- else
- {
- float data4;
- POOL_OP_float(data4, data4middle.x, data4middle.y);
- POOL_OP_float(sdata.y, sdata.y, data4);
- }
- }
- }
- else
- {
- vec2 dataorigin2;
- dataorigin2 = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, (STRIDE_X - 1), y, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- dataorigin2.y *= dataorigin2.y;
-#endif /* defined(POOL_L2) */
- POOL_OP_float(sdata.y, sdata.y, dataorigin2.y);
-
- int x1 = STRIDE_X + 1;
- for(; x1 <= (int(POOL_SIZE + STRIDE_X) - 8); x1 += 8)
- {
- vec4 data2 = VLOAD2_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x1, y, 0));
- vec4 data3 = VLOAD2_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x1, y, 0) + uint(2));
-
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data2 *= data2;
- data3 *= data3;
-#endif /* defined(POOL_L2) */
-
- POOL_OP(vdata01, vdata01, data2);
- POOL_OP(vdata11, vdata11, data3);
- }
-
- // Leftover
- for(; x1 < int(POOL_SIZE + STRIDE_X); x1 = x1 + 2)
- {
- vec2 data4middle = LOAD_UNPACK2_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, x1, y, 0));
-#if defined(POOL_L2)
- // Raise to power of 2 for L2 Pooling
- data4middle *= data4middle;
-#endif /* defined(POOL_L2) */
- if((x1 + 1) >= int(POOL_SIZE + STRIDE_X))
- {
- POOL_OP_float(sdata.y, sdata.y, data4middle.x);
- }
- else
- {
- float data4;
- POOL_OP_float(data4, data4middle.x, data4middle.y);
- POOL_OP_float(sdata.y, sdata.y, data4);
- }
- }
- }
- }
-
- //Reduce result
- vec4 reduce40;
- POOL_OP(reduce40, vdata00.xyzw, vdata10.xyzw);
- vec2 reduce20;
- POOL_OP_vec2(reduce20, reduce40.xy, reduce40.zw);
- vec4 reduce41;
- POOL_OP(reduce41, vdata01.xyzw, vdata11.xyzw);
- vec2 reduce21;
- POOL_OP_vec2(reduce21, reduce41.xy, reduce41.zw);
- vec2 data;
- POOL_OP_float(data.x, reduce20.x, reduce20.y);
- POOL_OP_float(data.x, data.x, sdata.x);
- POOL_OP_float(data.y, reduce21.x, reduce21.y);
- POOL_OP_float(data.y, data.y, sdata.y);
-
-#if defined(POOL_AVG) || defined(POOL_L2)
- {
- // Divide by pool region in case of average pooling
- int start_x1 = (2 * int(gl_GlobalInvocationID.x)) * STRIDE_X - PAD_X;
- int start_y1 = int(gl_GlobalInvocationID.y) * STRIDE_Y - PAD_Y;
- int end_x1 = int(min(start_x1 + POOL_SIZE, MAX_WIDTH));
- int end_y1 = int(min(start_y1 + POOL_SIZE, MAX_HEIGHT));
- int start_x2 = start_x1 + STRIDE_X;
- int start_y2 = start_y1;
- int end_x2 = int(min(start_x2 + POOL_SIZE, MAX_WIDTH));
- int end_y2 = int(min(start_y2 + POOL_SIZE, MAX_HEIGHT));
-#if defined(EXCLUDE_PADDING)
- start_x1 = max(0, start_x1);
- start_y1 = max(0, start_y1);
- start_x2 = max(0, start_x2);
- start_y2 = max(0, start_y2);
-#endif /* defined(EXCLUDE_PADDING) */
- vec2 res1;
- res1.x = float((end_y1 - start_y1) * (end_x1 - start_x1));
- res1.y = float((end_y2 - start_y2) * (end_x2 - start_x2));
- data.x = DIV_OP(data.x, res1.x);
- data.y = DIV_OP(data.y, res1.y);
- }
-#endif /* defined(POOL_AVG) || defined(POOL_L2) */
-
-#if defined(POOL_L2)
- // Take square root of the result in L2 pooling
- data = SQRT_OP(data);
-#endif /* defined(POOL_L2) */
-
- // Store result
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, data);
-}
-#endif // POOLING_LAYER_N
-
-#else // DATA_TYPE_FP32
-#error Data type not supported
-#endif // DATA_TYPE_FP32
diff --git a/src/core/GLES_COMPUTE/cs_shaders/scale.cs b/src/core/GLES_COMPUTE/cs_shaders/scale.cs
deleted file mode 100644
index 63be478053..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/scale.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2016-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-// We DO have to use highp for DATA_TYPE_FP16 float here to calculate the coordinates of source tensor. float is highp by default, but we still write it down here to make it more clearly, and mediump is only used for src/dst tensor in shader body.
-precision highp float;
-
-/** Performs an affine transformation on an tensor interpolating with the NEAREAST NEIGHBOUR method. Input and output are single channel FP16.
- *
- * @param[in] src_ptr Pointer to the source tensor. Supported data types: FP16.
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor. Supported data types: FP16. (Must be the same as the input)
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] input_width Input tensor width
- * @param[in] input_height Input tensor height
- * @param[in] scale The scale factor along x/y dimension
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- float input_width;
- float input_height;
- vec2 scale;
-};
-
-#if defined(DATA_TYPE_FP16)
-#if defined(SCALE_NEAREST_GENERIC)
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-
-vec4[2] transform_nearest(vec2 coord, vec2 scale)
-{
- vec4 in_x_coords = vec4(coord.x, 1.f + coord.x, 2.f + coord.x, 3.f + coord.x);
-
- vec4[2] t;
-#if defined(SAMPLING_POLICY_CENTER) /* SAMPLING_POLICY_CENTER */
- t[0] = (in_x_coords + (vec4(0.5f))) * scale.x;
- t[1] = vec4((coord.y + 0.5f) * scale.y);
-#elif defined(SAMPLING_POLICY_TOP_LEFT) /* SAMPLING_POLICY_TOP_LEFT */
- t[0] = in_x_coords * scale.x;
- t[1] = vec4(coord.y) * scale.y;
-#else /* Unsupported sampling policy */
-#error Unsupported sampling policy
-#endif /* SAMPLING_POLICY */
-
- return t;
-}
-
-vec4[2] clamp_to_border_with_size(vec4[2] coords, float width, float height, float border_size)
-{
- vec4[2] c;
- c[0] = clamp(coords[0], 0.0f - border_size, width - 1.f + border_size);
- c[1] = clamp(coords[1], 0.0f - border_size, height - 1.f + border_size);
-
- return c;
-}
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- vec4[2] tc = clamp_to_border_with_size(transform_nearest(vec2(gl_GlobalInvocationID.x << uint(2), gl_GlobalInvocationID.y), scale), input_width, input_height, float(BORDER_SIZE));
-
- mediump vec2 s = vec2(0.0f);
- mediump vec4 d = vec4(0.0f);
-
- for(int i = 0; i < 4; i++)
- {
- uint offset_in_bytes = tensor3D_offset_in_bytes(src_iter, int(tc[0][i]), int(tc[1][i]), int(gl_GlobalInvocationID.z));
-
- s = LOAD_UNPACK2_HALF(src_ptr, uint(offset_in_bytes >> src_shift));
-
- if(offset_in_bytes % uint(4) == uint(0))
- {
- d[i] = s.x;
- }
- else
- {
- d[i] = s.y;
- }
- }
-
- STORE_PACK4_CURRENT_ITEM_HALF(dst_ptr, dst_iter, d);
-}
-#elif defined(SCALE_NEAREST_8X) /* SCALE_NEAREST_GENERIC */
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR_NO_STEP(src_attrs, src_shift);
- Tensor3DIterator dst_iter = CONVERT_TO_TENSOR3D_ITERATOR(dst_attrs, dst_shift);
-
- uvec2 tc = uvec2(gl_GlobalInvocationID.x << uint(2), gl_GlobalInvocationID.y >> uint(1));
-
- mediump vec4 s = vec4(0.0f);
- mediump vec4[2] d;
-
- s = LOAD_UNPACK4_HALF(src_ptr, TENSOR3D_OFFSET(src_iter, int(tc[0]), int(tc[1]), int(gl_GlobalInvocationID.z)));
-
- d[0] = vec4(s.x, s.x, s.y, s.y);
- d[1] = vec4(s.z, s.z, s.w, s.w);
-
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, d);
-}
-#endif /* SCALE_NEAREST_GENERIC */
-
-#else /* DATA_TYPE_FP16 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP16 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/softmax_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/softmax_layer.cs
deleted file mode 100644
index 0293943da1..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/softmax_layer.cs
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-// Common definitions
-#define MAX_OP(x, y) max((x), (y))
-#define ADD_OP(x, y) ((x) + (y))
-#define SUB_OP(x, y) ((x) - (y))
-#define DIV_OP(x, y) ((x) / (y))
-#define EXP_OP(x) exp((x))
-
-const float float_min = -1.0 / 0.0;
-const vec4 vec4_min = vec4(float_min);
-
-#ifdef SOFTMAX_LAYER_MAX
-
-/** Identifies the maximum value across the 1st dimension.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note In case the input is not multiple of 8 NON_MULTIPLE_OF_8 must be passed.
- *
- * @param[in] src_ptr Pointer to the source tensor slice. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[out] dst_ptr Pointer to the destination tensor slice. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[in] width Input image width
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes dst_attrs;
- uint width;
-};
-
-#if defined(DATA_TYPE_FP32)
-
-TENSOR_DECLARATION(1, srcBuffer, vec4[2], src_ptr, src_shift, 5, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- // Initialize local maximum
- vec4 max_val = vec4_min;
-
- // Calculate max of row
- uint width3 = width >> 3;
- for(int i = 0; i < int(width3); i++)
- {
- vec4 data[2] = LOAD(src_ptr, IMAGE_OFFSET(src_iter, i << 3, 0));
- max_val = MAX_OP(data[0], max_val);
- max_val = MAX_OP(data[1], max_val);
- }
-
-#ifdef NON_MULTIPLE_OF_8
- // Handle non multiple of 8
- vec4 data[2] = LOAD(src_ptr, IMAGE_OFFSET(src_iter, width3 << 3, 0));
- int idx = 0;
- if(width >> 2 != width3 << 1)
- {
- max_val = MAX_OP(data[0], max_val);
- idx = 1;
- }
- for(int i = 0; i < int(width) % 4; i++)
- {
- max_val.x = MAX_OP(data[idx][i], max_val.x);
- }
-#endif /* NON_MULTIPLE_OF_8 */
-
- // Perform max reduction
- max_val.xy = MAX_OP(max_val.xy, max_val.zw);
- max_val.x = MAX_OP(max_val.x, max_val.y);
-
- // Store result
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, max_val.x);
-}
-#elif defined(DATA_TYPE_FP16)
-
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uint, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
-
- // Initialize local maximum
- vec4 max_val = vec4_min;
-
- // Calculate max of row
- uint width3 = width >> 3;
- for(int i = 0; i < int(width3); i++)
- {
- vec4 data[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, i << 3, 0));
- max_val = MAX_OP(data[0], max_val);
- max_val = MAX_OP(data[1], max_val);
- }
-
-#ifdef NON_MULTIPLE_OF_8
- // Handle non multiple of 8
- vec4 data[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, width3 << 3, 0));
- int idx = 0;
- if(width >> 2 != width3 << 1)
- {
- max_val = MAX_OP(data[0], max_val);
- idx = 1;
- }
- for(int i = 0; i < int(width) % 4; i++)
- {
- max_val.x = MAX_OP(data[idx][i], max_val.x);
- }
-#endif /* NON_MULTIPLE_OF_8 */
-
- // Perform max reduction
- max_val.xy = MAX_OP(max_val.xy, max_val.zw);
- max_val.x = MAX_OP(max_val.x, max_val.y);
-
- STORE_PACK2_CURRENT_ITEM_HALF(dst_ptr, dst_iter, max_val.xy);
-}
-#else // DATA_TYPE_FP32
-#error Data type not supported
-#endif // DATA_TYPE_FP32
-#elif defined(SOFTMAX_LAYER_SHIFT_EXP_SUM)
-
-/** Shifts the values of the input tensor by the max calculated in softmax_layer_max kernel,
- * then gets the exponent of each element as sums all elements across each row.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note In case the input is not multiple of 8 NON_MULTIPLE_OF_8 must be passed.
- *
- * @param[in] src_ptr Pointer to the source tensor slice. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[in] max_ptr Pointer to the max values tensor slice. Supported data types: same as @p src_ptr
- * @param[in] max_attrs The attributes of the max values tensor
- * @param[out] dst_ptr Pointer to the destination tensor slice. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- * @param[out] sum_ptr Pointer to the sum values tensor slice. Supported data types: same as @p src_ptr
- * @param[in] sum_attrs The attributes of the sum values tensor
- * @param[in] width Input image width
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes max_attrs;
- Tensor3DAttributes dst_attrs;
- Tensor3DAttributes sum_attrs;
- uint width;
-};
-#if defined(DATA_TYPE_FP32)
-
-TENSOR_DECLARATION(1, srcBuffer, vec4[2], src_ptr, src_shift, 5, readonly);
-TENSOR_DECLARATION(2, maxBuffer, float, max_ptr, max_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, vec4[2], dst_ptr, dst_shift, 5, writeonly);
-TENSOR_DECLARATION(4, sumBuffer, float, sum_ptr, sum_shift, 2, writeonly);
-
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
- ImageIterator max_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(max_attrs, max_shift);
- ImageIterator sum_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(sum_attrs, sum_shift);
-
- // Load max value of 1D logits vector (row)
- vec4 max_val = vec4(LOAD_CURRENT_ITEM(max_ptr, max_iter));
-
- // Set sum vector
- vec4 sum1D = vec4(0);
-
- // Shift values, exp and sum
- uint width3 = width >> 3;
- for(int i = 0; i < int(width3); i++)
- {
- vec4 data[2];
- data = LOAD(src_ptr, IMAGE_OFFSET(src_iter, i << 3, 0));
- data[0] = SUB_OP(data[0], max_val);
- data[1] = SUB_OP(data[1], max_val);
- data[0] = EXP_OP(data[0]);
- data[1] = EXP_OP(data[1]);
- STORE(dst_ptr, IMAGE_OFFSET(dst_iter, i << 3, 0), data);
- sum1D = ADD_OP(sum1D, data[0]);
- sum1D = ADD_OP(sum1D, data[1]);
- }
-
-#ifdef NON_MULTIPLE_OF_8
- // Handle non multiple of 8
- vec4 data[2] = LOAD(src_ptr, IMAGE_OFFSET(src_iter, width3 << 3, 0));
- int idx = 0;
- if(width >> 2 != width3 << 1)
- {
- data[0] = SUB_OP(data[0], max_val);
- data[0] = EXP_OP(data[0]);
- sum1D = ADD_OP(sum1D, data[0]);
- idx = 1;
- }
- for(int i = 0; i < int(width) % 4; i++)
- {
- data[idx][i] = SUB_OP(data[idx][i], max_val.x);
- data[idx][i] = EXP_OP(data[idx][i]);
- sum1D.x = ADD_OP(sum1D.x, data[idx][i]);
- }
- STORE(dst_ptr, IMAGE_OFFSET(dst_iter, width3 << 3, 0), data);
-#endif /* NON_MULTIPLE_OF_8 */
-
- // Perform min/max reduction
- sum1D.xy = ADD_OP(sum1D.xy, sum1D.zw);
- sum1D.x = ADD_OP(sum1D.x, sum1D.y);
-
- // Calculate and store result
- STORE_CURRENT_ITEM(sum_ptr, sum_iter, sum1D.x);
-}
-#elif defined(DATA_TYPE_FP16)
-
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, maxBuffer, uint, max_ptr, max_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-TENSOR_DECLARATION(4, sumBuffer, uint, sum_ptr, sum_shift, 2, writeonly);
-
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
- ImageIterator max_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(max_attrs, max_shift);
- ImageIterator sum_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(sum_attrs, sum_shift);
-
- // Load max value of 1D logits vector (row)
- vec2 datamaxinit = LOAD_UNPACK2_CURRENT_ITEM_HALF(max_ptr, max_iter);
- vec4 max_val = vec4(datamaxinit.x);
-
- // Set sum vector
- vec4 sum1D = vec4(0.f);
-
- // Shift values, exp and sum
- uint width3 = width >> 3;
- for(int i = 0; i < int(width3); i++)
- {
- vec4 data[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, i << 3, 0));
- data[0] = SUB_OP(data[0], max_val);
- data[1] = SUB_OP(data[1], max_val);
- data[0] = EXP_OP(data[0]);
- data[1] = EXP_OP(data[1]);
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, i << 3, 0), data);
- sum1D = ADD_OP(sum1D, data[0]);
- sum1D = ADD_OP(sum1D, data[1]);
- }
-
-#ifdef NON_MULTIPLE_OF_8
- // Handle non multiple of 8
- vec4 data[2] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, width3 << 3, 0));
- int idx = 0;
- if(width >> 2 != width3 << 1)
- {
- data[0] = SUB_OP(data[0], max_val);
- data[0] = EXP_OP(data[0]);
- sum1D = ADD_OP(sum1D, data[0]);
- idx = 1;
- }
- for(int i = 0; i < int(width) % 4; i++)
- {
- data[idx][i] = SUB_OP(data[idx][i], max_val.x);
- data[idx][i] = EXP_OP(data[idx][i]);
- sum1D.x = ADD_OP(sum1D.x, data[idx][i]);
- }
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, width3 << 3, 0), data);
-#endif /* NON_MULTIPLE_OF_8 */
- // Perform min/max reduction
- sum1D.xy = ADD_OP(sum1D.xy, sum1D.zw);
- sum1D.x = ADD_OP(sum1D.x, sum1D.y);
-
- // Calculate and store result
- STORE_PACK2_CURRENT_ITEM_HALF(sum_ptr, sum_iter, sum1D.xy);
-}
-#else // DATA_TYPE_FP32
-#error Data type not supported
-#endif // DATA_TYPE_FP32
-#elif defined(SOFTMAX_LAYER_NORM)
-
-/** Divides all the values of the input tensor by the sum calculated from softmax_layer_shift_exp_sum kernel.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- *
- * @param[in] src_ptr Pointer to the source tensor slice. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[in] sum_ptr Pointer to the sum values tensor slice. Supported data types: same as @p src_ptr
- * @param[in] sum_attrs The attributes of the sum values tensor
- * @param[out] dst_ptr Pointer to the destination tensor slice. Supported data types: same as @p src_ptr
- * @param[in] dst_attrs The attributes of the destination tensor
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- Tensor3DAttributes sum_attrs;
- Tensor3DAttributes dst_attrs;
-};
-#if defined(DATA_TYPE_FP32)
-TENSOR_DECLARATION(1, srcBuffer, vec4[2], src_ptr, src_shift, 5, readonly);
-TENSOR_DECLARATION(2, sumBuffer, float, sum_ptr, sum_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, vec4[2], dst_ptr, dst_shift, 5, writeonly);
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
- ImageIterator sum_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(sum_attrs, sum_shift);
-
- // Load max value of 1D logits vector (row)
- vec4 sum_val = vec4(LOAD(sum_ptr, IMAGE_OFFSET(sum_iter, 0, gl_GlobalInvocationID.y)));
-
- vec4 data[2] = LOAD_CURRENT_ITEM(src_ptr, src_iter);
- data[0] = DIV_OP(data[0], sum_val);
- data[1] = DIV_OP(data[1], sum_val);
- STORE_CURRENT_ITEM(dst_ptr, dst_iter, data);
-}
-#elif defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, sumBuffer, uint, sum_ptr, sum_shift, 2, readonly);
-TENSOR_DECLARATION(3, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR(dst_attrs, dst_shift);
- ImageIterator sum_iter = CONVERT_TENSOR3D_TO_IMAGE_ITERATOR_NO_STEP(sum_attrs, sum_shift);
-
- // Load max value of 1D logits vector (row)
- vec4 sum_val = vec4(LOAD_UNPACK2_HALF(sum_ptr, IMAGE_OFFSET(sum_iter, 0, gl_GlobalInvocationID.y)).x);
-
- vec4 data[2] = LOAD_UNPACK8_CURRENT_ITEM_HALF(src_ptr, src_iter);
- data[0] = DIV_OP(data[0], sum_val);
- data[1] = DIV_OP(data[1], sum_val);
- STORE_PACK8_CURRENT_ITEM_HALF(dst_ptr, dst_iter, data);
-}
-#else // DATA_TYPE_FP32
-#error Data type not supported
-#endif // DATA_TYPE_FP32
-#endif // SOFTMAX_LAYER_MAX
diff --git a/src/core/GLES_COMPUTE/cs_shaders/tensor_shift.cs b/src/core/GLES_COMPUTE/cs_shaders/tensor_shift.cs
deleted file mode 100644
index cd2dcdeb5b..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/tensor_shift.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-/** This kernel performs a shift to move "pad_x" columns to the right.
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note The width must be passed at compile time using "#define WIDTH n" e.g. "#define WIDTH 1"
- *
- * @param[in,out] src_ptr Pointer to the source tensor slice. Supported data types: F16/F32
- * @param[in] src_attrs The attributes of the source tensor
- * @param[in] pad_x The padding of the source tensor in x dimension
- */
-SHADER_PARAMS_DECLARATION
-{
- Tensor3DAttributes src_attrs;
- uint pad_x;
-};
-
-#if defined(DATA_TYPE_FP16)
-TENSOR_DECLARATION(1, srcBuffer, uint, src_ptr, src_shift, 2, restrict);
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
- int n = int(pad_x) % 2;
-
- if(n == 1)
- {
- int i = 0;
- if((WIDTH % 2) == 1)
- {
- i = WIDTH + int(pad_x) - 2;
- }
- else
- {
- vec2 s0_end = LOAD_UNPACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (WIDTH - 2))));
- vec2 s_end = vec2(s0_end.y, 0.f);
- STORE_PACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (WIDTH + int(pad_x) - 1))), s_end);
- i = WIDTH + int(pad_x) - 3;
- }
- for(; i >= (int(pad_x) + 1); i = i - 2)
- {
- vec2 s0 = LOAD_UNPACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (i - int(pad_x) - 1))));
- vec2 s1 = LOAD_UNPACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (i - int(pad_x) + 1))));
- vec2 s = vec2(s0.y, s1.x);
- STORE_PACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * i)), s);
- }
- for(int j = 0; j < (int(pad_x) - 1); j = j + 2)
- {
- vec2 s_origin = vec2(0.f);
- STORE_PACK2_CURRENT_ITEM_HALF(src_ptr, src_iter, s_origin);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, 4);
- }
- vec2 s0_origin = LOAD_UNPACK2_CURRENT_ITEM_HALF(src_ptr, src_iter);
- vec2 s_origin = vec2(0.f, s0_origin.x);
- STORE_PACK2_CURRENT_ITEM_HALF(src_ptr, src_iter, s_origin);
- }
- else
- {
- int i = 0;
- if((WIDTH % 2) == 0)
- {
- i = WIDTH + int(pad_x) - 2;
- }
- else
- {
- vec2 s0_end = LOAD_UNPACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (WIDTH - 1))));
- vec2 s_end = vec2(s0_end.x, 0.f);
- STORE_PACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (WIDTH + int(pad_x) - 1))), s_end);
- i = WIDTH + int(pad_x) - 3;
- }
- for(; i >= (int(pad_x)); i = i - 2)
- {
- vec2 s = LOAD_UNPACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * (i - int(pad_x)))));
- STORE_PACK2_HALF(src_ptr, TENSOR_OFFSET_ADVANCE_IN_BYTES(src_iter, (2 * i)), s);
- }
- for(int j = 0; j < int(pad_x); j = j + 2)
- {
- vec2 s = vec2(0.f);
- STORE_PACK2_CURRENT_ITEM_HALF(src_ptr, src_iter, s);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, 4);
- }
- }
-}
-#elif defined(DATA_TYPE_FP32)
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, restrict);
-
-void main()
-{
- Tensor3DIterator src_iter = CONVERT_TO_TENSOR3D_ITERATOR(src_attrs, src_shift);
-
- for(int i = (WIDTH + int(pad_x) - 1); i >= int(pad_x); i--)
- {
- float sorigin = LOAD(src_ptr, TENSOR_OFFSET_ADVANCE(src_iter, (i - int(pad_x))));
- STORE(src_ptr, TENSOR_OFFSET_ADVANCE(src_iter, i), sorigin);
- }
- for(int j = 0; j < int(pad_x); j++)
- {
- STORE_CURRENT_ITEM(src_ptr, src_iter, 0.f);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(src_iter, 4);
- }
-}
-#else /* DATA_TYPE_FP16 */
-#error Data type not supported
-#endif /* DATA_TYPE_FP16 */
diff --git a/src/core/GLES_COMPUTE/cs_shaders/transpose.cs b/src/core/GLES_COMPUTE/cs_shaders/transpose.cs
deleted file mode 100755
index 72ade20c80..0000000000
--- a/src/core/GLES_COMPUTE/cs_shaders/transpose.cs
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 2017, 2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-layout(local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;
-
-#include "helpers_cs.h"
-
-#if defined(DATA_TYPE_FP16)
-precision mediump float;
-#endif // DATA_TYPE_FP16
-
-#define SWAP_ROW_func(u0, l0) \
- { \
- tmp_swap = u0; \
- u0 = l0; \
- l0 = tmp_swap; \
- }
-
-#define SWAP_4x4_func(u0, u1, u2, u3, l0, l1, l2, l3) \
- { \
- vec4 tmp_swap; \
- SWAP_ROW_func(u0, l0); \
- SWAP_ROW_func(u1, l1); \
- SWAP_ROW_func(u2, l2); \
- SWAP_ROW_func(u3, l3); \
- }
-
-#define TRANSPOSE_4x4_func(u0, u1, u2, u3) \
- { \
- mat4x4 matin, matout; \
- matin[0] = u0; \
- matin[1] = u1; \
- matin[2] = u2; \
- matin[3] = u3; \
- matout = transpose(matin); \
- u0 = matout[0]; \
- u1 = matout[1]; \
- u2 = matout[2]; \
- u3 = matout[3]; \
- }
-
-/** This OpenGL ES kernel computes the matrix transposition of input matrix
- *
- * @note The data type must be passed at compile time using "#define DATA_TYPE_NAME". e.g. "#define DATA_TYPE_FP32"
- * @note Optimization name must be passed using "#define OPTIMIZATION_NAME" for F16. e.g. "#define TRANSPOSE_8X8"
- *
- * @param[in] src_ptr Pointer to the source matrix. Supported data types: F32/F16
- * @param[in] src_attrs The attributes of the source matrix
- * @param[out] dst_ptr Pointer to the destination matrix Supported data type: same as src_ptr
- * @param[in] dst_attrs The attributes of the destination matrix
- */
-SHADER_PARAMS_DECLARATION
-{
- ImageAttributes src_attrs;
- ImageAttributes dst_attrs;
-};
-
-#ifdef DATA_TYPE_FP32
-TENSOR_DECLARATION(1, srcBuffer, float, src_ptr, src_shift, 2, readonly);
-TENSOR_DECLARATION(2, dstBuffer, float, dst_ptr, dst_shift, 2, writeonly);
-
-void main(void)
-{
- // compute source address
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- // load the NxN block at (x, y)
- vec4 u0 = VLOAD4(vec4, src_ptr, IMAGE_OFFSET(src_iter, 0, 0));
- vec4 u1 = VLOAD4(vec4, src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- vec4 u2 = VLOAD4(vec4, src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- vec4 u3 = VLOAD4(vec4, src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
-
- // transpose the block
- TRANSPOSE_4x4_func(u0, u1, u2, u3);
-
- // store the block at (y, x)
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, uint(16) * uint(gl_GlobalInvocationID.y) + uint(4) * uint(gl_GlobalInvocationID.x) * (dst_attrs.stride_y));
-
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 0), u0);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), u1);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), u2);
- VSTORE4(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), u3);
-}
-
-#elif defined(DATA_TYPE_FP16) /* DATA_TYPE_FP16 */
-
-#if defined(TRANSPOSE_4X4)
-TENSOR_DECLARATION(1, srcBuffer, uvec2, src_ptr, src_shift, 3, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec2, dst_ptr, dst_shift, 3, writeonly);
-
-void main(void)
-{
- // compute source address
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- // load the NxN block at (x, y)
- vec4 u0 = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 0));
- vec4 u1 = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 1));
- vec4 u2 = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 2));
- vec4 u3 = LOAD_UNPACK4_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, 3));
-
- // transpose the block
- TRANSPOSE_4x4_func(u0, u1, u2, u3);
-
- // store the block at (y, x)
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, uint(8) * uint(gl_GlobalInvocationID.y) + uint(gl_GlobalInvocationID.x) * (dst_attrs.step_y));
-
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 0), u0);
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 1), u1);
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 2), u2);
- STORE_PACK4_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, 3), u3);
-}
-
-#elif defined(TRANSPOSE_8X8) /* TRANSPOSE_8X8 */
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main(void)
-{
- // compute source address
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- vec4 u[8][2];
-
- for(int i = 0; i < 8; i++)
- {
- u[i] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, i));
- }
-
- // transpose the block
- TRANSPOSE_4x4_func(u[0][0], u[1][0], u[2][0], u[3][0]);
- TRANSPOSE_4x4_func(u[0][1], u[1][1], u[2][1], u[3][1]);
- TRANSPOSE_4x4_func(u[4][0], u[5][0], u[6][0], u[7][0]);
- TRANSPOSE_4x4_func(u[4][1], u[5][1], u[6][1], u[7][1]);
- SWAP_4x4_func(u[0][1], u[1][1], u[2][1], u[3][1], u[4][0], u[5][0], u[6][0], u[7][0]);
-
- // store the block at (y, x)
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, uint(16) * uint(gl_GlobalInvocationID.y) + uint(gl_GlobalInvocationID.x) * (dst_attrs.step_y));
-
- for(int i = 0; i < 8; i++)
- {
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, i), u[i]);
- }
-}
-
-#elif defined(TRANSPOSE_8X8_SQUARE) /* TRANSPOSE_8x8_SQUARE */
-TENSOR_DECLARATION(1, srcBuffer, uvec4, src_ptr, src_shift, 4, readonly);
-TENSOR_DECLARATION(2, dstBuffer, uvec4, dst_ptr, dst_shift, 4, writeonly);
-
-void main(void)
-{
- ImageIterator src_iter = CONVERT_TO_IMAGE_ITERATOR(src_attrs, src_shift);
- ImageIterator dst_iter = CONVERT_TO_IMAGE_ITERATOR_NO_STEP(dst_attrs, dst_shift);
-
- if(gl_GlobalInvocationID.x <= gl_GlobalInvocationID.y)
- {
- uint blk1_offset_in_bytes = CURRENT_ITEM_OFFSET_IN_BYTES(src_iter);
- TENSOR_ITERATOR_ADVANCE_IN_BYTES(dst_iter, uint(16) * uint(gl_GlobalInvocationID.y) + uint(gl_GlobalInvocationID.x) * (dst_attrs.step_y));
- uint blk2_offset_in_bytes = CURRENT_ITEM_OFFSET_IN_BYTES(dst_iter);
-
- // load block1
- vec4 u1[8][2];
-
- SET_TENSOR_ITERATOR_OFFSET_IN_BYTES(src_iter, blk1_offset_in_bytes);
- for(int i = 0; i < 8; i++)
- {
- u1[i] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, i));
- }
-
- // transpose block1
- TRANSPOSE_4x4_func(u1[0][0], u1[1][0], u1[2][0], u1[3][0]);
- TRANSPOSE_4x4_func(u1[0][1], u1[1][1], u1[2][1], u1[3][1]);
- TRANSPOSE_4x4_func(u1[4][0], u1[5][0], u1[6][0], u1[7][0]);
- TRANSPOSE_4x4_func(u1[4][1], u1[5][1], u1[6][1], u1[7][1]);
- SWAP_4x4_func(u1[0][1], u1[1][1], u1[2][1], u1[3][1], u1[4][0], u1[5][0], u1[6][0], u1[7][0]);
-
- // write to block2
- SET_TENSOR_ITERATOR_OFFSET_IN_BYTES(dst_iter, blk2_offset_in_bytes);
- for(int i = 0; i < 8; i++)
- {
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, i), u1[i]);
- }
-
- // load block2
- vec4 u2[8][2];
-
- SET_TENSOR_ITERATOR_OFFSET_IN_BYTES(src_iter, blk2_offset_in_bytes);
- for(int i = 0; i < 8; i++)
- {
- u2[i] = LOAD_UNPACK8_HALF(src_ptr, IMAGE_OFFSET(src_iter, 0, i));
- }
-
- // transpose block2
- TRANSPOSE_4x4_func(u2[0][0], u2[1][0], u2[2][0], u2[3][0]);
- TRANSPOSE_4x4_func(u2[0][1], u2[1][1], u2[2][1], u2[3][1]);
- TRANSPOSE_4x4_func(u2[4][0], u2[5][0], u2[6][0], u2[7][0]);
- TRANSPOSE_4x4_func(u2[4][1], u2[5][1], u2[6][1], u2[7][1]);
- SWAP_4x4_func(u2[0][1], u2[1][1], u2[2][1], u2[3][1], u2[4][0], u2[5][0], u2[6][0], u2[7][0]);
-
- // write to block1
- SET_TENSOR_ITERATOR_OFFSET_IN_BYTES(dst_iter, blk1_offset_in_bytes);
- for(int i = 0; i < 8; i++)
- {
- STORE_PACK8_HALF(dst_ptr, IMAGE_OFFSET(dst_iter, 0, i), u2[i]);
- }
- }
-}
-
-#endif /* TRANSPOSE_4X4 */
-
-#endif /* DATA_TYPE_FP32 */
diff --git a/src/core/GLES_COMPUTE/egl_entries.in b/src/core/GLES_COMPUTE/egl_entries.in
deleted file mode 100644
index 2fff31530d..0000000000
--- a/src/core/GLES_COMPUTE/egl_entries.in
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-EGL_ENTRY(eglGetProcAddress)
-EGL_ENTRY(eglBindAPI)
-EGL_ENTRY(eglChooseConfig)
-EGL_ENTRY(eglCreateContext)
-EGL_ENTRY(eglDestroyContext)
-EGL_ENTRY(eglGetDisplay)
-EGL_ENTRY(eglInitialize)
-EGL_ENTRY(eglMakeCurrent)
-EGL_ENTRY(eglTerminate)
-EGL_ENTRY(eglGetError)
-EGL_ENTRY(eglQueryString)
diff --git a/src/core/GLES_COMPUTE/gl_entries.in b/src/core/GLES_COMPUTE/gl_entries.in
deleted file mode 100644
index 80bdb91557..0000000000
--- a/src/core/GLES_COMPUTE/gl_entries.in
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-GL_ENTRY(glAttachShader)
-GL_ENTRY(glCompileShader)
-GL_ENTRY(glCreateProgram)
-GL_ENTRY(glCreateShader)
-GL_ENTRY(glDeleteProgram)
-GL_ENTRY(glDeleteShader)
-GL_ENTRY(glDetachShader)
-GL_ENTRY(glGetProgramInfoLog)
-GL_ENTRY(glGetProgramiv)
-GL_ENTRY(glGetShaderInfoLog)
-GL_ENTRY(glGetShaderiv)
-GL_ENTRY(glLinkProgram)
-GL_ENTRY(glShaderSource)
-GL_ENTRY(glUseProgram)
-GL_ENTRY(glBindBuffer)
-GL_ENTRY(glBindBufferBase)
-GL_ENTRY(glBufferData)
-GL_ENTRY(glDeleteBuffers)
-GL_ENTRY(glDispatchCompute)
-GL_ENTRY(glFlush)
-GL_ENTRY(glGenBuffers)
-GL_ENTRY(glGetProgramResourceIndex)
-GL_ENTRY(glGetUniformLocation)
-GL_ENTRY(glMapBufferRange)
-GL_ENTRY(glMemoryBarrier)
-GL_ENTRY(glUniform1ui)
-GL_ENTRY(glUnmapBuffer)
-GL_ENTRY(glGetError)
-GL_ENTRY(glGetActiveUniformBlockiv)
-GL_ENTRY(glUniformBlockBinding)
-GL_ENTRY(glGetUniformBlockIndex)
-GL_ENTRY(glGenTextures)
-GL_ENTRY(glDeleteTextures)
-GL_ENTRY(glBindTexture)
-GL_ENTRY(glTexImage2D)
-GL_ENTRY(glGenFramebuffers)
-GL_ENTRY(glDeleteFramebuffers)
-GL_ENTRY(glBindFramebuffer)
-GL_ENTRY(glFramebufferTexture2D)
-GL_ENTRY(glGetString)
diff --git a/src/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.cpp
deleted file mode 100644
index 5e8accc95d..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-GCAbsoluteDifferenceKernel::GCAbsoluteDifferenceKernel()
- : _input1(nullptr), _input2(nullptr), _output(nullptr)
-{
-}
-
-void GCAbsoluteDifferenceKernel::configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input1, 1, DataType::U8);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input2, 1, DataType::U8);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::U8);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input1, input2, output);
-
- _input1 = input1;
- _input2 = input2;
- _output = output;
-
- constexpr unsigned int num_elems_processed_per_iteration = 4;
-
- // Set kernel build options
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("absdiff", build_opts));
-
- // Configure kernel window
- Window win = calculate_max_window(*input1->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowRectangle input1_access(input1->info(), 0, 0, 4, 1);
- AccessWindowRectangle input2_access(input2->info(), 0, 0, 4, 1);
- AccessWindowRectangle output_access(output->info(), 0, 0, 4, 1);
-
- update_window_and_padding(win, input1_access, input2_access, output_access);
-
- ValidRegion valid_region = intersect_valid_regions(input1->info()->valid_region(),
- input2->info()->valid_region());
-
- output_access.set_valid_region(win, valid_region);
-
- IGCKernel::configure(win);
-}
-
-void GCAbsoluteDifferenceKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_2D();
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1; // SSBO binding starts from 1.
- add_2D_tensor_argument(idx, _input1, binding++, slice);
- add_2D_tensor_argument(idx, _input2, binding++, slice);
- add_2D_tensor_argument(idx, _output, binding++, slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_2D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp
deleted file mode 100644
index 0173b81cf8..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/IAccessWindow.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-GCActivationLayerKernel::GCActivationLayerKernel(GCCoreRuntimeContext *ctx)
- : _input(nullptr), _output(nullptr), _ctx(ctx)
-{
-}
-
-void GCActivationLayerKernel::configure(IGCTensor *input, IGCTensor *output, ActivationLayerInfo act_info)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
-
- // Make sure _kernel is initialized before calling the parent's configure
- _input = input;
- _output = input;
-
- if(output != nullptr)
- {
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- _output = output;
- }
-
- unsigned int num_elems_processed_per_iteration = 4 / input->info()->element_size();
-
- // Set build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + string_from_activation_func(act_info.activation())));
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace(("#define A_VAL " + float_to_string_with_full_precision(act_info.a())));
- build_opts.emplace(("#define B_VAL " + float_to_string_with_full_precision(act_info.b())));
- build_opts.emplace(("#define LOCAL_SIZE_X " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1)));
-
- // Create kernel
- _kernel = create_opengl_kernel(_ctx, "activation_layer", build_opts);
-
- // Configure kernel window
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration));
-
- if(output != nullptr)
- {
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win,
- AccessWindowHorizontal(input->info(), 0, num_elems_processed_per_iteration),
- output_access);
-
- output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape()));
- }
- else
- {
- update_window_and_padding(win,
- AccessWindowHorizontal(input->info(), 0, num_elems_processed_per_iteration));
- }
-
- IGCKernel::configure(win);
-}
-
-void GCActivationLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window collapsed = window.collapse_if_possible(IGCKernel::window(), Window::DimZ);
- Window slice = collapsed.first_slice_window_3D();
- Window slice_in = collapsed.first_slice_window_3D();
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- if(_input == _output)
- {
- slice_in.shift(Window::DimX, -(_input->info()->padding()).left);
- }
-
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1;
- add_3D_tensor_argument(idx, _input, binding++, slice);
- add_3D_tensor_argument(idx, _output, binding++, slice_in);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(collapsed.slide_window_slice_3D(slice) && collapsed.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.cpp
deleted file mode 100644
index f31c8ca156..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2016-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/IAccessWindow.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <cstddef>
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-namespace
-{
-Status validate_arguments(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy)
-{
- ARM_COMPUTE_UNUSED(policy);
- ARM_COMPUTE_ERROR_ON_NULLPTR(input1, input2, output);
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input1, 1, DataType::F16);
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input2, 1, DataType::F16);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input1, input2);
-
- // Validate in case of configured output
- if((output != nullptr) && (output->total_size() != 0))
- {
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::F16);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input1, output);
- }
-
- return Status{};
-}
-
-std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output)
-{
- constexpr unsigned int num_elems_processed_per_iteration = 8;
-
- Window win = calculate_max_window(*input1, Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input1_access(input1, 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal input2_access(input2, 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output, 0, num_elems_processed_per_iteration);
-
- bool window_changed = update_window_and_padding(win, input1_access, input2_access, output_access);
-
- ValidRegion valid_region = intersect_valid_regions(input1->valid_region(),
- input2->valid_region());
-
- output_access.set_valid_region(win, valid_region);
-
- Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
- return std::make_pair(err, win);
-}
-} // namespace
-
-GCArithmeticAdditionKernel::GCArithmeticAdditionKernel()
- : _input1(nullptr), _input2(nullptr), _output(nullptr)
-{
-}
-
-void GCArithmeticAdditionKernel::configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, ConvertPolicy policy)
-{
- ARM_COMPUTE_UNUSED(policy);
- ARM_COMPUTE_ERROR_ON_NULLPTR(input1, input2, output);
-
- // Auto initialize output if not initialized
- {
- set_shape_if_empty(*output->info(), input1->info()->tensor_shape());
- set_format_if_unknown(*output->info(), Format::F16);
- }
-
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input1->info(), input2->info(), output->info(), policy));
-
- _input1 = input1;
- _input2 = input2;
- _output = output;
-
- // Set kernel build options
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("arithmetic_add", build_opts));
-
- // Configure kernel window
- auto win_config = validate_and_configure_window(input1->info(), input2->info(), output->info());
- ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
- IGCKernel::configure(win_config.second);
-}
-
-Status GCArithmeticAdditionKernel::validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy)
-{
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input1, input2, output, policy));
- ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input1->clone().get(), input2->clone().get(), output->clone().get()).first);
-
- return Status{};
-}
-
-void GCArithmeticAdditionKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window slice = window.first_slice_window_3D();
- Window slice_in = window.first_slice_window_3D();
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1; // SSBO binding starts from 1.
- add_3D_tensor_argument(idx, _input1, binding++, slice_in);
- add_3D_tensor_argument(idx, _input2, binding++, slice_in);
- add_3D_tensor_argument(idx, _output, binding++, slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice) && window.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp
deleted file mode 100644
index 9281ce5ffb..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-namespace
-{
-Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output,
- const ITensorInfo *mean, const ITensorInfo *var,
- const ITensorInfo *beta, const ITensorInfo *gamma,
- float epsilon, ActivationLayerInfo act_info)
-{
- ARM_COMPUTE_UNUSED(epsilon);
- ARM_COMPUTE_UNUSED(var);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, mean, var);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(mean, var);
-
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- }
-
- if(beta != nullptr)
- {
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(mean, beta);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, beta);
- }
- if(gamma != nullptr)
- {
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(mean, gamma);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, gamma);
- }
- if(act_info.enabled())
- {
- ARM_COMPUTE_ERROR_ON(input->data_type() != DataType::F32 && input->data_type() != DataType::F16);
- ARM_COMPUTE_ERROR_ON(act_info.activation() != ActivationLayerInfo::ActivationLayerInfo::ActivationFunction::RELU
- && act_info.activation() != ActivationLayerInfo::ActivationLayerInfo::ActivationFunction::BOUNDED_RELU
- && act_info.activation() != ActivationLayerInfo::ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU);
- ARM_COMPUTE_ERROR_ON(act_info.b() > act_info.a());
- }
- return Status{};
-}
-
-std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output,
- ITensorInfo *mean, ITensorInfo *var,
- ITensorInfo *beta, ITensorInfo *gamma)
-{
- // Output tensor auto initialization if not yet initialized
- auto_init_if_empty(*output, input->tensor_shape(), 1, input->data_type());
-
- unsigned int num_elems_processed_per_iteration = 1;
- if(input->data_type() == DataType::F16)
- {
- num_elems_processed_per_iteration = 4;
- }
-
- // Configure kernel window
- Window win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input_access(input, 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output, 0, num_elems_processed_per_iteration);
- AccessWindowStatic mean_access(mean, 0, 0, mean->dimension(0) + 3, mean->dimension(1));
- AccessWindowStatic var_access(var, 0, 0, var->dimension(0) + 3, var->dimension(1));
-
- bool window_changed = false;
- if(beta != nullptr)
- {
- AccessWindowStatic beta_access(beta, 0, 0, beta->dimension(0) + 3, beta->dimension(1));
- if(gamma != nullptr)
- {
- AccessWindowStatic gamma_access(gamma, 0, 0, gamma->dimension(0) + 3, gamma->dimension(1));
- window_changed = update_window_and_padding(win, input_access, output_access, mean_access, var_access, beta_access, gamma_access);
- }
- else
- {
- window_changed = update_window_and_padding(win, input_access, output_access, mean_access, var_access, beta_access);
- }
- }
- else
- {
- if(gamma != nullptr)
- {
- AccessWindowStatic gamma_access(gamma, 0, 0, gamma->dimension(0) + 3, gamma->dimension(1));
- window_changed = update_window_and_padding(win, input_access, output_access, mean_access, var_access, gamma_access);
- }
- else
- {
- window_changed = update_window_and_padding(win, input_access, output_access, mean_access, var_access);
- }
- }
- output_access.set_valid_region(win, input->valid_region());
-
- Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
- return std::make_pair(err, win);
-}
-} // namespace
-
-GCBatchNormalizationLayerKernel::GCBatchNormalizationLayerKernel()
- : _input(nullptr), _output(nullptr), _mean(nullptr), _var(nullptr), _beta(nullptr), _gamma(nullptr), _epsilon(0.0f)
-{
-}
-
-void GCBatchNormalizationLayerKernel::configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *var, const IGCTensor *beta, const IGCTensor *gamma,
- float epsilon, ActivationLayerInfo act_info)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, output, mean, var);
-
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), output->info(), mean->info(), var->info(),
- (beta != nullptr) ? beta->info() : nullptr, (gamma != nullptr) ? gamma->info() : nullptr,
- epsilon, act_info));
-
- _input = input;
- _output = output;
- _mean = mean;
- _var = var;
- _beta = beta;
- _gamma = gamma;
- _epsilon = epsilon;
-
- // Set build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace(("#define ESPILON " + float_to_string_with_full_precision(_epsilon)));
- build_opts.emplace(("#define LOCAL_SIZE_X " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1)));
- if(beta == nullptr)
- {
- build_opts.emplace("#define USE_DEFAULT_BETA");
- }
- if(gamma == nullptr)
- {
- build_opts.emplace("#define USE_DEFAULT_GAMMA");
- }
-
- if(act_info.enabled())
- {
- build_opts.emplace("#define " + string_from_activation_func(act_info.activation()));
- build_opts.emplace("#define A_VAL " + float_to_string_with_full_precision(act_info.a()));
- build_opts.emplace("#define B_VAL " + float_to_string_with_full_precision(act_info.b()));
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("batchnormalization_layer", build_opts));
-
- // Configure kernel window
- auto win_config = validate_and_configure_window(input->info(), output->info(), mean->info(), var->info(),
- (beta != nullptr) ? beta->info() : nullptr, (gamma != nullptr) ? gamma->info() : nullptr);
- ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
-
- IGCKernel::configure(win_config.second);
-}
-
-Status GCBatchNormalizationLayerKernel::validate(const ITensorInfo *input, const ITensorInfo *output,
- const ITensorInfo *mean, const ITensorInfo *var,
- const ITensorInfo *beta, const ITensorInfo *gamma,
- float epsilon, ActivationLayerInfo act_info)
-{
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output, mean, var, beta, gamma, epsilon, act_info));
- ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get(), output->clone().get(),
- mean->clone().get(), var->clone().get(),
- beta->clone().get(), gamma->clone().get())
- .first);
-
- return Status{};
-}
-
-void GCBatchNormalizationLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window slice = window.first_slice_window_3D();
- Window slice_in = window.first_slice_window_3D();
-
- Window vector_slice = window.first_slice_window_1D();
- vector_slice.set(Window::DimX, Window::Dimension(0, 0, 0));
-
- unsigned int idx = 2 * num_arguments_per_3D_tensor();
- unsigned int binding_point = 3;
- add_1D_tensor_argument(idx, _mean, binding_point, vector_slice);
- add_1D_tensor_argument(idx, _var, ++binding_point, vector_slice);
- if(_beta != nullptr)
- {
- add_1D_tensor_argument(idx, _beta, ++binding_point, vector_slice);
- }
- if(_gamma != nullptr)
- {
- add_1D_tensor_argument(idx, _gamma, ++binding_point, vector_slice);
- }
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- idx = 0;
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_3D_tensor_argument(idx, _output, 2, slice);
-
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice) && window.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCCol2ImKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCCol2ImKernel.cpp
deleted file mode 100644
index 5781c564ea..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCCol2ImKernel.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-GCCol2ImKernel::GCCol2ImKernel()
- : _input(nullptr), _output(nullptr), _convolved_dims()
-{
-}
-
-void GCCol2ImKernel::configure(const IGCTensor *input, IGCTensor *output,
- std::pair<unsigned int, unsigned int> convolved_dims)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
-
- TensorShape output_shape = input->info()->tensor_shape();
- output_shape.set(0, convolved_dims.first);
- output_shape.set(1, convolved_dims.second);
- output_shape.set(2, input->info()->tensor_shape()[0]);
-
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), input->info()->clone()->set_tensor_shape(output_shape));
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- _input = input;
- _output = output;
- _convolved_dims = convolved_dims;
-
- const DataType dt = input->info()->data_type();
- const unsigned int local_size = 1;
-
- // Create kernel
- std::set<std::string> build_opts;
- build_opts.emplace("#define COL2IM ");
- build_opts.emplace("#define WIDTH_OUTPUT " + support::cpp11::to_string(_convolved_dims.first));
- const std::string dt_name = (dt == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(local_size));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(local_size));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(local_size));
-
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("col2im", build_opts));
-
- // Configure window
- const unsigned int num_elems_processed_per_iteration = (dt == DataType::F32) ? 1 : 2;
-
- Window win = calculate_max_window(*output->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
- const int input_padding = ceil_to_multiple(input->info()->dimension(0), 2) - input->info()->dimension(0);
-
- AccessWindowStatic input_access(input->info(), 0, 0, input->info()->dimension(0) + input_padding, input->info()->dimension(1) + 1);
-
- update_window_and_padding(win, input_access, output_access);
-
- output_access.set_valid_region(win, output->info()->valid_region());
-
- IGCKernel::configure(win);
-}
-
-void GCCol2ImKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window collapsed_window = window.collapse_if_possible(IGCKernel::window(), Window::DimZ);
- Window slice = collapsed_window.first_slice_window_3D();
-
- // Set static kernel arguments
- unsigned int idx = 2 * num_arguments_per_3D_tensor();
- //_kernel.set_argument(idx++, _output->info()->strides_in_bytes()[3]);
- _kernel.set_argument(idx++, uint(_output->info()->dimension(2)));
- _kernel.set_argument(idx++, _input->info()->strides_in_bytes()[2]);
-
- do
- {
- // Set inputs
- unsigned int idx = 0;
- add_2D_tensor_argument(idx, _input, 1, slice);
- add_3D_tensor_argument(idx, _output, 2, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(collapsed_window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.cpp
deleted file mode 100644
index 3256f11e74..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-GCDepthConcatenateLayerKernel::GCDepthConcatenateLayerKernel()
- : _input(nullptr), _output(nullptr), _depth_offset(0)
-{
-}
-void GCDepthConcatenateLayerKernel::configure(const IGCTensor *input, unsigned int depth_offset, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(Window::DimX) != output->info()->dimension(Window::DimX));
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(Window::DimY) != output->info()->dimension(Window::DimY));
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(2) + depth_offset > output->info()->dimension(2));
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(3, input, output);
-
- _input = input;
- _output = output;
- _depth_offset = depth_offset;
-
- // Add build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("concatenate_depth", build_opts));
-
- unsigned int num_elems_processed_per_iteration = 1;
- if(input->info()->data_type() == DataType::F16)
- {
- num_elems_processed_per_iteration = 4;
- }
-
- // The window needs to be based on input as we copy all the depths of input
- Window win = calculate_max_window(*output->info(), Steps(num_elems_processed_per_iteration));
- win.set(Window::DimZ, Window::Dimension(0, input->info()->tensor_shape().z(), 1));
-
- AccessWindowHorizontal input_access(input->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
- update_window_and_padding(win, input_access, output_access);
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-void GCDepthConcatenateLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window slice_in = window.first_slice_window_3D();
- Window slice_out = window.first_slice_window_3D();
-
- slice_out.set(Window::DimZ, Window::Dimension(_depth_offset));
-
- do
- {
- unsigned int idx = 0;
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_3D_tensor_argument(idx, _output, 2, slice_out);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice_in);
- }
- while(window.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp b/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp
deleted file mode 100644
index 95d487b4dd..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/utils/misc/ShapeCalculator.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-using namespace arm_compute::misc::shape_calculator;
-
-GCDepthwiseConvolutionLayer3x3Kernel::GCDepthwiseConvolutionLayer3x3Kernel()
- : _border_size(0), _input(), _output(), _weights(), _biases(), _conv_stride_x(0), _conv_stride_y(0), _conv_pad_left(0), _conv_pad_top(0), _lws(gles::NDRange(1U, 1U, 1U))
-{
-}
-
-BorderSize GCDepthwiseConvolutionLayer3x3Kernel::border_size() const
-{
- return _border_size;
-}
-
-void GCDepthwiseConvolutionLayer3x3Kernel::configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info,
- unsigned int depth_multiplier)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
- ARM_COMPUTE_ERROR_ON(weights->info()->dimension(0) != 3 || weights->info()->dimension(1) != 3);
-
- if(biases != nullptr)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(weights, biases);
- ARM_COMPUTE_ERROR_ON(biases->info()->dimension(0) != weights->info()->dimension(2));
- ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() > 1);
- }
-
- // Get convolved dimensions
- const TensorShape output_shape = compute_depthwise_convolution_shape(*input->info(), *weights->info(), conv_info, depth_multiplier);
-
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(),
- output_shape,
- 1,
- input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
- ARM_COMPUTE_ERROR_ON(output->info()->dimension(2) != weights->info()->dimension(2));
-
- _input = input;
- _output = output;
- _weights = weights;
- _biases = biases;
- _conv_stride_x = conv_info.stride().first;
- _conv_stride_y = conv_info.stride().second;
- _conv_pad_left = conv_info.pad_left();
- _conv_pad_top = conv_info.pad_top();
- _border_size = BorderSize(_conv_pad_top, conv_info.pad_right(), conv_info.pad_bottom(), _conv_pad_left);
-
- // Set build options
- ARM_COMPUTE_ERROR_ON(_conv_stride_x < 1 || _conv_stride_x > 3);
- std::set<std::string> options;
-
- options.emplace("#define DEPTH_MULTIPLIER " + support::cpp11::to_string(depth_multiplier));
- options.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(_lws[0]));
- options.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(_lws[1]));
- options.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(_lws[2]));
- options.emplace("#define STRIDE_X " + support::cpp11::to_string(_conv_stride_x));
- options.emplace("#define STRIDE_Y " + support::cpp11::to_string(_conv_stride_y));
-
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- options.emplace(("#define " + dt_name));
-
- unsigned int num_elems_read_per_iteration_x = 8;
- unsigned int num_elems_read_per_iteration_y = 1;
- unsigned int num_elems_written_per_iteration_x = 4;
- unsigned int num_elems_written_per_iteration_y = 1;
- unsigned int num_elems_written_per_iteration_z = 1;
-
- if((_conv_stride_x == 1) && (_conv_stride_y == 1))
- {
- switch(input->info()->data_type())
- {
-#define PROCESS_4X_3Y_1Z
-
- case DataType::F16:
-#if defined(PROCESS_4X_3Y_1Z)
- options.emplace("#define PROCESS_4X_3Y_1Z");
- num_elems_read_per_iteration_y = 5;
- num_elems_written_per_iteration_y = 3;
-#endif /* PROCESS_4X_3Y_1Z */
-#undef PROCESS_4X_3Y_1Z
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
- }
- else
- {
- switch(input->info()->data_type())
- {
- case DataType::F16:
- options.emplace("#define PROCESS_4X_1Y_1Z");
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
- }
-
- if(_biases != nullptr)
- {
- options.emplace("#define BIAS");
- }
-
- // Create kernel
- std::string kernel_name = "depthwise_convolution_3x3";
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name, options));
-
- // Calculate output right and bottom border
- const int output_width = output->info()->dimension(0);
- const int output_height = output->info()->dimension(1);
- const int output_padding_right = ceil_to_multiple(output_width, num_elems_written_per_iteration_x * _lws[0]) - output_width;
- const int output_padding_bottom = ceil_to_multiple(output_height, num_elems_written_per_iteration_y * _lws[1]) - output_height;
-
- // Calculate input right and bottom border
- const int input_width = input->info()->dimension(0);
- const int input_height = input->info()->dimension(1);
-
- const int input_total_width = std::max(int(input->info()->padding().left), int(_conv_pad_left)) + input_width + std::max(int(input->info()->padding().right), int(_conv_pad_left));
- const int input_total_height = std::max(int(input->info()->padding().top), int(_conv_pad_top)) + input_height + std::max(int(input->info()->padding().bottom), int(_conv_pad_top));
-
- const int input_padding_right = ceil_to_multiple(input_total_width, num_elems_read_per_iteration_x * _lws[0]) - input_width - _conv_pad_left;
- const int input_padding_bottom = ceil_to_multiple(input_total_height, num_elems_read_per_iteration_y * _lws[1]) - input_height - _conv_pad_top;
-
- BorderSize border = BorderSize(0, output_padding_right, output_padding_bottom, 0);
-
- Window win = calculate_max_enlarged_window(*output->info(), Steps(num_elems_written_per_iteration_x, num_elems_written_per_iteration_y, num_elems_written_per_iteration_z), border);
-
- AccessWindowStatic input_access(input->info(), -_conv_pad_left, -_conv_pad_top, input_width + input_padding_right, input_height + input_padding_bottom);
- AccessWindowStatic weights_access = AccessWindowStatic(nullptr, 0, 0, 0, 0);
- AccessWindowStatic bias_access = AccessWindowStatic(nullptr, 0, 0, 0, 1);
-
- switch(weights->info()->data_type())
- {
- case DataType::F16:
- weights_access = AccessWindowStatic(weights->info(), 0, 0, 4, 3);
- if(_biases != nullptr)
- {
- bias_access = AccessWindowStatic(_biases->info(), 0, 0, _biases->info()->dimension(0) + 1, 1);
- }
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
-
- AccessWindowStatic output_access(output->info(), 0, 0, output_width + output_padding_right, output_height + output_padding_bottom);
-
- if(_biases != nullptr)
- {
- update_window_and_padding(win, input_access, weights_access, bias_access, output_access);
- }
- else
- {
- update_window_and_padding(win, input_access, weights_access, output_access);
- }
-
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-void GCDepthwiseConvolutionLayer3x3Kernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- // Create input window and adjust
- Window win_in = window;
- win_in.adjust(Window::DimX, -_conv_pad_left, true);
- win_in.adjust(Window::DimY, -_conv_pad_top, true);
- win_in.set_dimension_step(Window::DimX, window.x().step() * _conv_stride_x);
- win_in.set_dimension_step(Window::DimY, window.y().step() * _conv_stride_y);
-
- Window slice_in = win_in.first_slice_window_3D();
- Window slice_out = window.first_slice_window_3D();
- Window slice_weights = window.first_slice_window_3D();
- slice_weights.set_dimension_step(Window::DimX, 0);
- slice_weights.set_dimension_step(Window::DimY, 0);
-
- // Set biases
- if(_biases != nullptr)
- {
- unsigned int idx = 3 * num_arguments_per_3D_tensor();
- Window slice_biases;
- slice_biases.use_tensor_dimensions(_biases->info()->tensor_shape());
- add_1D_tensor_argument(idx, _biases, 4, slice_biases);
- }
-
- slice_out.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- unsigned int idx = 0;
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_3D_tensor_argument(idx, _output, 2, slice_out);
- add_3D_tensor_argument(idx, _weights, 3, slice_weights);
-
- _kernel.update_shader_params();
- enqueue(*this, slice_out, _lws);
- }
- while(window.slide_window_slice_3D(slice_out) && win_in.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp
deleted file mode 100644
index 9ce8acea09..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/IAccessWindow.h"
-#include "arm_compute/core/ITensor.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-template <unsigned int kernel_size>
-GCDirectConvolutionLayerKernel<kernel_size>::GCDirectConvolutionLayerKernel()
- : _input(nullptr), _bias(nullptr), _weights(nullptr), _output(nullptr), _border_size(0), _conv_stride_x(0), _conv_stride_y(0), _conv_pad_x(0), _conv_pad_y(0), _lws(gles::NDRange(1U, 1U, 1U))
-{
-}
-
-template <unsigned int kernel_size>
-BorderSize GCDirectConvolutionLayerKernel<kernel_size>::border_size() const
-{
- return _border_size;
-}
-
-template <unsigned int kernel_size>
-void GCDirectConvolutionLayerKernel<kernel_size>::configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *bias, IGCTensor *output,
- const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON(weights->info()->dimension(2) != input->info()->dimension(2));
- ARM_COMPUTE_ERROR_ON(weights->info()->dimension(0) != weights->info()->dimension(1));
- ARM_COMPUTE_ERROR_ON(weights->info()->num_dimensions() > 4);
- ARM_COMPUTE_ERROR_ON_MSG((kernel_size == 3 && std::get<0>(conv_info.stride()) > 2), "Strides larger than 2 not supported in 3x3 direct convolution!");
- ARM_COMPUTE_ERROR_ON(kernel_size != weights->info()->dimension(0));
- ARM_COMPUTE_ERROR_ON(act_info.enabled() && act_info.activation() != ActivationLayerInfo::ActivationFunction::RELU && act_info.activation() != ActivationLayerInfo::ActivationFunction::LOGISTIC);
-
- if(bias != nullptr)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(weights, bias);
- // FIXME: Bug in framework, workaround it in tests currently.
- //ARM_COMPUTE_ERROR_ON(bias->info()->dimension(0) != weights->info()->dimension(3));
- ARM_COMPUTE_ERROR_ON(bias->info()->num_dimensions() > 1);
- }
-
- // Get convolved dimensions
- unsigned int owidth = 0;
- unsigned int oheight = 0;
- std::tie(owidth, oheight) = scaled_dimensions(input->info()->dimension(0), input->info()->dimension(1), kernel_size, kernel_size, conv_info);
-
- TensorShape output_shape = input->info()->tensor_shape();
- output_shape.set(0, owidth);
- output_shape.set(1, oheight);
- output_shape.set(2, weights->info()->dimension(3));
-
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_ERROR_ON(!conv_info.padding_is_symmetric());
-
- _conv_stride_x = std::get<0>(conv_info.stride());
- _conv_stride_y = std::get<1>(conv_info.stride());
- _conv_pad_x = std::get<0>(conv_info.pad());
- _conv_pad_y = std::get<1>(conv_info.pad());
-
- _input = input;
- _weights = weights;
- _output = output;
- _bias = bias;
- _border_size = BorderSize(_conv_pad_y, _conv_pad_x);
-
- std::set<std::string> options;
-
- options.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(_lws[0]));
- options.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(_lws[1]));
- options.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(_lws[2]));
- options.emplace("#define STRIDE_X " + support::cpp11::to_string(_conv_stride_x));
- options.emplace("#define STRIDE_Y " + support::cpp11::to_string(_conv_stride_y));
-
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- options.emplace(("#define " + dt_name));
-
- // Activation information in case of a fused activation
- if(act_info.enabled())
- {
- options.emplace("#define FUSED_ACTIVATION");
- options.emplace(("#define " + string_from_activation_func(act_info.activation())));
- options.emplace(("#define ACT_OP " + lower_string(string_from_activation_func(act_info.activation())) + "_op"));
- options.emplace(("#define A_VAL " + float_to_string_with_full_precision(act_info.a())));
- options.emplace(("#define B_VAL " + float_to_string_with_full_precision(act_info.b())));
- }
-
- unsigned int num_elems_read_per_iteration_x = kernel_size * _conv_stride_x;
- unsigned int num_elems_read_per_iteration_y = 1;
- unsigned int num_elems_written_per_iteration_x = 1;
- unsigned int num_elems_written_per_iteration_y = 1;
- unsigned int num_elems_written_per_iteration_z = 1;
-
- if(kernel_size == 3)
- {
- if((_conv_stride_x == 1) && (_conv_stride_y == 1))
- {
- switch(input->info()->data_type())
- {
- case DataType::F16:
- // TODO(APPBROWSER-299): Choose the most optimal path and remove others.
-#define PROCESS_4X_3Y_1Z
-
-#if defined(PROCESS_8X_3Y_1Z)
- options.emplace("#define PROCESS_8X_3Y_1Z");
- num_elems_read_per_iteration_x = 16;
- num_elems_read_per_iteration_y = 5;
- num_elems_written_per_iteration_x = 8;
- num_elems_written_per_iteration_y = 3;
-#elif defined(PROCESS_4X_3Y_1Z)
- options.emplace("#define PROCESS_4X_3Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_read_per_iteration_y = 5;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 3;
-#elif defined(PROCESS_4X_4Y_1Z)
- options.emplace("#define PROCESS_4X_4Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_read_per_iteration_y = 6;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 4;
-#elif defined(PROCESS_4X_3Y_2Z)
- options.emplace("#define PROCESS_4X_3Y_2Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_read_per_iteration_y = 5;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 3;
- num_elems_written_per_iteration_z = 2;
-#endif /* PROCESS_nX_nY_nZ */
-#undef PROCESS_8X_3Y_1Z
-#undef PROCESS_4X_3Y_1Z
-#undef PROCESS_4X_4Y_1Z
-#undef PROCESS_4X_3Y_2Z
- break;
-
- case DataType::F32:
- options.emplace("#define PROCESS_4X_3Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_read_per_iteration_y = 5;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 3;
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
- }
- // FIXME: Just keep one in release
- else
- {
- switch(input->info()->data_type())
- {
- case DataType::F16:
- options.emplace("#define PROCESS_4X_1Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_written_per_iteration_x = 4;
- break;
-
- case DataType::F32:
- // TODO(APPBROWSER-299): Choose the most optimal path and remove others.
-#define PROCESS_4X_1Y_1Z
-
-#if defined(PROCESS_1X_1Y_1Z)
- options.emplace("#define PROCESS_1X_1Y_1Z");
- num_elems_read_per_iteration_x = 3;
- num_elems_written_per_iteration_x = 1;
-#elif defined(PROCESS_4X_1Y_1Z)
- options.emplace("#define PROCESS_4X_1Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_written_per_iteration_x = 4;
-#elif defined(PROCESS_8X_1Y_1Z)
- options.emplace("#define PROCESS_8X_1Y_1Z");
- num_elems_read_per_iteration_x = 12;
- num_elems_written_per_iteration_x = 8;
-#else /* PROCESS_nX_nY_nZ */
-#error Have to declare how many elements to process in one thread.
-#endif /* PROCESS_nX_nY_nZ */
-#undef PROCESS_1X_1Y_1Z
-#undef PROCESS_4X_1Y_1Z
-#undef PROCESS_8X_1Y_1Z
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
- }
- }
- else if(kernel_size == 1)
- {
- if(weights->info()->dimension(2) % 2 == 0)
- {
- options.emplace("#define WEIGHTS_OPTIMIZATION");
- }
- switch(input->info()->data_type())
- {
- case DataType::F16:
-#define PROCESS_8X_2Y_1Z
-
-#if defined(PROCESS_4X_1Y_1Z)
- options.emplace("#define PROCESS_4X_1Y_1Z");
- num_elems_read_per_iteration_x = 4;
- num_elems_written_per_iteration_x = 4;
-#elif defined(PROCESS_4X_2Y_1Z)
- options.emplace("#define PROCESS_4X_2Y_1Z");
- num_elems_read_per_iteration_x = 4;
- num_elems_read_per_iteration_y = 2;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 2;
-#elif defined(PROCESS_4X_3Y_1Z)
- options.emplace("#define PROCESS_4X_3Y_1Z");
- num_elems_read_per_iteration_x = 4;
- num_elems_read_per_iteration_y = 3;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 3;
-#elif defined(PROCESS_4X_4Y_1Z)
- options.emplace("#define PROCESS_4X_4Y_1Z");
- num_elems_read_per_iteration_x = 4;
- num_elems_read_per_iteration_y = 4;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 4;
-#elif defined(PROCESS_4X_2Y_2Z)
- ARM_COMPUTE_ERROR_ON_MSG((weights->info()->dimension(4) % 2) == 1, "Current 'weights->info()->dimension(4) % 2) == 1' is not supported");
- options.emplace("#define PROCESS_4X_2Y_2Z");
- num_elems_read_per_iteration_x = 4;
- num_elems_read_per_iteration_y = 2;
- num_elems_written_per_iteration_x = 4;
- num_elems_written_per_iteration_y = 2;
- num_elems_written_per_iteration_z = 2;
-#elif defined(PROCESS_8X_1Y_1Z)
- options.emplace("#define PROCESS_8X_1Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_written_per_iteration_x = 8;
-#elif defined(PROCESS_8X_2Y_1Z)
- options.emplace("#define PROCESS_8X_2Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_read_per_iteration_y = 2;
- num_elems_written_per_iteration_x = 8;
- num_elems_written_per_iteration_y = 2;
-#else /* PROCESS_4X_1Y_1Z */
-#error Have to declare how many elements to process in one thread.
-#endif /* PROCESS_4X_1Y_1Z */
-#undef PROCESS_4X_1Y_1Z
-#undef PROCESS_4X_2Y_1Z
-#undef PROCESS_4X_3Y_1Z
-#undef PROCESS_4X_4Y_1Z
-#undef PROCESS_4X_2Y_2Z
-#undef PROCESS_8X_1Y_1Z
-#undef PROCESS_8X_2Y_1Z
- break;
-
- case DataType::F32:
- num_elems_read_per_iteration_x = 1;
- num_elems_written_per_iteration_x = 1;
- break;
-
- default:
- break;
- }
- }
- else if(kernel_size == 5)
- {
- switch(input->info()->data_type())
- {
- case DataType::F16:
- options.emplace("#define PROCESS_4X_1Y_1Z");
- num_elems_read_per_iteration_x = 8;
- num_elems_written_per_iteration_x = 4;
-
- default:
- break;
- }
- }
- else
- {
- }
-
- if(_bias != nullptr)
- {
- options.emplace("#define BIAS");
- }
-
- std::stringstream kernel_name;
- kernel_name << "direct_convolution" << kernel_size << "x" << kernel_size;
-
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name.str(), options));
-
- unsigned int idx = (_bias == nullptr) ? 3 * num_arguments_per_3D_tensor() : (num_arguments_per_1D_tensor() + 3 * num_arguments_per_3D_tensor());
-
- // Calculate output right and bottom border
- const int output_width = output->info()->dimension(0);
- const int output_height = output->info()->dimension(1);
- const int output_padding_right = ceil_to_multiple(output_width, num_elems_written_per_iteration_x * _lws[0]) - output_width;
- const int output_padding_bottom = ceil_to_multiple(output_height, num_elems_written_per_iteration_y * _lws[1]) - output_height;
-
- // Calculate input right and bottom border
- const int input_width = input->info()->dimension(0);
- const int input_height = input->info()->dimension(1);
- const int input_total_width = std::max(int(input->info()->padding().left), int(_conv_pad_x)) + input_width + std::max(int(input->info()->padding().right), int(_conv_pad_x));
- const int input_total_height = std::max(int(input->info()->padding().top), int(_conv_pad_y)) + input_height + std::max(int(input->info()->padding().bottom), int(_conv_pad_y));
- const int padding_right1 = ceil_to_multiple(input_total_width, num_elems_read_per_iteration_x * _lws[0]) - input_width - _conv_pad_x;
- const int padding_bottom1 = ceil_to_multiple(input_total_height, num_elems_read_per_iteration_y * _lws[1]) - input_height - _conv_pad_y;
-
- const int upper_bound_w = ceil_to_multiple(((output_width + output_padding_right) * _conv_stride_x + (kernel_size - 1)), num_elems_read_per_iteration_x * _lws[0]) - _conv_pad_x - input_width;
- const int upper_bound_h = ceil_to_multiple(((output_height + output_padding_bottom) * _conv_stride_y + (kernel_size - 1)), num_elems_read_per_iteration_y * _lws[1]) - _conv_pad_y - input_height;
- const int padding_right2 = std::max(upper_bound_w, _conv_pad_x);
- const int padding_bottom2 = std::max(upper_bound_h, _conv_pad_y);
-
- const int padding_right = std::max(padding_right1, padding_right2);
- const int padding_bottom = std::max(padding_bottom1, padding_bottom2);
-
- BorderSize border = BorderSize(0, output_padding_right, output_padding_bottom, 0);
-
- Window win = calculate_max_enlarged_window(*output->info(), Steps(num_elems_written_per_iteration_x, num_elems_written_per_iteration_y, num_elems_written_per_iteration_z), border);
-
- AccessWindowStatic input_access(input->info(), -_conv_pad_x, -_conv_pad_y, input_width + padding_right, input_height + padding_bottom);
- AccessWindowStatic weights_access = AccessWindowStatic(nullptr, 0, 0, 0, 0);
- AccessWindowStatic bias_access = AccessWindowStatic(nullptr, 0, 0, 0, 1);
-
- switch(weights->info()->data_type())
- {
- case DataType::F16:
- if((weights->info()->dimension(2) % 2 != 0) || (kernel_size != 1))
- {
- weights_access = AccessWindowStatic(weights->info(), 0, 0, kernel_size + 1, kernel_size);
- }
- if(_bias != nullptr)
- {
- bias_access = AccessWindowStatic(_bias->info(), 0, 0, _bias->info()->dimension(0) + 1, 1);
- }
- break;
-
- case DataType::F32:
- weights_access = AccessWindowStatic(weights->info(), 0, 0, kernel_size, kernel_size);
- if(_bias != nullptr)
- {
- bias_access = AccessWindowStatic(_bias->info(), 0, 0, _bias->info()->dimension(0), 1);
- }
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
-
- AccessWindowStatic output_access(output->info(), 0, 0, output_width + output_padding_right, output_height + output_padding_bottom);
-
- if(_bias != nullptr)
- {
- update_window_and_padding(win, input_access, weights_access, bias_access, output_access);
- }
- else
- {
- update_window_and_padding(win, input_access, weights_access, output_access);
- }
-
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- _kernel.set_argument(idx++, _weights->info()->strides_in_bytes()[3]); // weights_stride_w
- _kernel.set_argument(idx++, _weights->info()->dimension(2)); // weights_depth
-
- IGCKernel::configure(win);
-}
-
-template <unsigned int kernel_size>
-void GCDirectConvolutionLayerKernel<kernel_size>::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- // Get initial windows
- Window slice = window.first_slice_window_3D();
- Window win_in = window;
-
- win_in.adjust(Window::DimX, -_conv_pad_x, true);
- win_in.adjust(Window::DimY, -_conv_pad_y, true);
- win_in.set_dimension_step(Window::DimX, window.x().step() * _conv_stride_x);
- win_in.set_dimension_step(Window::DimY, window.y().step() * _conv_stride_y);
-
- Window slice_in = win_in.first_slice_window_3D();
-
- unsigned int idx1 = 2 * num_arguments_per_3D_tensor();
- add_3D_tensor_argument(idx1, _weights, 3, slice);
-
- if(_bias != nullptr)
- {
- Window slice_bias;
- slice_bias.use_tensor_dimensions(_bias->info()->tensor_shape());
- add_1D_tensor_argument(idx1, _bias, 4, slice_bias);
- }
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- unsigned int idx = 0;
-
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_3D_tensor_argument(idx, _output, 2, slice);
-
- _kernel.update_shader_params();
- enqueue(*this, slice, _lws);
- }
- while(window.slide_window_slice_3D(slice) && win_in.slide_window_slice_3D(slice_in));
-}
-
-template class arm_compute::GCDirectConvolutionLayerKernel<1>;
-template class arm_compute::GCDirectConvolutionLayerKernel<3>;
-template class arm_compute::GCDirectConvolutionLayerKernel<5>;
diff --git a/src/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.cpp
deleted file mode 100644
index bda6599f86..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <cmath>
-#include <random>
-#include <tuple>
-
-using namespace arm_compute;
-
-GCDropoutLayerKernel::GCDropoutLayerKernel()
- : _input(nullptr), _mask(nullptr), _output(nullptr), _num_elems_processed_per_iteration(0)
-{
-}
-
-void GCDropoutLayerKernel::configure(const IGCTensor *input, IGCTensor *mask, IGCTensor *output, float ratio, bool forward)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, mask, output);
-
- _input = input;
- _mask = mask;
- _output = output;
-
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- std::string fporbp = forward ? "FORWARD" : "BACKWARD";
- std::random_device rd;
- std::mt19937 mt(rd());
- std::uniform_real_distribution<float> dist(0.f, 1.f);
-
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.emplace("#define RATIO " + support::cpp11::to_string(ratio));
- build_opts.emplace("#define SCALE " + support::cpp11::to_string(1. / (1. - ratio)));
- build_opts.emplace("#define SEED " + support::cpp11::to_string(dist(mt)));
- build_opts.emplace("#define " + dt_name);
- build_opts.emplace("#define " + fporbp);
-
- _num_elems_processed_per_iteration = 4 / input->info()->element_size();
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("dropout", build_opts));
-
- // Configure kernel window
- Window win = calculate_max_window(*input->info(), Steps(_num_elems_processed_per_iteration));
-
- output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-void GCDropoutLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_3D();
-
- do
- {
- unsigned int idx = 0;
-
- add_3D_tensor_argument(idx, _input, 1, slice);
- add_3D_tensor_argument(idx, _mask, 2, slice);
- add_3D_tensor_argument(idx, _output, 3, slice);
-
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
deleted file mode 100644
index 7ffcdd2f3f..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCFillBorderKernel.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <cstdint>
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-GCFillBorderKernel::GCFillBorderKernel()
- : IGCKernel(), _tensor(nullptr)
-{
-}
-
-bool GCFillBorderKernel::is_parallelisable() const
-{
- return false;
-}
-
-template <class T>
-void GCFillBorderKernel::set_constant_border(unsigned int idx, const PixelValue &constant_border_value)
-{
- T value;
- constant_border_value.get(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)
-{
- ARM_COMPUTE_ERROR_ON(tensor == nullptr);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(tensor, 1, DataType::F32, DataType::F16);
- ARM_COMPUTE_ERROR_ON(tensor->info()->num_channels() != 1);
-
- border_size.limit(tensor->info()->padding());
-
- // If there is no border: early exit
- if(border_size.empty() || border_mode == BorderMode::UNDEFINED)
- {
- return;
- }
-
- // Select appropriate kernel
- std::string kernel_name = "fill_image_borders_" + lower_string(string_from_border_mode(border_mode));
-
- // Define build options
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.emplace("#define BORDER_SIZE_TOP " + support::cpp11::to_string(border_size.top));
- build_opts.emplace("#define BORDER_SIZE_BOTTOM " + support::cpp11::to_string(border_size.bottom));
- build_opts.emplace("#define BORDER_SIZE_LEFT " + support::cpp11::to_string(border_size.left));
- build_opts.emplace("#define BORDER_SIZE_RIGHT " + support::cpp11::to_string(border_size.right));
-
- if(border_mode == BorderMode::REPLICATE)
- {
- build_opts.emplace("#define FILL_IMAGE_BORDERS_REPLICATE\n");
- }
- else
- {
- build_opts.emplace("#define FILL_IMAGE_BORDERS_CONSTANT\n");
- }
-
- switch(tensor->info()->data_type())
- {
- case DataType::F16:
- build_opts.emplace("#define DATA_TYPE_FP16");
- break;
-
- case DataType::F32:
- build_opts.emplace("#define DATA_TYPE_FP32");
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name, build_opts));
- _tensor = tensor;
-
- // 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];
- const unsigned int total_valid_width = border_size.left + valid_width + border_size.right;
-
- // Set static kernel arguments
- unsigned int idx = num_arguments_per_3D_tensor(); //Skip the tensor parameters
- _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)
- {
- set_constant_border<float>(idx++, constant_border_value);
- }
-
- // Configure kernel window
- Window win;
- win.set(Window::DimX, Window::Dimension(0, total_valid_width + valid_height));
- win.set(Window::DimY, Window::Dimension(0, 1, 1));
- win.use_tensor_dimensions(tensor->info()->tensor_shape(), Window::DimZ);
-
- IGCKernel::configure(win);
-}
-
-void GCFillBorderKernel::run(const Window &window)
-{
- // Border mode undefined or border width == 0
- if(_kernel.get_program() == 0)
- {
- return;
- }
-
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- _kernel.use();
- Window slice = window.first_slice_window_3D();
-
- do
- {
- unsigned int idx = 0;
- add_3D_tensor_argument(idx, _tensor, 1, slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp
deleted file mode 100644
index d395759558..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-GCGEMMInterleave4x4Kernel::GCGEMMInterleave4x4Kernel()
- : _input(nullptr), _output(nullptr)
-{
-}
-
-void GCGEMMInterleave4x4Kernel::configure(const IGCTensor *input, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
-
- TensorShape output_shape = input->info()->tensor_shape();
- output_shape.set(0, input->info()->dimension(0) * 4);
- output_shape.set(1, std::ceil(input->info()->dimension(1) / 4.0f));
-
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- _input = input;
- _output = output;
-
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
-
- // Create kernel
- build_opts.emplace("#define GEMM_INTERLEAVE4x4");
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("gemm_interleave4x4", build_opts));
-
- // Configure kernel window
- const unsigned int num_elems_processed_per_iteration_x = max_gc_vector_width / data_size_from_type(input->info()->data_type());
- constexpr unsigned int num_elems_processed_per_iteration_y = 4;
- const unsigned int num_elems_written_per_iteration = num_elems_processed_per_iteration_x * num_elems_processed_per_iteration_y;
-
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y));
-
- AccessWindowRectangle input_access(input->info(), 0, 0, num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y);
- AccessWindowRectangle output_access(output->info(), 0, 0, num_elems_written_per_iteration, 1, 4.f, 0.25f);
-
- update_window_and_padding(win, input_access, output_access);
-
- output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-void GCGEMMInterleave4x4Kernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- /*
- * This kernel puts the values in a 4x4 block of Matrix A on the same row (Interleaved values)
- * |a00 a01 a02 a03|
- * |a10 a11 a12 a13|
- * |a20 a21 a22 a23| = | a00 a10 a20 a30 || a01 a11 a21 a31 || a02 a12 a22 a32 || a03 a13 a23 a33 |
- * |a30 a31 a32 a33|
- *
- * After this operation, the output matrix will have the following shape: [ height * 4, width / 4 ]
- */
- Window in_slice = window.first_slice_window_2D();
- Window out_slice = window.first_slice_window_2D();
-
- // Change x and y steps for the slide of output tensor
- out_slice.scale(Window::DimX, 4.f);
- out_slice.scale(Window::DimY, 0.25f);
-
- do
- {
- unsigned int idx = 0;
- add_2D_tensor_argument(idx, _input, 1, in_slice);
- add_2D_tensor_argument(idx, _output, 2, out_slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, in_slice);
- }
- while(window.slide_window_slice_2D(in_slice) && window.slide_window_slice_2D(out_slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.cpp
deleted file mode 100644
index 66fdde5473..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-GCGEMMMatrixAccumulateBiasesKernel::GCGEMMMatrixAccumulateBiasesKernel()
- : _accum(nullptr), _biases(nullptr), _lws(gles::NDRange(1U, 1U, 1U))
-{
-}
-
-void GCGEMMMatrixAccumulateBiasesKernel::configure(IGCTensor *accum, const IGCTensor *biases)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(accum, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(biases, accum);
- ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() != 1);
-
- _biases = biases;
- _accum = accum;
-
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(_lws[0]));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(_lws[1]));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(_lws[2]));
-
- // Create kernel
- build_opts.emplace("#define GEMM_ACCUMULATE_BIASES");
-
-#define ACCUM_PROCESS_4X
-
-#if defined(ACCUM_PROCESS_4X)
- build_opts.emplace("#define ACCUM_PROCESS_4X");
-#elif defined(ACCUM_PROCESS_8X) /* ACCUM_PROCESS_4X */
- build_opts.emplace("#define ACCUM_PROCESS_8X");
-#endif /* ACCUM_PROCESS_4X */
- std::string dt_name = (accum->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
-
- _kernel = GCKernelLibrary::get().create_kernel("gemm_accumulate_biases", build_opts);
-
- // Configure kernel window
- unsigned int num_elems_processed_per_iteration = 1;
-
- if(_accum->info()->data_type() == DataType::F32)
- {
- num_elems_processed_per_iteration = 16;
- }
- else if(_accum->info()->data_type() == DataType::F16)
- {
-#if defined(ACCUM_PROCESS_4X)
- num_elems_processed_per_iteration = 4;
-#elif defined(ACCUM_PROCESS_8X) /* ACCUM_PROCESS_4X */
- num_elems_processed_per_iteration = 8;
-#endif /* ACCUM_PROCESS_4X */
- }
-
- const int accum_width = accum->info()->dimension(0);
- const int accum_padding_right = ceil_to_multiple(accum_width, num_elems_processed_per_iteration * _lws[0]) - accum_width;
- BorderSize border = BorderSize(0, accum_padding_right, 0, 0);
-
- Window win = calculate_max_enlarged_window(*_accum->info(), Steps(num_elems_processed_per_iteration), border);
-
- AccessWindowStatic biases_access(biases->info(), 0, 0, ceil_to_multiple(biases->info()->dimension(0), num_elems_processed_per_iteration * _lws[0]), biases->info()->dimension(1));
- AccessWindowStatic accum_access(_accum->info(), 0, 0, accum_width + accum_padding_right, _accum->info()->dimension(1));
-
- update_window_and_padding(win, biases_access, accum_access);
-
- IGCKernel::configure(win);
-}
-
-void GCGEMMMatrixAccumulateBiasesKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window accum_slice = window.first_slice_window_2D();
-
- Window biases_slice(accum_slice);
- biases_slice.set(Window::DimY, Window::Dimension(0, 1, 1));
-
- // Run kernel
- do
- {
- // Set arguments
- unsigned int idx = 0;
-
- add_2D_tensor_argument(idx, _accum, 1, accum_slice);
- add_1D_tensor_argument(idx, _biases, 2, biases_slice);
- _kernel.update_shader_params();
-
- enqueue(*this, accum_slice, _lws);
- }
- while(window.slide_window_slice_2D(accum_slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.cpp
deleted file mode 100644
index daad70bba9..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-GCGEMMMatrixAdditionKernel::GCGEMMMatrixAdditionKernel()
- : _input(nullptr), _output(nullptr)
-{
-}
-
-void GCGEMMMatrixAdditionKernel::configure(const IGCTensor *input, IGCTensor *output, float beta)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(0) != output->info()->dimension(0));
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(1) != output->info()->dimension(1));
-
- _input = input;
- _output = output;
- const unsigned int num_elems_processed_per_iteration = max_gc_vector_width / data_size_from_type(input->info()->data_type());
-
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.emplace("#define BETA " + float_to_string_with_full_precision(beta));
-
- // Create kernel
- build_opts.emplace("#define GEMM_MATRIXADDITION");
- std::string data_type_name = lower_string(string_from_data_type(input->info()->data_type()));
- _kernel = GCKernelLibrary::get().create_kernel(("gemm_ma"), build_opts);
-
- // Configure kernel window
- Window win = calculate_max_window(*_input->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input_access(input->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win, input_access, output_access);
-
- output_access.set_valid_region(win, input->info()->valid_region());
-
- IGCKernel::configure(win);
-}
-
-void GCGEMMMatrixAdditionKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_2D();
-
- do
- {
- unsigned int idx = 0;
- add_2D_tensor_argument(idx, _input, 1, slice);
- add_2D_tensor_argument(idx, _output, 2, slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_2D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp
deleted file mode 100644
index 2f69728b61..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "arm_compute/core/utils/misc/ShapeCalculator.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/AccessWindowTranspose.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-using namespace arm_compute::misc::shape_calculator;
-
-namespace
-{
-using ElementsProcessed = Steps;
-
-inline Status validate_arguments(const ITensorInfo *input0, const ITensorInfo *input1, const ITensorInfo *output, bool is_interleaved_transposed, const GEMMReshapeInfo &reshape_info)
-{
- ARM_COMPUTE_UNUSED(reshape_info);
- ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input0, input1, output);
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input0, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input0, input1);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(input1->num_dimensions() > 3, "The number of dimensions for the matrix B must be <= 3");
-
- if(!is_interleaved_transposed)
- {
- ARM_COMPUTE_RETURN_ERROR_ON(input0->dimension(0) != input1->dimension(1));
-
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON(input1->dimension(0) != output->dimension(0));
- ARM_COMPUTE_RETURN_ERROR_ON(input0->dimension(1) != output->dimension(1));
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input0, output);
- }
- }
- else
- {
- const int m = reshape_info.m();
- const int n = reshape_info.n();
- const int k = reshape_info.k();
- const int mult_transpose1xW_width = reshape_info.mult_transpose1xW_width();
- const int mult_interleave4x4_height = reshape_info.mult_interleave4x4_height();
-
- TensorShape tensor_shape0{ input0->tensor_shape() };
- tensor_shape0.set(0, k);
- tensor_shape0.set(1, m);
-
- TensorShape tensor_shape1{ input1->tensor_shape() };
- tensor_shape1.set(0, n);
- tensor_shape1.set(1, k);
-
- const TensorInfo tensor_info0 = input0->clone()->set_tensor_shape(tensor_shape0);
- const TensorInfo tensor_info1 = input1->clone()->set_tensor_shape(tensor_shape1);
-
- const TensorInfo tensor_info_reshaped0 = input0->clone()->set_tensor_shape(compute_interleaved_shape(tensor_info0, mult_interleave4x4_height));
- const TensorInfo tensor_info_reshaped1 = input1->clone()->set_tensor_shape(compute_transpose1xW_with_element_size_shape(tensor_info1, mult_transpose1xW_width));
-
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input0, &tensor_info_reshaped0);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input1, &tensor_info_reshaped1);
-
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON(output->dimension(0) != static_cast<size_t>(n));
- ARM_COMPUTE_RETURN_ERROR_ON(output->dimension(1) != static_cast<size_t>(m));
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input0, output);
- }
- }
-
- return Status{};
-}
-
-inline std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input0, ITensorInfo *input1, ITensorInfo *output,
- bool is_interleaved_transposed, const GEMMReshapeInfo &reshape_info,
- GPUTarget gpu_target, ElementsProcessed &num_elements_processed)
-{
- ARM_COMPUTE_UNUSED(gpu_target);
-
- // Output tensor auto inizialitation if not yet initialized
- TensorShape tensor_shape{ input0->tensor_shape() };
- tensor_shape.set(0, is_interleaved_transposed ? reshape_info.n() : input1->dimension(0));
- tensor_shape.set(1, is_interleaved_transposed ? reshape_info.m() : input0->dimension(1));
-
- auto_init_if_empty(*output, input0->clone()->set_tensor_shape(tensor_shape));
-
- bool window_changed = false;
- Window win{};
-
- const DataType data_type = input0->data_type();
- unsigned int &num_elems_processed_per_iteration_x = num_elements_processed[0];
- unsigned int &num_elems_processed_per_iteration_y = num_elements_processed[1];
-
- if(is_interleaved_transposed)
- {
- // Configure window kernel
- num_elems_processed_per_iteration_x = max_gc_vector_width / data_size_from_type(data_type);
- num_elems_processed_per_iteration_y = 4;
-
- win = calculate_max_window(*output, Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y));
-
- AccessWindowRectangle input0_access(input0, 0, 0, num_elems_processed_per_iteration_y, 1, 1.f, 0.25f);
- AccessWindowTranspose input1_access(input1, 0, 0, num_elems_processed_per_iteration_x, 1, 0.f, 0.25f);
- AccessWindowRectangle output_access(output, 0, 0, num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y);
-
- update_window_and_padding(win, input0_access, input1_access, output_access);
-
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->tensor_shape()));
- }
- else // The input tensors have not been reshaped
- {
- // Special case for 1xN, 2xN, 3xN and 4xN input0 tensor.
- num_elems_processed_per_iteration_y = std::min(static_cast<int>(output->dimension(1)), 4);
-
- switch(data_type)
- {
- case DataType::F16:
- num_elems_processed_per_iteration_x = 4;
- break;
-
- case DataType::F32:
- num_elems_processed_per_iteration_x = max_gc_vector_width / data_size_from_type(data_type);
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
-
- win = calculate_max_window(*output, Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y));
-
- AccessWindowStatic input0_access(input0, 0, 0, ceil_to_multiple(input0->dimension(0), 8), ceil_to_multiple(input0->dimension(1), num_elems_processed_per_iteration_y));
- AccessWindowStatic input1_access(input1, 0, 0, ceil_to_multiple(input1->dimension(0), num_elems_processed_per_iteration_x), input1->dimension(1));
- AccessWindowRectangle output_access(output, 0, 0, num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y);
-
- update_window_and_padding(win, input0_access, input1_access, output_access);
-
- Coordinates coord;
- coord.set_num_dimensions(output->num_dimensions());
- output_access.set_valid_region(win, ValidRegion(coord, output->tensor_shape()));
- }
-
- Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
- return std::make_pair(err, win);
-}
-} // namespace
-
-GCGEMMMatrixMultiplyKernel::GCGEMMMatrixMultiplyKernel()
- : _input0(nullptr), _input1(nullptr), _output(nullptr)
-{
-}
-
-void GCGEMMMatrixMultiplyKernel::configure(const IGCTensor *input0, const IGCTensor *input1, IGCTensor *output, float alpha, bool is_interleaved_transposed, const GEMMReshapeInfo &reshape_info)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input0, input1, output);
-
- // Perform validate step
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input0->info(), input1->info(), output->info(), is_interleaved_transposed, reshape_info));
-
- _input0 = input0;
- _input1 = input1;
- _output = output;
-
- // Get target architecture
- GPUTarget gpu_target = get_target();
-
- ElementsProcessed num_elements_processed{};
-
- // Configure kernel window
- auto win_config = validate_and_configure_window(input0->info(), input1->info(), output->info(), is_interleaved_transposed, reshape_info, gpu_target, num_elements_processed);
- ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
- IGCKernel::configure(win_config.second);
-
- // Create build options
- std::set<std::string> build_opts;
- std::string kernel_name;
-
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.emplace("#define COLS_A " + support::cpp11::to_string(input0->info()->dimension(0)));
- build_opts.emplace("#define COLS_B " + support::cpp11::to_string(input1->info()->dimension(0)));
- build_opts.emplace("#define ALPHA " + float_to_string_with_full_precision(alpha));
-
- // Check if the output tensor is a vector. If so,the kernel runs the vector-matrix multiplication
- if(is_interleaved_transposed)
- {
- const int mult_transpose1xW_width = reshape_info.mult_transpose1xW_width();
- const int mult_interleave4x4_height = reshape_info.mult_interleave4x4_height();
-
- build_opts.emplace("#define MULT_TRANSPOSE1XW_WIDTH " + support::cpp11::to_string(mult_transpose1xW_width));
- build_opts.emplace("#define MULT_INTERLEAVE4X4_HEIGHT " + support::cpp11::to_string(mult_interleave4x4_height));
-
- switch(input0->info()->data_type())
- {
- case DataType::F16:
- build_opts.emplace("#define DATA_TYPE_FP16");
- break;
-
- case DataType::F32:
- build_opts.emplace("#define DATA_TYPE_FP32");
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
-
- build_opts.emplace("#define GEMM_MM_INTERLEAVED_TRANSPOSED");
-
- kernel_name = "gemm_mm_interleaved_transposed";
- }
- else
- {
- // Special case for 1xN, 2xN, 3xN and 4xN input0 tensor
-
- GPUTarget arch_target = get_arch_from_target(gpu_target);
- switch(input0->info()->data_type())
- {
- case DataType::F16:
- build_opts.emplace("#define DATA_TYPE_FP16");
- build_opts.emplace("#define MM_PROCESS_4X_OPTIMIZED");
- build_opts.emplace("#define GEMM_MM_FLOATING_POINT");
- break;
-
- case DataType::F32:
- build_opts.emplace("#define DATA_TYPE_FP32");
-
- if(arch_target == GPUTarget::BIFROST && input0->info()->num_dimensions() != 1)
- {
- build_opts.emplace("#define GEMM_MM_FLOATING_POINT_BIFROST");
- }
- else
- {
- build_opts.emplace("#define GEMM_MM_FLOATING_POINT");
- }
- break;
-
- default:
- ARM_COMPUTE_ERROR("Current data type is not supported");
- break;
- }
-
- build_opts.emplace("#define NUM_ELEMS_PROCESSED_PER_THREAD_X " + support::cpp11::to_string(num_elements_processed.x()));
- build_opts.emplace("#define NUM_ELEMS_PROCESSED_PER_THREAD_Y " + support::cpp11::to_string(num_elements_processed.y()));
-
- kernel_name = "gemm_mm_floating_point";
- }
-
- // Create kernel
- _kernel = GCKernelLibrary::get().create_kernel(kernel_name, build_opts);
-}
-
-Status GCGEMMMatrixMultiplyKernel::validate(const ITensorInfo *input0, const ITensorInfo *input1, const ITensorInfo *output, float alpha, bool is_interleaved_transposed,
- const GEMMReshapeInfo &reshape_info, GPUTarget gpu_target)
-{
- ARM_COMPUTE_UNUSED(alpha);
- ElementsProcessed num_elements_processed{};
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input0, input1, output, is_interleaved_transposed, reshape_info));
- ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input0->clone().get(),
- input1->clone().get(),
- output->clone().get(),
- is_interleaved_transposed,
- reshape_info,
- gpu_target,
- num_elements_processed)
- .first);
- return Status{};
-}
-
-void GCGEMMMatrixMultiplyKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_2D();
- Window slice_matrix_b = slice;
-
- slice_matrix_b.set(Window::DimX, Window::Dimension(0, 1, 1));
- slice_matrix_b.set(Window::DimY, Window::Dimension(0, 1, 1));
-
- do
- {
- Window slice_b = slice;
- // Don't slice matrix B along the z dimension if matrix B has just 2 dimensions and matrix A more than 2
- // This scenario can happen when the the matrix multiplication is used to perform a convolution operation
- if(_input1->info()->num_dimensions() < 3)
- {
- slice_b = slice_matrix_b;
- }
-
- unsigned int idx = 0;
-
- add_2D_tensor_argument(idx, _input0, 1, slice);
- add_2D_tensor_argument(idx, _input1, 2, slice_b);
- add_2D_tensor_argument(idx, _output, 3, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_2D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp
deleted file mode 100644
index 1d6ef3d0e8..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/AccessWindowTranspose.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <cmath>
-
-using namespace arm_compute;
-
-void GCGEMMTranspose1xWKernel::configure(const IGCTensor *input, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
-
- TensorShape output_shape{ input->info()->tensor_shape() };
- const size_t transpose_w = 16 / input->info()->element_size();
- output_shape.set(0, input->info()->dimension(1) * transpose_w);
- output_shape.set(1, static_cast<size_t>(std::ceil((input->info()->dimension(0) / static_cast<float>(transpose_w)))));
-
- // Output tensor auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
-
- const unsigned int num_elems_processed_per_iteration = 16 / input->info()->element_size();
- const int scale_x = num_elems_processed_per_iteration;
-
- _input = input;
- _output = output;
-
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- /*
- * Following an example of how the transposition1xW works when the input data type is F32
- *
- * |a00 a01 a02 a03|
- * |a10 a11 a12 a13|
- * |a20 a21 a22 a23| = | a00 a01 a02 a03 || a10 a11 a12 a13 || a20 a21 a22 a23 || a30 a31 a32 a33 |
- * |a30 a31 a32 a33|
- *
- * The output matrix will have the following shape: [ height * W, ceil(width / W) ], where W = (16 / element size of the tensor)
- */
- // Create kernel
- build_opts.emplace("#define GEMM_TRANSPOSE1xW");
- _kernel = GCKernelLibrary::get().create_kernel("gemm_transpose1x4", build_opts);
-
- // Configure window
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration));
-
- ARM_COMPUTE_ERROR_ON_MSG((win.x().end() / scale_x) == 0, "Transposed shape would be 0 in the second dimension");
-
- AccessWindowHorizontal input_access(input->info(), 0, num_elems_processed_per_iteration);
- AccessWindowTranspose output_access(output->info(), 0, 0, num_elems_processed_per_iteration, 1, scale_x, 1.f / scale_x);
-
- update_window_and_padding(win, input_access, output_access);
-
- output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-void GCGEMMTranspose1xWKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- // Output is transposed
- Window out_window(window);
- out_window.set(Window::DimX, window.y());
- out_window.set(Window::DimY, window.x());
-
- Window in_slice = window.first_slice_window_2D();
- Window out_slice = out_window.first_slice_window_2D();
-
- do
- {
- unsigned int idx = 0;
- add_2D_tensor_argument(idx, _input, 1, in_slice);
- add_2D_tensor_argument(idx, _output, 2, out_slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, in_slice);
- }
- while(window.slide_window_slice_2D(in_slice) && out_window.slide_window_slice_2D(out_slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
deleted file mode 100644
index c12dd38cb4..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Size2D.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <cmath>
-#include <tuple>
-
-using namespace arm_compute;
-
-namespace
-{
-Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output)
-{
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(output);
-
- // Checks performed when output is configured
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- }
-
- return Status{};
-}
-} // namespace
-
-GCIm2ColKernel::GCIm2ColKernel()
- : _input(nullptr), _output(nullptr), _convolved_dims(), _kernel_dims(), _num_elems_processed_per_iteration(1), _run_func(nullptr)
-{
-}
-
-void GCIm2ColKernel::configure(const IGCTensor *input, IGCTensor *output, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, const Size2D &dilation)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
-
- // Perform validation step
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), output->info()));
-
- _input = input;
- _output = output;
-
- // Create kernel
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.insert("#define " + dt_name);
-
- if(has_bias)
- {
- build_opts.emplace("#define HAS_BIAS");
- }
-
- int stride_x = 0;
- int stride_y = 0;
-
- std::tie(stride_x, stride_y) = conv_info.stride();
- _kernel_dims = std::make_pair(kernel_dims.width, kernel_dims.height);
-
- const bool run_img2col_reduced = (output->info()->dimension(0) == (input->info()->dimension(0) * input->info()->dimension(1) * input->info()->dimension(2))) && (TensorShape::num_max_dimensions >= 4)
- && (std::equal(input->info()->tensor_shape().cbegin() + 3,
- input->info()->tensor_shape().cend(),
- output->info()->tensor_shape().cbegin() + 1))
- && ((stride_x == 1) && (stride_y == 1) && !conv_info.has_padding())
- && (dilation == Size2D(1U, 1U));
-
- std::string kernel_name = "im2col_generic";
- if(!run_img2col_reduced)
- {
- if(input->info()->data_type() == DataType::F16 && _kernel_dims == std::pair<unsigned int, unsigned int>(1, 1))
- {
- build_opts.emplace("#define KERNEL_1x1");
- }
-
- build_opts.emplace("#define IM2COL_GENERIC");
- _convolved_dims = scaled_dimensions(input->info()->dimension(0), input->info()->dimension(1),
- kernel_dims.width, kernel_dims.height,
- conv_info, dilation);
- _num_elems_processed_per_iteration = (input->info()->data_type() == DataType::F32) ? 1 : 2;
-
- build_opts.emplace("#define KERNEL_WIDTH " + support::cpp11::to_string(kernel_dims.width));
- build_opts.emplace("#define KERNEL_HEIGHT " + support::cpp11::to_string(kernel_dims.height));
- build_opts.emplace("#define KERNEL_DEPTH " + support::cpp11::to_string(input->info()->dimension(2)));
- build_opts.emplace("#define CONVOLVED_WIDTH " + support::cpp11::to_string(_convolved_dims.first));
- build_opts.emplace("#define CONVOLVED_HEIGHT " + support::cpp11::to_string(_convolved_dims.second));
- build_opts.emplace("#define STRIDE_X " + support::cpp11::to_string(conv_info.stride().first));
- build_opts.emplace("#define STRIDE_Y " + support::cpp11::to_string(conv_info.stride().second));
- build_opts.emplace("#define PAD_LEFT " + support::cpp11::to_string(conv_info.pad_left()));
- build_opts.emplace("#define PAD_TOP " + support::cpp11::to_string(conv_info.pad_top()));
- build_opts.emplace("#define PAD_RIGHT " + support::cpp11::to_string(conv_info.pad_right()));
- build_opts.emplace("#define PAD_BOTTOM " + support::cpp11::to_string(conv_info.pad_bottom()));
- build_opts.emplace("#define SRC_WIDTH " + support::cpp11::to_string(input->info()->dimension(0)));
- build_opts.emplace("#define SRC_HEIGHT " + support::cpp11::to_string(input->info()->dimension(1)));
- build_opts.emplace("#define DILATION_X " + support::cpp11::to_string(dilation.x()));
- build_opts.emplace("#define DILATION_Y " + support::cpp11::to_string(dilation.y()));
-
- _run_func = &GCIm2ColKernel::run_generic;
- }
- else
- {
- build_opts.emplace("#define IM2COL_REDUCED");
- kernel_name = "im2col_reduced";
-
- if(input->info()->data_type() == DataType::F32)
- {
- _num_elems_processed_per_iteration = 4 / input->info()->element_size();
- }
- else if(input->info()->data_type() == DataType::F16)
- {
- int input_width = input->info()->dimension(0);
- int input_height = input->info()->dimension(1);
-
- build_opts.emplace("#define IMAGE_SIZE " + support::cpp11::to_string(input_width * input_height));
- if(input_width % 8 == 0)
- {
- _num_elems_processed_per_iteration = 8;
- build_opts.emplace("#define IM2COL_REDUCED_8X");
- }
- else if(input_width % 4 == 0)
- {
- _num_elems_processed_per_iteration = 4;
- build_opts.emplace("#define IM2COL_REDUCED_4X");
- }
- else if(input_width % 2 == 0)
- {
- _num_elems_processed_per_iteration = 2;
- build_opts.emplace("#define IM2COL_REDUCED_2X");
- }
- else
- {
- _num_elems_processed_per_iteration = 2;
- build_opts.emplace("#define IM2COL_REDUCED_GENERIC");
- }
- }
-
- _run_func = &GCIm2ColKernel::run_reduced;
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name, build_opts));
-
- // Configure kernel window
- Window win = calculate_max_window(*input->info(), Steps(_num_elems_processed_per_iteration));
-
- if(input->info()->data_type() == DataType::F16)
- {
- // Calculate input right and bottom border
- const int input_width = input->info()->dimension(0);
- const int input_height = input->info()->dimension(1);
- int input_total_width = input->info()->padding().left + input_width + input->info()->padding().right;
- int input_padding_right = ceil_to_multiple(input_total_width, _num_elems_processed_per_iteration) - input_total_width;
- input_total_width = input_width + input_padding_right + input->info()->padding().right;
- AccessWindowStatic input_access(input->info(), 0, 0, input_total_width, input_height);
-
- // Calculate output right and bottom border
- const int output_width = output->info()->dimension(0);
- const int output_height = output->info()->dimension(1);
- const int output_padding_right = ceil_to_multiple(output_width, _num_elems_processed_per_iteration) - output_width;
- AccessWindowStatic output_access(output->info(), 0, 0, output_width + output_padding_right, output_height);
-
- update_window_and_padding(win, input_access, output_access);
- }
-
- output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- if(!run_img2col_reduced)
- {
- // set the Z dimension's step same size as the whole dimension so that one can't split across the Z dimension
- win.set_dimension_step(Window::DimZ, win[Window::DimZ].end() - win[Window::DimZ].start());
- }
-
- IGCKernel::configure(win);
-}
-
-Status GCIm2ColKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, const Size2D &dilation)
-{
- ARM_COMPUTE_UNUSED(kernel_dims);
- ARM_COMPUTE_UNUSED(conv_info);
- ARM_COMPUTE_UNUSED(has_bias);
- ARM_COMPUTE_UNUSED(dilation);
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output));
- return Status{};
-}
-
-void GCIm2ColKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON(_run_func == nullptr);
- (this->*_run_func)(window);
-}
-
-void GCIm2ColKernel::run_generic(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- // Get initial windows
- Window window_collapsed = window.collapse_if_possible(IGCKernel::window(), Window::DimZ);
-
- // Change the Z dimension's step back to 1
- window_collapsed.set_dimension_step(Window::DimZ, 1);
-
- Window slice = window_collapsed.first_slice_window_3D();
- Window slice_in = window_collapsed.first_slice_window_3D();
- Window slice_out = window_collapsed.first_slice_window_3D();
-
- // Setup slice
- slice.set(Window::DimX, Window::Dimension(0, static_cast<int>(_convolved_dims.first), 1));
- slice.set(Window::DimY, Window::Dimension(0, static_cast<int>(_convolved_dims.second), 1));
-
- // Setup output slice
- slice_out.set(Window::DimX, Window::Dimension(0, _output->info()->dimension(0), _num_elems_processed_per_iteration));
- slice_out.set(Window::DimY, Window::Dimension(0, _output->info()->dimension(1), 1));
- slice_out.set(Window::DimZ, Window::Dimension(0, 1, 1));
-
- // we need top/left pad to be included in valid region
- if(_input->info()->data_type() == DataType::F16)
- {
- (dynamic_cast<TensorInfo *>(_input->info()))->init(_input->info()->tensor_shape(), _input->info()->num_channels(), _input->info()->data_type(), _input->info()->strides_in_bytes(), 0,
- _input->info()->total_size());
- }
-
- _kernel.use();
-
- do
- {
- unsigned int idx = 0;
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_2D_tensor_argument(idx, _output, 2, slice_out);
- _kernel.set_argument(idx++, static_cast<unsigned int>(_input->info()->strides_in_bytes()[3]));
- _kernel.set_argument(idx++, static_cast<unsigned int>(_output->info()->strides_in_bytes()[3]));
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window_collapsed.slide_window_slice_3D(slice) && window_collapsed.slide_window_slice_3D(slice_out) && window_collapsed.slide_window_slice_3D(slice_in));
-}
-
-void GCIm2ColKernel::run_reduced(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- Window out_window;
- out_window.use_tensor_dimensions(_output->info()->tensor_shape());
-
- Window out_slice = out_window.first_slice_window_1D();
- Window in_slice = window.first_slice_window_3D();
-
- _kernel.use();
-
- // Run kernel
- do
- {
- // Set arguments
- unsigned int idx = 0;
-
- add_3D_tensor_argument(idx, _input, 1, in_slice);
- add_1D_tensor_argument(idx, _output, 2, out_slice);
- _kernel.set_argument(idx++, _input->info()->dimension(0));
- _kernel.set_argument(idx++, _input->info()->dimension(1));
- _kernel.update_shader_params();
-
- enqueue(*this, in_slice);
- }
- while(window.slide_window_slice_3D(in_slice) && out_window.slide_window_slice_1D(out_slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.cpp
deleted file mode 100644
index c29d9fc4d5..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <string>
-
-using namespace arm_compute;
-
-GCNormalizationLayerKernel::GCNormalizationLayerKernel()
- : _input(nullptr), _squared_input(nullptr), _output(nullptr), _border_size(0)
-{
-}
-
-BorderSize GCNormalizationLayerKernel::border_size() const
-{
- return _border_size;
-}
-
-void GCNormalizationLayerKernel::configure(const IGCTensor *input, const IGCTensor *squared_input, IGCTensor *output, NormalizationLayerInfo norm_info)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_ERROR_ON_MSG(!(norm_info.norm_size() % 2), "Normalization size should be odd");
- ARM_COMPUTE_ERROR_ON_MSG(norm_info.type() == NormType::IN_MAP_2D, "2D In-Map Normalization not implemented");
-
- // Set build options
- std::set<std::string> build_opts;
-
- _input = input;
- _squared_input = squared_input;
- _output = output;
-
- const bool is_in_map = norm_info.is_in_map();
- const unsigned int border_width = is_in_map ? std::min(norm_info.norm_size() / 2, 3U) : 0;
- _border_size = BorderSize(0, border_width);
-
- // Set kernel static arguments
- std::string func_name = ((norm_info.type() == NormType::IN_MAP_1D) ? "IN_MAP_1D" : "CROSS_MAP");
- build_opts.emplace(("#define " + func_name));
- build_opts.emplace(("#define COEFF " + float_to_string_with_full_precision(norm_info.scale_coeff())));
- build_opts.emplace(("#define BETA " + float_to_string_with_full_precision(norm_info.beta())));
- build_opts.emplace(("#define KAPPA " + float_to_string_with_full_precision(norm_info.kappa())));
- build_opts.emplace(("#define RADIUS " + support::cpp11::to_string(norm_info.norm_size() / 2)));
- build_opts.emplace(("#define LOCAL_SIZE_X " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1)));
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("normalization_layer", build_opts));
-
- // Configure kernel window
- const unsigned int num_elems_processed_per_iteration = 1;
- const unsigned int num_elems_read_per_iteration = num_elems_processed_per_iteration + 2 * (norm_info.norm_size() / 2);
-
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input_access(input->info(), -_border_size.left, num_elems_read_per_iteration);
- AccessWindowHorizontal squared_input_access(squared_input->info(), -_border_size.left, num_elems_read_per_iteration);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win, input_access, squared_input_access, output_access);
-
- output_access.set_valid_region(win, input->info()->valid_region());
-
- IGCKernel::configure(win);
-}
-
-void GCNormalizationLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_3D();
-
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1;
- add_3D_tensor_argument(idx, _input, binding++, slice);
- add_3D_tensor_argument(idx, _squared_input, binding++, slice);
- add_3D_tensor_argument(idx, _output, binding++, slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.cpp
deleted file mode 100644
index 971b540a83..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-namespace
-{
-Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std)
-{
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16);
- ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(output);
- ARM_COMPUTE_RETURN_ERROR_ON(input->data_layout() != DataLayout::NCHW);
-
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, mean, std);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(mean, std);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(mean->num_dimensions() > 1, "mean and std must be vectors");
-
- const unsigned int channel_idx = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::CHANNEL);
- ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(channel_idx) != mean->dimension(0));
-
- // Checks performed when output is configured
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input, output);
- }
-
- return Status{};
-}
-
-std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output, ITensorInfo *mean, ITensorInfo *std)
-{
- // Output tensor auto initialization if not yet initialized
- auto_init_if_empty(*output, *input->clone());
-
- const unsigned int num_elems_processed_per_iteration = 4;
-
- // Configure kernel window
- Window win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input_access(input, 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output, 0, num_elems_processed_per_iteration);
- const int mean_padding = ceil_to_multiple(mean->dimension(0), num_elems_processed_per_iteration) - mean->dimension(0);
- const int std_padding = ceil_to_multiple(std->dimension(0), num_elems_processed_per_iteration) - std->dimension(0);
- AccessWindowStatic mean_access(mean, 0, 0, mean->dimension(0) + mean_padding, mean->dimension(1));
- AccessWindowStatic std_access(std, 0, 0, std->dimension(0) + std_padding, std->dimension(1));
-
- const bool window_changed = update_window_and_padding(win, input_access, output_access, mean_access, std_access);
- output_access.set_valid_region(win, input->valid_region());
-
- Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
- return std::make_pair(err, win);
-}
-} // namespace
-
-GCNormalizePlanarYUVLayerKernel::GCNormalizePlanarYUVLayerKernel()
- : _input(nullptr), _output(nullptr), _mean(nullptr), _std(nullptr)
-{
-}
-
-void GCNormalizePlanarYUVLayerKernel::configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *std)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, output, mean, std);
-
- // Output tensor auto initialization if not yet initialized
- auto_init_if_empty(*output->info(), *input->info()->clone());
-
- // Perform validation step
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), output->info(), mean->info(), std->info()));
-
- _input = input;
- _output = output;
- _mean = mean;
- _std = std;
-
- // Set build options
- std::set<std::string> build_opts;
- build_opts.emplace(("#define LOCAL_SIZE_X " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1)));
- build_opts.emplace(("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1)));
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("normalize_planar_yuv_layer", build_opts));
-
- // Configure kernel window
- auto win_config = validate_and_configure_window(input->info(), output->info(), mean->info(), std->info());
- ARM_COMPUTE_ERROR_THROW_ON(std::get<0>(win_config));
-
- IGCKernel::configure(std::get<1>(win_config));
-}
-
-Status GCNormalizePlanarYUVLayerKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std)
-{
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output, mean, std));
- ARM_COMPUTE_RETURN_ON_ERROR(std::get<0>(validate_and_configure_window(input->clone().get(), output->clone().get(), mean->clone().get(), std->clone().get())));
- return Status{};
-}
-
-void GCNormalizePlanarYUVLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window slice = window.first_slice_window_3D();
-
- Window slice_in;
- //slice_in.use_tensor_dimensions(_mean->info()->tensor_shape());
- slice_in = window.first_slice_window_1D();
- slice_in.set(Window::DimX, Window::Dimension(0, 0, 0));
-
- unsigned int idx = 2 * num_arguments_per_3D_tensor();
- add_1D_tensor_argument(idx, _mean, 3, slice_in);
- add_1D_tensor_argument(idx, _std, 4, slice_in);
-
- slice_in = window.first_slice_window_3D();
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- idx = 0;
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_3D_tensor_argument(idx, _output, 2, slice);
-
- _kernel.update_shader_params();
-
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice) && window.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.cpp
deleted file mode 100644
index 76559146ae..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <cmath>
-#include <cstdlib>
-#include <set>
-#include <string>
-using namespace arm_compute;
-
-GCPixelWiseMultiplicationKernel::GCPixelWiseMultiplicationKernel()
- : _input1(nullptr), _input2(nullptr), _output(nullptr)
-{
-}
-
-void GCPixelWiseMultiplicationKernel::configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, float scale)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input1, input2, output);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input1, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input1, input2);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
- ARM_COMPUTE_ERROR_ON_MSG(scale < 0, "Scale cannot be negative. ");
-
- // Auto initialize output if not initialized
- {
- set_shape_if_empty(*output->info(), input1->info()->tensor_shape());
- set_format_if_unknown(*output->info(), Format::F32);
- }
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input1, input2, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input1, input2, output);
- ARM_COMPUTE_ERROR_ON_MSG(scale < 0, "Scale cannot be negative. ");
-
- _input1 = input1;
- _input2 = input2;
- _output = output;
-
- std::string data_type;
- std::string compute_type;
-
- // Set kernel build options
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
-
- build_opts.emplace("#define SCALE " + support::cpp11::to_string(scale));
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("pixelwise_mul_float", build_opts));
-
- // Configure kernel window
- constexpr unsigned int num_elems_processed_per_iteration = 1;
-
- Window win = calculate_max_window(*input1->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input1_access(input1->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal input2_access(input2->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win, input1_access, input2_access, output_access);
-
- ValidRegion valid_region = intersect_valid_regions(input1->info()->valid_region(),
- input2->info()->valid_region());
- output_access.set_valid_region(win, valid_region);
-
- IGCKernel::configure(win);
-}
-
-void GCPixelWiseMultiplicationKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_3D();
-
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1;
- add_3D_tensor_argument(idx, _input1, binding++, slice);
- add_3D_tensor_argument(idx, _input2, binding++, slice);
- add_3D_tensor_argument(idx, _output, binding++, slice);
-
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp
deleted file mode 100644
index 13efd10532..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-#include <tuple>
-
-using namespace arm_compute;
-
-namespace
-{
-// Internal window config info
-using GCPoolingConfig = std::pair<unsigned int, BorderSize>; //num_elems_processed_per_iteration, border_size
-
-void auto_init(const ITensorInfo *input, ITensorInfo *output, unsigned int pooled_w, unsigned int pooled_h)
-{
- TensorShape output_shape{ input->tensor_shape() };
- output_shape.set(0, pooled_w);
- output_shape.set(1, pooled_h);
-
- auto_init_if_empty(*output, input->clone()->set_tensor_shape(output_shape));
-}
-
-Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices)
-{
- ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(indices, "Indices not supported in GLES backend");
- ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG((is_data_type_quantized_asymmetric(input->data_type()) && pool_info.pool_type == PoolingType::L2),
- "Unsupported combination of parameters!");
- ARM_COMPUTE_RETURN_ERROR_ON(!pool_info.pad_stride_info.padding_is_symmetric());
-
- const bool is_global_pooling = pool_info.is_global_pooling;
- const unsigned int pool_size = is_global_pooling ? input->tensor_shape().x() : pool_info.pool_size.width;
-
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(is_global_pooling && (input->tensor_shape().x() != input->tensor_shape().y()),
- "Global pooling is supported only with rectangular inputs!");
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(!is_global_pooling && ((pool_info.pad_stride_info.pad().first >= pool_size) || (pool_info.pad_stride_info.pad().second >= pool_size)),
- "Invalid pool size and pool pad combination!");
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(pool_info.pool_size.width != pool_info.pool_size.height, "Invalid Pool size, width not equal to height!");
-
- // Checks performed when output is configured
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- unsigned int pooled_w = 0;
- unsigned int pooled_h = 0;
- std::tie(pooled_w, pooled_h) = scaled_dimensions(input->dimension(0),
- input->dimension(1),
- pool_size,
- pool_size,
- pool_info.pad_stride_info);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG((output->dimension(0) != pooled_w) || (output->dimension(1) != pooled_h),
- "Invalid output pooling dimensions!");
- }
-
- return Status{};
-}
-
-std::tuple<Status, Window, GCPoolingConfig> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output, const PoolingLayerInfo &pool_info)
-{
- int pool_pad_x = 0;
- int pool_pad_y = 0;
- int pool_stride_x = 0;
- int pool_stride_y = 0;
- unsigned int pooled_w = 0;
- unsigned int pooled_h = 0;
- int pool_size = pool_info.pool_size.width;
- const PadStrideInfo pad_stride_info = pool_info.pad_stride_info;
- std::tie(pool_pad_x, pool_pad_y) = pad_stride_info.pad();
- std::tie(pool_stride_x, pool_stride_y) = pad_stride_info.stride();
-
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
-
- // Update pool size in case of global pooling
- pool_size = pool_info.is_global_pooling ? input->dimension(0) : pool_size;
-
- // Check output dimensions
- std::tie(pooled_w, pooled_h) = scaled_dimensions(input->dimension(0),
- input->dimension(1),
- pool_size,
- pool_size,
- pad_stride_info);
-
- auto_init(input, output, pooled_w, pooled_h);
-
- BorderSize border_size = BorderSize(pool_pad_y, pool_pad_x);
-
- const int input_width = input->dimension(0);
- const int input_height = input->dimension(1);
-
- unsigned int num_elems_processed_per_iteration = 1;
-
- // Create kernel
- if(pool_size == 3)
- {
- // Check if we have pool3x3 with stride_x less equal than 3. In these cases, run an optimized OpenGLES kernel where
- // each thread computes 4 output elements
- const bool is_pool3x3_stride_le3 = (pool_size == 3) && (pool_stride_x <= 3);
-
- int num_elems_read_per_iteration = pool_size;
-
- if(input->data_type() == DataType::F32)
- {
- if(is_pool3x3_stride_le3)
- {
- // Change the number of elements processed and number of elements read per iteration for pooling 3x3 with stride less equal than 3
- num_elems_processed_per_iteration = 4;
- num_elems_read_per_iteration = pool_size * (pool_stride_x + 1);
- }
- }
- else
- {
- if(is_pool3x3_stride_le3)
- {
- num_elems_processed_per_iteration = 4;
- }
- else
- {
- num_elems_processed_per_iteration = 2;
- }
- }
-
- const int upper_bound_w = ((pooled_w - 1) * pool_stride_x - pool_pad_x + num_elems_read_per_iteration) - input_width;
- const int upper_bound_h = ((pooled_h - 1) * pool_stride_y - pool_pad_y + pool_size) - input_height;
-
- border_size.right = std::max(upper_bound_w, pool_pad_x);
- border_size.bottom = std::max(upper_bound_h, pool_pad_y);
- }
- else // Run general case
- {
- if(input->data_type() == DataType::F32)
- {
- num_elems_processed_per_iteration = 1;
- }
- else
- {
- num_elems_processed_per_iteration = 2;
- }
-
- const int upper_bound_w = ((pooled_w - 1) * pool_stride_x - pool_pad_x + pool_size) - input_width;
- const int upper_bound_h = ((pooled_h - 1) * pool_stride_y - pool_pad_y + pool_size) - input_height;
-
- border_size.right = std::max(upper_bound_w, pool_pad_x);
- border_size.bottom = std::max(upper_bound_h, pool_pad_y);
- }
- // Configure kernel window
- Window win = calculate_max_window(*output, Steps(num_elems_processed_per_iteration));
-
- if(input->data_type() == DataType::F32)
- {
- AccessWindowStatic input_access(input, -pool_pad_x, -pool_pad_y, input_width + border_size.right, input_height + border_size.bottom);
- AccessWindowHorizontal output_access(output, 0, num_elems_processed_per_iteration);
- bool window_changed = update_window_and_padding(win, input_access, output_access);
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->tensor_shape()));
- Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
- return std::make_tuple(err, win, GCPoolingConfig(num_elems_processed_per_iteration, border_size));
- }
- else
- {
- // Calculate output right and bottom border
- const int output_width = output->dimension(0);
- const int output_height = output->dimension(1);
- const int output_padding_right = ceil_to_multiple(output_width, num_elems_processed_per_iteration) - output_width;
- const int output_padding_bottom = ceil_to_multiple(output_height, 1) - output_height;
-
- const int input_total_width = std::max(int(input->padding().left), int(pool_pad_x)) + input_width + std::max(int(input->padding().right), int(pool_pad_x));
- const int input_padding_right = ceil_to_multiple(input_total_width, num_elems_processed_per_iteration) - input_width - pool_pad_x;
- const int input_total_height = std::max(int(input->padding().top), int(pool_pad_y)) + input_height + std::max(int(input->padding().bottom), int(pool_pad_y));
- const int input_padding_bottom = input_total_height - input_height - pool_pad_y;
-
- // Configure kernel window
- AccessWindowStatic input_access(input, -pool_pad_x, -pool_pad_y, input_width + input_padding_right, input_height + input_padding_bottom);
- AccessWindowStatic output_access(output, 0, 0, output_width + output_padding_right, output_height + output_padding_bottom);
- bool window_changed = update_window_and_padding(win, input_access, output_access);
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->tensor_shape()));
- Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
- return std::make_tuple(err, win, GCPoolingConfig(num_elems_processed_per_iteration, border_size));
- }
-}
-} // namespace
-
-GCPoolingLayerKernel::GCPoolingLayerKernel()
- : _input(nullptr), _output(nullptr), _indices(nullptr), _pool_info(), _border_size(0), _num_elems_processed_per_iteration(1)
-{
-}
-
-BorderSize GCPoolingLayerKernel::border_size() const
-{
- return _border_size;
-}
-
-void GCPoolingLayerKernel::configure(const IGCTensor *input, IGCTensor *output, const PoolingLayerInfo &pool_info, IGCTensor *indices)
-{
- int pool_pad_x = 0;
- int pool_pad_y = 0;
- int pool_stride_x = 0;
- int pool_stride_y = 0;
- unsigned int pooled_w = 0;
- unsigned int pooled_h = 0;
- const PoolingType pool_type = pool_info.pool_type;
- int pool_size = pool_info.pool_size.width;
- const PadStrideInfo pad_stride_info = pool_info.pad_stride_info;
- const bool exclude_padding = pool_info.exclude_padding;
- std::tie(pool_pad_x, pool_pad_y) = pad_stride_info.pad();
- std::tie(pool_stride_x, pool_stride_y) = pad_stride_info.stride();
-
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
-
- // Update pool size in case of global pooling
- pool_size = pool_info.is_global_pooling ? input->info()->dimension(0) : pool_size;
-
- // Check output dimensions
- std::tie(pooled_w, pooled_h) = scaled_dimensions(input->info()->dimension(0),
- input->info()->dimension(1),
- pool_size,
- pool_size,
- pad_stride_info);
-
- auto_init(input->info(), output->info(), pooled_w, pooled_h);
-
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), output->info(), pool_info, (indices) ? indices->info() : nullptr));
-
- // Set instance variables
- _input = input;
- _output = output;
- _pool_info = pool_info;
- _indices = indices;
- // Set build options
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- if(input->info()->data_type() == DataType::F32)
- {
- build_opts.insert("#define DATA_TYPE_FP32");
- }
- else
- {
- build_opts.insert("#define DATA_TYPE_FP16");
- }
- if(exclude_padding)
- {
- build_opts.emplace("#define EXCLUDE_PADDING");
- }
- build_opts.emplace(("#define POOL_" + string_from_pooling_type(pool_type)));
- build_opts.emplace(("#define STRIDE_X " + support::cpp11::to_string(pool_stride_x)));
- build_opts.emplace(("#define MAX_WIDTH " + support::cpp11::to_string(input->info()->dimension(0) + (exclude_padding ? 0 : pool_pad_x))));
- build_opts.emplace(("#define MAX_HEIGHT " + support::cpp11::to_string(input->info()->dimension(1) + (exclude_padding ? 0 : pool_pad_y))));
- build_opts.emplace(("#define STRIDE_Y " + support::cpp11::to_string(pool_stride_y)));
- build_opts.emplace(("#define PAD_X " + support::cpp11::to_string(pool_pad_x)));
- build_opts.emplace(("#define PAD_Y " + support::cpp11::to_string(pool_pad_y)));
-
- // Create kernel
- if((pool_size == 2) || (pool_size == 3) || (pool_size == 7))
- {
- // Check if we have pool3x3 with stride_x less equal than 3. In these cases, run an optimized OpenGLES kernel where
- // each thread computes 4 output elements
- const bool is_pool3x3_stride_le3 = (pool_size == 3) && (pool_stride_x <= 3);
-
- std::string kernel_name = "pooling_layer_" + support::cpp11::to_string(pool_size);
- if(is_pool3x3_stride_le3)
- {
- build_opts.insert("#define POOLING_LAYER_3_OPTIMIZED");
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name + "_optimized", build_opts));
- }
- else
- {
- build_opts.insert("#define POOLING_LAYER_" + support::cpp11::to_string(pool_size));
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name, build_opts));
- }
- }
- else // Run general case
- {
- build_opts.emplace(("#define POOL_SIZE " + support::cpp11::to_string(pool_size)));
-
- build_opts.insert("#define POOLING_LAYER_N");
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("pooling_layer_n", build_opts));
- }
- // Configure kernel window
- auto win_config = validate_and_configure_window(input->info(), output->info(), pool_info);
- ARM_COMPUTE_ERROR_THROW_ON(std::get<0>(win_config));
-
- IGCKernel::configure(std::get<1>(win_config));
- GCPoolingConfig pooling_config = std::get<2>(win_config);
- _num_elems_processed_per_iteration = pooling_config.first;
- _border_size = pooling_config.second;
-}
-
-Status GCPoolingLayerKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices)
-{
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output, pool_info, indices));
- ARM_COMPUTE_RETURN_ON_ERROR(std::get<0>(validate_and_configure_window(input->clone().get(), output->clone().get(), pool_info)));
-
- return Status{};
-}
-
-void GCPoolingLayerKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- unsigned int pool_pad_x;
- unsigned int pool_pad_y;
- unsigned int pool_stride_x;
- unsigned int pool_stride_y;
- std::tie(pool_pad_x, pool_pad_y) = _pool_info.pad_stride_info.pad();
- std::tie(pool_stride_x, pool_stride_y) = _pool_info.pad_stride_info.stride();
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window window_collapsed = window.collapse_if_possible(IGCKernel::window(), Window::DimZ);
-
- Window slice = window_collapsed.first_slice_window_3D();
- Window slice_in_orig = window_collapsed.first_slice_window_3D();
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- // Upsample input by pool size
- Window in_slice(slice_in_orig); // NOLINT
- in_slice.set(Window::DimX, Window::Dimension(in_slice.x().start() - pool_pad_x, in_slice.x().end() * pool_stride_x, pool_stride_x * _num_elems_processed_per_iteration));
- in_slice.set(Window::DimY, Window::Dimension(in_slice.y().start() - pool_pad_y, in_slice.y().end() * pool_stride_y, pool_stride_y));
-
- // Set inputs
- unsigned int idx = 0;
- add_3D_tensor_argument(idx, _input, 1, in_slice);
- add_3D_tensor_argument(idx, _output, 2, slice);
-
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window_collapsed.slide_window_slice_3D(slice) && window_collapsed.slide_window_slice_3D(slice_in_orig));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCScaleKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCScaleKernel.cpp
deleted file mode 100644
index a0795c668f..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCScaleKernel.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2016-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-BorderSize GCScaleKernel::border_size() const
-{
- return BorderSize(1);
-}
-
-void GCScaleKernel::configure(const IGCTensor *input, IGCTensor *output, const ScaleKernelInfo &info)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_ERROR_ON(output == input);
- ARM_COMPUTE_ERROR_ON(info.interpolation_policy != InterpolationPolicy::NEAREST_NEIGHBOR);
-
- _input = input;
- _output = output;
-
- // Compute the ratio between source width/height and destination width/height
- const auto wr = static_cast<float>(input->info()->dimension(0)) / static_cast<float>(output->info()->dimension(0));
- const auto hr = static_cast<float>(input->info()->dimension(1)) / static_cast<float>(output->info()->dimension(1));
-
- // Compute actual border size
- const bool border_undefined = info.border_mode == BorderMode::UNDEFINED;
- BorderSize border = border_undefined ? BorderSize(0) : border_size();
-
- // Area interpolation behaves as Nearest Neighbour in case of up-sampling
- auto interpolation_policy_to_use = info.interpolation_policy;
- if(interpolation_policy_to_use == InterpolationPolicy::AREA && wr <= 1.f && hr <= 1.f)
- {
- interpolation_policy_to_use = InterpolationPolicy::NEAREST_NEIGHBOR;
- }
- else
- {
- ARM_COMPUTE_ERROR_ON(interpolation_policy_to_use == InterpolationPolicy::AREA);
- }
-
- // Create kernel
- std::set<std::string> build_opts;
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
-
- build_opts.emplace("#define DATA_TYPE_FP16");
- build_opts.emplace("#define BORDER_SIZE " + support::cpp11::to_string(border.right));
- if(info.sampling_policy == SamplingPolicy::TOP_LEFT)
- {
- build_opts.emplace("#define SAMPLING_POLICY_TOP_LEFT");
- }
- else
- {
- build_opts.emplace("#define SAMPLING_POLICY_CENTER");
- }
-
- // Configure kernel window
- unsigned int num_elems_processed_per_iteration = 4;
- unsigned int input_width_alignment = 2;
-
- // performance optimization for 2x upscaling with no border
- if((fabs(wr - 0.5) < 1e-6) && (fabs(hr - 0.5) < 1e-6) && border_undefined)
- {
- num_elems_processed_per_iteration = 8;
- input_width_alignment = 4;
- build_opts.emplace("#define SCALE_NEAREST_8X");
- }
- else
- {
- build_opts.emplace("#define SCALE_NEAREST_GENERIC");
- }
-
- std::string interpolation_name = string_from_interpolation_policy(interpolation_policy_to_use); // NOLINT
- std::transform(interpolation_name.begin(), interpolation_name.end(), interpolation_name.begin(), ::tolower);
- std::string kernel_name = "scale_" + interpolation_name;
- _kernel = GCKernelLibrary::get().create_kernel(kernel_name, build_opts);
-
- Window win = calculate_max_window(*output->info(), Steps(num_elems_processed_per_iteration));
-
- const ValidRegion &input_valid_region = input->info()->valid_region();
-
- const int total_width = border.left + input_valid_region.anchor[0] + input_valid_region.shape[0] + border.right;
- const int padding_right = ceil_to_multiple(total_width, input_width_alignment) - border.left - input_valid_region.anchor[0] - input_valid_region.shape[0];
-
- // Reads can occur within the valid region of the input
- AccessWindowStatic input_access(input->info(),
- input_valid_region.anchor[0] - border.left, input_valid_region.anchor[1] - border.top,
- input_valid_region.anchor[0] + input_valid_region.shape[0] + padding_right,
- input_valid_region.anchor[1] + input_valid_region.shape[1] + border.bottom);
-
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win, input_access, output_access);
-
- output_access.set_valid_region(win, calculate_valid_region_scale(*(input->info()),
- output->info()->tensor_shape(),
- info.interpolation_policy,
- info.sampling_policy,
- border_undefined));
-
- IGCKernel::configure(win);
-
- unsigned int idx = 2 * num_arguments_per_3D_tensor(); //Skip the tensor parameters
- _kernel.set_argument<float>(idx++, static_cast<float>(input->info()->dimension(0)));
- _kernel.set_argument<float>(idx++, static_cast<float>(input->info()->dimension(1)));
- _kernel.set_argument<float>(idx++, wr);
- _kernel.set_argument<float>(idx++, hr);
-}
-
-void GCScaleKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- _kernel.use();
-
- _output->set_needs_shifting(true);
-
- Window slice = window.first_slice_window_3D();
- Window slice_in = window.first_slice_window_3D();
-
- slice.shift(Window::DimX, -(_output->info()->padding()).left);
-
- do
- {
- unsigned int idx = 0;
- add_3D_tensor_argument(idx, _input, 1, slice_in);
- add_3D_tensor_argument(idx, _output, 2, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window.slide_window_slice_3D(slice) && window.slide_window_slice_3D(slice_in));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp
deleted file mode 100644
index 39d586da72..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-void GCLogits1DMaxKernel::configure(const IGCTensor *input, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
-
- // Softmax across the x dimension
- TensorShape output_shape{ input->info()->tensor_shape() };
- output_shape.set(0, 1);
-
- // Output auto initialization if not yet initialized
- auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
-
- _input = input;
- _output = output;
-
- // Set build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.insert("#define " + dt_name);
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.insert("#define SOFTMAX_LAYER_MAX");
-
- // Tell the kernel that the width is not a multiple of 8
- if((input->info()->dimension(0) % 8) != 0)
- {
- build_opts.insert("#define NON_MULTIPLE_OF_8");
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("softmax_layer_max", build_opts));
-
- // Set fixed arguments
- unsigned int idx = 2 * num_arguments_per_3D_tensor(); //Skip the input and output parameters
- _kernel.set_argument(idx++, input->info()->dimension(0));
-
- // Configure kernel window
- // The kernel loops over all elements in steps of 8
- const unsigned int num_elems_processed_per_iteration = ceil_to_multiple(input->info()->dimension(0), 8);
- unsigned int num_elems_written_per_iteration = 1;
- if(input->info()->data_type() == DataType::F16)
- {
- num_elems_written_per_iteration = 2;
- }
-
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration));
- AccessWindowHorizontal input_access(input->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_written_per_iteration);
-
- update_window_and_padding(win, input_access, output_access);
-
- output_access.set_valid_region(win, ValidRegion(Coordinates(), output->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-GCLogits1DShiftExpSumKernel::GCLogits1DShiftExpSumKernel()
- : _input(nullptr), _max(nullptr), _output(nullptr), _sum(nullptr)
-{
-}
-
-void GCLogits1DShiftExpSumKernel::configure(const IGCTensor *input, const IGCTensor *max, IGCTensor *output, IGCTensor *sum)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(max, sum, output);
-
- // Output auto initialization if not yet initialized
- auto_init_if_empty(*sum->info(), max->info()->tensor_shape(), 1, input->info()->data_type());
- auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output, max, sum);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(max, sum);
-
- _input = input;
- _max = max;
- _output = output;
- _sum = sum;
-
- // Set build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.insert("#define " + dt_name);
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.insert("#define SOFTMAX_LAYER_SHIFT_EXP_SUM");
-
- // Tell the kernel that the width is not a multiple of 8
- if((input->info()->dimension(0) % 8) != 0)
- {
- build_opts.insert("#define NON_MULTIPLE_OF_8");
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("softmax_layer_shift_exp_sum", build_opts));
-
- // Set fixed arguments
- unsigned int idx = 4 * num_arguments_per_3D_tensor(); //Skip the input and output parameters
- _kernel.set_argument(idx++, input->info()->dimension(0));
-
- // Configure window
- // The kernel loops over all elements in steps of 8
- const unsigned int num_elems_processed_per_iteration = ceil_to_multiple(input->info()->dimension(0), 8);
- unsigned int num_elems_written_per_iteration = 1;
- if(input->info()->data_type() == DataType::F16)
- {
- num_elems_written_per_iteration = 2;
- }
-
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input_access(input->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal max_access(max->info(), 0, num_elems_written_per_iteration);
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
- AccessWindowHorizontal sum_access(sum->info(), 0, num_elems_written_per_iteration);
-
- update_window_and_padding(win, input_access, max_access, output_access, sum_access);
-
- output_access.set_valid_region(win, input->info()->valid_region());
- sum_access.set_valid_region(win, ValidRegion(Coordinates(), sum->info()->tensor_shape()));
-
- IGCKernel::configure(win);
-}
-
-void GCLogits1DShiftExpSumKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- Window window_collapsed = window.collapse_if_possible(IGCKernel::window(), Window::DimZ);
- Window slice = window_collapsed.first_slice_window_3D();
-
- _kernel.use();
-
- do
- {
- unsigned int idx = 0;
- unsigned int binding = 1; // SSBO binding starts from 1.
- // Set inputs
- add_3D_tensor_argument(idx, _input, binding++, slice);
- add_3D_tensor_argument(idx, _max, binding++, slice);
- add_3D_tensor_argument(idx, _output, binding++, slice);
- add_3D_tensor_argument(idx, _sum, binding++, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window_collapsed.slide_window_slice_3D(slice));
-}
-
-GCLogits1DNormKernel::GCLogits1DNormKernel()
- : _input(nullptr), _sum(nullptr), _output(nullptr)
-{
-}
-
-void GCLogits1DNormKernel::configure(const IGCTensor *input, const IGCTensor *sum, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(sum, output);
-
- // Output auto initialization if not yet initialized
- auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, sum, output);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output);
-
- _input = input;
- _sum = sum;
- _output = output;
-
- // Set build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.insert("#define " + dt_name);
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.insert("#define SOFTMAX_LAYER_NORM");
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("softmax_layer_norm", build_opts));
-
- // Configure window
- constexpr unsigned int num_elems_processed_per_iteration = 8;
- unsigned int num_elems_written_per_iteration = 1;
- if(input->info()->data_type() == DataType::F16)
- {
- num_elems_written_per_iteration = 2;
- }
-
- Window win = calculate_max_window(*input->info(), Steps(num_elems_processed_per_iteration));
-
- AccessWindowHorizontal input_access(input->info(), 0, num_elems_processed_per_iteration);
- AccessWindowStatic sum_access(sum->info(), 0, 0, num_elems_written_per_iteration, sum->info()->dimension(1));
- AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration);
-
- update_window_and_padding(win, input_access, sum_access, output_access);
-
- output_access.set_valid_region(win, input->info()->valid_region());
-
- IGCKernel::configure(win);
-}
-
-void GCLogits1DNormKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- Window window_collapsed = window.collapse_if_possible(IGCKernel::window(), Window::DimZ);
- Window slice = window_collapsed.first_slice_window_3D();
-
- _kernel.use();
-
- do
- {
- Window sum_slice = slice;
- sum_slice.set(Window::DimX, Window::Dimension(0, 1, 1));
-
- unsigned int idx = 0;
- unsigned int binding = 1; // SSBO binding starts from 1.
- // Set inputs
- add_3D_tensor_argument(idx, _input, binding++, slice);
- add_3D_tensor_argument(idx, _sum, binding++, slice);
- add_3D_tensor_argument(idx, _output, binding++, slice);
-
- _kernel.update_shader_params();
- enqueue(*this, slice);
- }
- while(window_collapsed.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.cpp
deleted file mode 100644
index 78b008484e..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/IAccessWindow.h"
-#include "arm_compute/core/ITensor.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-using namespace arm_compute;
-
-GCTensorShiftKernel::GCTensorShiftKernel()
- : _input(nullptr), _lws(gles::NDRange(1U, 1U, 1U)), _left_padding(0)
-{
-}
-
-void GCTensorShiftKernel::configure(IGCTensor *input)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
-
- _input = input;
-
- std::set<std::string> options;
- options.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(_lws[0]));
- options.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(_lws[1]));
- options.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(_lws[2]));
- options.emplace("#define WIDTH " + support::cpp11::to_string(input->info()->dimension(0)));
-
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- options.emplace(("#define " + dt_name));
-
- unsigned int num_elems_written_per_iteration_x = input->info()->dimension(0) + input->info()->padding().left + input->info()->padding().right;
-
- std::stringstream kernel_name;
- kernel_name << "tensorshift";
-
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel(kernel_name.str(), options));
-
- Window win;
- win.set(Window::DimX, Window::Dimension(0, num_elems_written_per_iteration_x, num_elems_written_per_iteration_x));
- win.use_tensor_dimensions(input->info()->tensor_shape(), Window::DimY);
- win.use_tensor_dimensions(input->info()->tensor_shape(), Window::DimZ);
-
- _left_padding = _input->info()->padding().left;
-
- IGCKernel::configure(win);
-}
-
-void GCTensorShiftKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
-
- if(int(_left_padding) == 0 || !_input->needs_shifting())
- {
- return;
- }
-
- _kernel.use();
-
- // Get initial windows
- Window slice = window.first_slice_window_3D();
- slice.shift(Window::DimX, -(_input->info()->padding()).left);
-
- do
- {
- unsigned int idx = 0;
-
- add_3D_tensor_argument(idx, _input, 1, slice);
-
- _kernel.set_argument(idx++, static_cast<unsigned int>(_left_padding));
-
- _kernel.update_shader_params();
- enqueue(*this, slice, _lws);
- }
- while(window.slide_window_slice_3D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp
deleted file mode 100644
index 3bec05b5f1..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "src/core/AccessWindowStatic.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include <set>
-#include <string>
-
-using namespace arm_compute;
-
-void GCTransposeKernel::configure(const IGCTensor *input, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
-
- TensorShape output_shape{ input->info()->tensor_shape() };
- const size_t w_out = input->info()->dimension(1);
- const size_t h_out = input->info()->dimension(0);
- output_shape.set(0, w_out);
- output_shape.set(1, h_out);
-
- // Output tensor auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type());
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- _input = input;
- _output = output;
-
- // for better performance
- if(w_out < 512 && h_out < 512)
- {
- _lws_hint = gles::NDRange(8U, 1U, 1U);
- }
- else
- {
- _lws_hint = gles::NDRange(1U, 8U, 1U);
- }
-
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace(("#define " + dt_name));
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(_lws_hint[0]));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(_lws_hint[1]));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(_lws_hint[2]));
-
- // Configure kernel window
- unsigned int num_elems_processed_per_iteration = 4;
-
- if(input->info()->data_type() == DataType::F16)
- {
-#define TRANSPOSE_8X8
-
-#if defined(TRANSPOSE_4X4)
- build_opts.emplace(("#define TRANSPOSE_4X4"));
- num_elems_processed_per_iteration = 4;
-#elif defined(TRANSPOSE_8X8) /* TRANSPOSE_4X4 */
- if(w_out != h_out)
- {
- build_opts.emplace("#define TRANSPOSE_8X8");
- num_elems_processed_per_iteration = 8;
- }
- else
- {
- build_opts.emplace("#define TRANSPOSE_8X8_SQUARE");
- num_elems_processed_per_iteration = 8;
- }
-#endif /* TRANSPOSE_4X4 */
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("transpose", build_opts));
-
- const unsigned int width_aligned = num_elems_processed_per_iteration * static_cast<unsigned int>(_lws_hint[0]);
- const unsigned int height_aligned = num_elems_processed_per_iteration * static_cast<unsigned int>(_lws_hint[1]);
-
- AccessWindowStatic input_access(input->info(), 0, 0,
- ceil_to_multiple(input->info()->dimension(0), width_aligned),
- ceil_to_multiple(input->info()->dimension(1), height_aligned));
- AccessWindowStatic output_access(output->info(), 0, 0,
- ceil_to_multiple(output->info()->dimension(0), height_aligned),
- ceil_to_multiple(output->info()->dimension(1), width_aligned));
-
- Window win = calculate_max_window(*input->info(), Steps(width_aligned, height_aligned));
- win.set_dimension_step(Window::DimX, num_elems_processed_per_iteration);
- win.set_dimension_step(Window::DimY, num_elems_processed_per_iteration);
- update_window_and_padding(win, input_access, output_access);
- output_access.set_valid_region(win, output->info()->valid_region());
-
- IGCKernel::configure(win);
-}
-
-void GCTransposeKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IGCKernel::window(), window);
-
- _kernel.use();
-
- Window slice = window.first_slice_window_2D();
-
- do
- {
- unsigned int idx = 0;
-
- add_2D_tensor_argument(idx, _input, 1, slice);
- add_2D_tensor_argument(idx, _output, 2, slice);
- _kernel.update_shader_params();
- enqueue(*this, slice, _lws_hint);
- }
- while(window.slide_window_slice_2D(slice));
-}
diff --git a/src/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.cpp
deleted file mode 100644
index bcdbfb60dc..0000000000
--- a/src/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/utils/misc/ShapeCalculator.h"
-#include "src/core/helpers/AutoConfiguration.h"
-#include "src/core/helpers/WindowHelpers.h"
-#include "support/StringSupport.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-
-using namespace arm_compute;
-using namespace arm_compute::misc::shape_calculator;
-
-GCWeightsReshapeKernel::GCWeightsReshapeKernel()
- : _input(nullptr), _biases(nullptr), _output(nullptr)
-{
-}
-
-void GCWeightsReshapeKernel::configure(const IGCTensor *input, const IGCTensor *biases, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_NULLPTR(output);
-
- // Output tensor auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), input->info()->clone()->set_tensor_shape(compute_weights_reshaped_shape(*input->info(), (biases != nullptr))));
-
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
-
- if(biases != nullptr)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, biases);
- ARM_COMPUTE_ERROR_ON((input->info()->num_dimensions() == 4) && (biases->info()->num_dimensions() != 1));
- ARM_COMPUTE_ERROR_ON((input->info()->num_dimensions() == 5) && (biases->info()->num_dimensions() != 2));
- ARM_COMPUTE_ERROR_ON((input->info()->num_dimensions() == 4) && (biases->info()->dimension(0) != input->info()->tensor_shape()[3]));
- ARM_COMPUTE_ERROR_ON((input->info()->num_dimensions() == 5) && (biases->info()->dimension(0) != input->info()->tensor_shape()[3] || biases->info()->dimension(1) != input->info()->tensor_shape()[4]));
- }
-
- _biases = biases;
- _output = output;
- _input = input;
-
- // Create build options
- std::set<std::string> build_opts;
- std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
- build_opts.emplace("#define " + dt_name);
- build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Y " + support::cpp11::to_string(1));
- build_opts.emplace("#define LOCAL_SIZE_Z " + support::cpp11::to_string(1));
- build_opts.emplace("#define RESHAPE_TO_COLUMNS");
- if(biases != nullptr)
- {
- build_opts.emplace("#define HAS_BIAS");
- }
-
- // Create kernel
- _kernel = static_cast<GCKernel>(GCKernelLibrary::get().create_kernel("reshape_to_columns", build_opts));
-
- // Set static arguments
- unsigned int idx = num_arguments_per_3D_tensor() + num_arguments_per_2D_tensor();
- idx += (biases != nullptr) ? num_arguments_per_1D_tensor() : 0;
- _kernel.set_argument(idx++, _input->info()->dimension(0));
- _kernel.set_argument(idx++, _input->info()->dimension(1));
- _kernel.set_argument(idx++, _input->info()->dimension(2));
- _kernel.set_argument(idx++, _input->info()->dimension(3));
-
- // Configure window
- Window win = calculate_max_window(*input->info(), Steps());
-
- // The GCWeightsReshapeKernel doesn't need padding so update_window_and_padding() can be skipped
- output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape()));
- IGCKernel::configure(win);
-}
-
-void GCWeightsReshapeKernel::run(const Window &window)
-{
- ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(IGCKernel::window(), window);
-
- Window out_window;
- out_window.use_tensor_dimensions(_output->info()->tensor_shape());
-
- Window in_slice = window.first_slice_window_3D();
- Window out_slice = out_window.first_slice_window_2D();
-
- Window biases_window;
- Window biases_slice;
-
- if(_biases != nullptr)
- {
- biases_window.use_tensor_dimensions(_biases->info()->tensor_shape());
- biases_slice = biases_window.first_slice_window_1D();
- }
-
- _kernel.use();
-
- do
- {
- // Set arguments
- unsigned idx = 0;
- add_3D_tensor_argument(idx, _input, 1, in_slice);
- add_2D_tensor_argument(idx, _output, 2, out_slice);
- if(_biases != nullptr)
- {
- add_1D_tensor_argument(idx, _biases, 3, biases_slice);
- biases_window.slide_window_slice_1D(biases_slice);
- }
-
- _kernel.update_shader_params();
- // Run kernel
- enqueue(*this, in_slice);
- }
- while(window.slide_window_slice_4D(in_slice) && out_window.slide_window_slice_2D(out_slice));
-}
diff --git a/src/graph/backends/GLES/GCDeviceBackend.cpp b/src/graph/backends/GLES/GCDeviceBackend.cpp
deleted file mode 100644
index dcab2a5697..0000000000
--- a/src/graph/backends/GLES/GCDeviceBackend.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/graph/backends/GLES/GCDeviceBackend.h"
-
-#include "arm_compute/graph/Graph.h"
-#include "arm_compute/graph/GraphContext.h"
-#include "arm_compute/graph/INode.h"
-#include "arm_compute/graph/Logger.h"
-#include "arm_compute/graph/Tensor.h"
-#include "arm_compute/graph/backends/BackendRegistrar.h"
-#include "arm_compute/graph/backends/GLES/GCFunctionFactory.h"
-#include "arm_compute/graph/backends/GLES/GCNodeValidator.h"
-#include "arm_compute/graph/backends/GLES/GCTensorHandle.h"
-
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/runtime/BlobLifetimeManager.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-#include "arm_compute/runtime/MemoryManagerOnDemand.h"
-#include "arm_compute/runtime/PoolManager.h"
-
-#include "support/ToolchainSupport.h"
-
-namespace arm_compute
-{
-namespace graph
-{
-namespace backends
-{
-/** Register GLES backend */
-static detail::BackendRegistrar<GCDeviceBackend> GCDeviceBackend_registrar(Target::GC);
-
-GCDeviceBackend::GCDeviceBackend()
- : _initialized(false), _allocator()
-{
-}
-
-void GCDeviceBackend::initialize_backend()
-{
- // Setup Scheduler
- GCScheduler::get().default_init();
-}
-
-void GCDeviceBackend::release_backend_context(GraphContext &ctx)
-{
- //Nothing to do
- ARM_COMPUTE_UNUSED(ctx);
-}
-
-void GCDeviceBackend::setup_backend_context(GraphContext &ctx)
-{
- // Force backend initialization
- if(!_initialized)
- {
- initialize_backend();
- _initialized = true;
- }
-
- // Setup a management backend
- if(ctx.memory_management_ctx(Target::GC) == nullptr)
- {
- MemoryManagerContext mm_ctx;
- mm_ctx.target = Target::GC;
- mm_ctx.intra_mm = create_memory_manager(MemoryManagerAffinity::Buffer);
- mm_ctx.cross_mm = create_memory_manager(MemoryManagerAffinity::Buffer);
- mm_ctx.cross_group = std::make_shared<MemoryGroup>(mm_ctx.cross_mm);
- mm_ctx.allocator = &_allocator;
-
- ctx.insert_memory_management_ctx(std::move(mm_ctx));
- }
-}
-
-bool GCDeviceBackend::is_backend_supported()
-{
- return arm_compute::opengles31_is_available();
-}
-
-IAllocator *GCDeviceBackend::backend_allocator()
-{
- return &_allocator;
-}
-
-std::unique_ptr<ITensorHandle> GCDeviceBackend::create_tensor(const Tensor &tensor)
-{
- // Get tensor descriptor
- const TensorDescriptor &tensor_desc = tensor.desc();
- ARM_COMPUTE_ERROR_ON(tensor_desc.target != Target::GC);
-
- // Create backend tensor handle
- TensorInfo info(tensor_desc.shape, 1, tensor_desc.data_type, tensor_desc.quant_info);
- info.set_data_layout(tensor_desc.layout);
-
- return std::make_unique<GCTensorHandle>(info);
-}
-
-std::unique_ptr<ITensorHandle> GCDeviceBackend::create_subtensor(ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent)
-{
- ARM_COMPUTE_UNUSED(parent, shape, coords, extend_parent);
- ARM_COMPUTE_ERROR("GLES backend has no sub-tensor support!");
- return nullptr;
-}
-
-std::unique_ptr<arm_compute::IFunction> GCDeviceBackend::configure_node(INode &node, GraphContext &ctx)
-{
- ARM_COMPUTE_LOG_GRAPH_VERBOSE("Configuring GC node with ID : " << node.id() << std::endl);
- ARM_COMPUTE_ERROR_ON(node.assigned_target() != Target::GC);
-
- // Configure node
- return GCFunctionFactory::create(&node, ctx);
-}
-
-arm_compute::Status GCDeviceBackend::validate_node(INode &node)
-{
- ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating GC node with ID : " << node.id() << std::endl);
- ARM_COMPUTE_ERROR_ON(node.assigned_target() != Target::GC);
-
- return GCNodeValidator::validate(&node);
-}
-
-std::shared_ptr<arm_compute::IMemoryManager> GCDeviceBackend::create_memory_manager(MemoryManagerAffinity affinity)
-{
- if(affinity == MemoryManagerAffinity::Offset)
- {
- ARM_COMPUTE_LOG_GRAPH_WARNING("GC Backend does not support offset affinity memory management!");
- return nullptr;
- }
-
- auto lifetime_mgr = std::make_shared<BlobLifetimeManager>();
- auto pool_mgr = std::make_shared<PoolManager>();
- auto mm = std::make_shared<MemoryManagerOnDemand>(lifetime_mgr, pool_mgr);
-
- return mm;
-}
-
-std::shared_ptr<arm_compute::IWeightsManager> GCDeviceBackend::create_weights_manager()
-{
- return nullptr;
-}
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
diff --git a/src/graph/backends/GLES/GCFunctionsFactory.cpp b/src/graph/backends/GLES/GCFunctionsFactory.cpp
deleted file mode 100644
index ac14425ad4..0000000000
--- a/src/graph/backends/GLES/GCFunctionsFactory.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/graph/backends/GLES/GCFunctionFactory.h"
-
-#include "arm_compute/graph/Graph.h"
-#include "arm_compute/graph/GraphContext.h"
-#include "arm_compute/graph/backends/FunctionHelpers.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCFunctions.h"
-#include "support/Cast.h"
-
-using namespace arm_compute::utils::cast;
-
-namespace arm_compute
-{
-namespace graph
-{
-namespace backends
-{
-/** Target specific information structure used to pass information to the layer templates */
-struct GCTargetInfo
-{
- using TensorType = arm_compute::IGCTensor;
- using SrcTensorType = TensorType;
- static Target TargetType;
-};
-
-Target GCTargetInfo::TargetType = Target::GC;
-
-/** Collection of GC convolution functions */
-struct GCConvolutionLayerFunctions
-{
- using GenericConvolutionLayer = GCConvolutionLayer;
- using GEMMConvolutionLayer = GCConvolutionLayer;
- using DirectConvolutionLayer = GCDirectConvolutionLayer;
-};
-
-/** Collection of GC depthwise convolution functions */
-struct GCDepthwiseConvolutionLayerFunctions
-{
- using DepthwiseConvolutionLayer3x3 = GCDepthwiseConvolutionLayer3x3;
-};
-
-/** Collection of GC element-wise functions */
-struct GCEltwiseFunctions
-{
- using Addition = GCArithmeticAddition;
- using Multiplication = GCPixelWiseMultiplication;
-};
-
-namespace detail
-{
-template <>
-std::unique_ptr<IFunction> create_convolution_layer<GCConvolutionLayerFunctions, GCTargetInfo>(ConvolutionLayerNode &node, GraphContext &ctx)
-{
- validate_node<GCTargetInfo>(node, 3 /* expected inputs */, 1 /* expected outputs */);
-
- // Extract IO and info
- GCTargetInfo::TensorType *input = get_backing_tensor<GCTargetInfo>(node.input(0));
- GCTargetInfo::TensorType *weights = get_backing_tensor<GCTargetInfo>(node.input(1));
- GCTargetInfo::TensorType *biases = get_backing_tensor<GCTargetInfo>(node.input(2));
- GCTargetInfo::TensorType *output = get_backing_tensor<GCTargetInfo>(node.output(0));
-
- if(is_data_type_quantized_asymmetric(input->info()->data_type()))
- {
- biases->info()->set_data_type(DataType::S32);
- }
-
- const PadStrideInfo conv_info = node.convolution_info();
- const ConvolutionMethod conv_algorithm = node.convolution_method();
- const ActivationLayerInfo fused_act = node.fused_activation();
-
- // Create and configure function (we assume that functions have been validated before creation)
- std::shared_ptr<IMemoryManager> mm = get_memory_manager(ctx, GCTargetInfo::TargetType);
- std::unique_ptr<IFunction> func;
- std::string func_name;
-
- if(conv_algorithm == ConvolutionMethod::Direct)
- {
- std::tie(func, func_name) = create_named_function<GCConvolutionLayerFunctions::DirectConvolutionLayer>(
- std::string("DirectConvolutionLayer"),
- input, weights, biases, output, conv_info, fused_act);
- }
- else
- {
- std::tie(func, func_name) = create_named_memory_managed_function<GCConvolutionLayerFunctions::GenericConvolutionLayer>(
- std::string("ConvolutionLayer"), mm,
- input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1U, 1U), fused_act);
- }
-
- // Log info
- ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
- << node.name()
- << " Type: " << func_name
- << " Data Type: " << input->info()->data_type()
- << " Input QuantInfo: " << input->info()->quantization_info()
- << " Weights QuantInfo: " << weights->info()->quantization_info()
- << " Input shape: " << input->info()->tensor_shape()
- << " Weights shape: " << weights->info()->tensor_shape()
- << " Output shape: " << output->info()->tensor_shape()
- << (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "")
- << std::endl);
- return std::move(func);
-}
-
-template <>
-std::unique_ptr<IFunction> create_depthwise_convolution_layer<GCDepthwiseConvolutionLayerFunctions, GCTargetInfo>(DepthwiseConvolutionLayerNode &node)
-{
- validate_node<GCTargetInfo>(node, 3 /* expected inputs */, 1 /* expected outputs */);
-
- // Extract IO and info
- GCTargetInfo::TensorType *input = get_backing_tensor<GCTargetInfo>(node.input(0));
- GCTargetInfo::TensorType *weights = get_backing_tensor<GCTargetInfo>(node.input(1));
- GCTargetInfo::TensorType *biases = get_backing_tensor<GCTargetInfo>(node.input(2));
- GCTargetInfo::TensorType *output = get_backing_tensor<GCTargetInfo>(node.output(0));
-
- if(is_data_type_quantized_asymmetric(input->info()->data_type()))
- {
- biases->info()->set_data_type(DataType::S32);
- }
-
- const PadStrideInfo conv_info = node.convolution_info();
- const DepthwiseConvolutionMethod dwc_algorithm = node.depthwise_convolution_method();
- const ActivationLayerInfo fused_act = node.fused_activation();
- const int depth_multiplier = node.depth_multiplier();
-
- // Create and configure function (we assume that functions have been validated before creation)
- std::unique_ptr<IFunction> func;
- std::string func_name;
- if(dwc_algorithm == DepthwiseConvolutionMethod::Optimized3x3)
- {
- std::tie(func, func_name) = create_named_function<GCDepthwiseConvolutionLayerFunctions::DepthwiseConvolutionLayer3x3>(
- std::string("DepthwiseConvolutionLayer3x3"),
- input, weights, biases, output, conv_info, depth_multiplier, fused_act);
- }
- else
- {
- ARM_COMPUTE_ERROR("Generic DepthwiseConvolutionLayer is not supported in GLES backend");
- }
-
- // Log info
- ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
- << node.name()
- << " Type: " << func_name
- << " Target " << GCTargetInfo::TargetType
- << " Data Type: " << input->info()->data_type()
- << " Input QuantInfo: " << input->info()->quantization_info()
- << " Weights QuantInfo: " << weights->info()->quantization_info()
- << " Input shape: " << input->info()->tensor_shape()
- << " Weights shape: " << weights->info()->tensor_shape()
- << " Output shape: " << output->info()->tensor_shape()
- << " Depth multiplier: " << depth_multiplier
- << (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "")
- << std::endl);
- return std::move(func);
-}
-
-template <>
-std::unique_ptr<IFunction> create_eltwise_layer<GCEltwiseFunctions, GCTargetInfo>(EltwiseLayerNode &node)
-{
- ARM_COMPUTE_LOG_GRAPH_VERBOSE(
- "Creating GC EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
- ARM_COMPUTE_ERROR_ON(node.num_inputs() != 2);
- ARM_COMPUTE_ERROR_ON(node.num_outputs() != 1);
-
- // Extract IO and info
- GCTargetInfo::TensorType *input1 = get_backing_tensor<GCTargetInfo>(node.input(0));
- GCTargetInfo::TensorType *input2 = get_backing_tensor<GCTargetInfo>(node.input(1));
- GCTargetInfo::TensorType *output = get_backing_tensor<GCTargetInfo>(node.output(0));
- const EltwiseOperation eltwise_op = node.eltwise_operation();
- const ConvertPolicy convert_policy = node.convert_policy();
- ARM_COMPUTE_ERROR_ON(input1 == nullptr);
- ARM_COMPUTE_ERROR_ON(input2 == nullptr);
- ARM_COMPUTE_ERROR_ON(output == nullptr);
-
- std::unique_ptr<IFunction> func = nullptr;
- std::string func_name;
- if(eltwise_op == EltwiseOperation::Add)
- {
- std::tie(func, func_name) = create_named_function<GCEltwiseFunctions::Addition>(
- std::string("GCArithmeticAddition"),
- input1, input2, output, convert_policy);
- }
- else if(eltwise_op == EltwiseOperation::Sub)
- {
- ARM_COMPUTE_ERROR("Arithmetic subtraction is not supported in GLES backend");
- }
- else if(eltwise_op == EltwiseOperation::Mul)
- {
- std::tie(func, func_name) = create_named_function<GCEltwiseFunctions::Multiplication>(
- std::string("PixelWiseMultiplication"),
- input1, input2, output, 1.f);
- }
- else
- {
- ARM_COMPUTE_ERROR("Unsupported element-wise operation!");
- }
-
- // Log info
- ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
- << node.name()
- << " Type: " << node.type()
- << " Target: " << GCTargetInfo::TargetType
- << " Operation: " << func_name
- << " Data Type: " << input1->info()->data_type()
- << " Shape: " << input1->info()->tensor_shape()
- << std::endl);
-
- return std::move(func);
-}
-} //namespace detail
-
-std::unique_ptr<IFunction> GCFunctionFactory::create(INode *node, GraphContext &ctx)
-{
- if(node == nullptr)
- {
- return nullptr;
- }
-
- NodeType type = node->type();
- switch(type)
- {
- case NodeType::ActivationLayer:
- return detail::create_activation_layer<GCActivationLayer, GCTargetInfo>(*polymorphic_downcast<ActivationLayerNode *>(node));
- case NodeType::BatchNormalizationLayer:
- return detail::create_batch_normalization_layer<GCBatchNormalizationLayer, GCTargetInfo>(*polymorphic_downcast<BatchNormalizationLayerNode *>(node));
- case NodeType::ConvolutionLayer:
- return detail::create_convolution_layer<GCConvolutionLayerFunctions, GCTargetInfo>(*polymorphic_downcast<ConvolutionLayerNode *>(node), ctx);
- case NodeType::ConcatenateLayer:
- return detail::create_concatenate_layer<GCConcatenateLayer, GCTargetInfo>(*polymorphic_downcast<ConcatenateLayerNode *>(node));
- case NodeType::DepthwiseConvolutionLayer:
- return detail::create_depthwise_convolution_layer<GCDepthwiseConvolutionLayerFunctions, GCTargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node));
- case NodeType::EltwiseLayer:
- return detail::create_eltwise_layer<GCEltwiseFunctions, GCTargetInfo>(*polymorphic_downcast<EltwiseLayerNode *>(node));
- case NodeType::FullyConnectedLayer:
- return detail::create_fully_connected_layer<GCFullyConnectedLayer, GCTargetInfo>(*polymorphic_downcast<FullyConnectedLayerNode *>(node), ctx);
- case NodeType::NormalizationLayer:
- return detail::create_normalization_layer<GCNormalizationLayer, GCTargetInfo>(*polymorphic_downcast<NormalizationLayerNode *>(node), ctx);
- case NodeType::NormalizePlanarYUVLayer:
- return detail::create_normalize_planar_yuv_layer<GCNormalizePlanarYUVLayer, GCTargetInfo>(*polymorphic_downcast<NormalizePlanarYUVLayerNode *>(node));
- case NodeType::PoolingLayer:
- return detail::create_pooling_layer<GCPoolingLayer, GCTargetInfo>(*polymorphic_downcast<PoolingLayerNode *>(node));
- case NodeType::PrintLayer:
- return detail::create_print_layer<GCTargetInfo>(*polymorphic_downcast<PrintLayerNode *>(node));
- case NodeType::ResizeLayer:
- return detail::create_resize_layer<GCScale, GCTargetInfo>(*polymorphic_downcast<ResizeLayerNode *>(node));
- case NodeType::SoftmaxLayer:
- return detail::create_softmax_layer<GCSoftmaxLayer, GCTargetInfo>(*polymorphic_downcast<SoftmaxLayerNode *>(node), ctx);
- default:
- return nullptr;
- }
-}
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
diff --git a/src/graph/backends/GLES/GCNodeValidator.cpp b/src/graph/backends/GLES/GCNodeValidator.cpp
deleted file mode 100644
index a83c1a3506..0000000000
--- a/src/graph/backends/GLES/GCNodeValidator.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/graph/backends/GLES/GCNodeValidator.h"
-
-#include "arm_compute/graph/backends/ValidateHelpers.h"
-#include "arm_compute/graph/nodes/Nodes.h"
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCFunctions.h"
-#include "support/Cast.h"
-
-using namespace arm_compute::utils::cast;
-
-namespace arm_compute
-{
-namespace graph
-{
-namespace backends
-{
-namespace
-{
-/** Validates a Depthwise Convolution layer node
- *
- * @param[in] node Node to validate
- *
- * @return Status
- */
-Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node)
-{
- ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating GCDepthwiseConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
- ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 3);
- ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1);
-
- // Extract IO and info
- arm_compute::ITensorInfo *weights = detail::get_backing_tensor_info(node.input(1));
- ARM_COMPUTE_ERROR_ON(weights == nullptr);
-
- // TODO (geopin01) : Switch when validation is implemented
- // Validate function
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(weights->tensor_shape().x() != 3 && weights->tensor_shape().y() != 3, "Unsupported depthwise convolution");
-
- return Status{};
-}
-/** Validates a Convolution layer node
- *
- * @param[in] node Node to validate
- *
- * @return Status
- */
-Status validate_convolution_layer(ConvolutionLayerNode &node)
-{
- ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
- ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 3);
- ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1);
-
- // Extract IO and info
- arm_compute::ITensorInfo *weights = detail::get_backing_tensor_info(node.input(1));
- const PadStrideInfo conv_info = node.convolution_info();
- const ConvolutionMethod conv_algorithm = node.convolution_method();
-
- // Validate function
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(node.num_groups() != 1, "Grouping is not supported by ConvolutionLayer!");
- if(conv_algorithm == ConvolutionMethod::Direct)
- {
- bool is_square = weights->tensor_shape().x() == weights->tensor_shape().y();
- bool is_direct = (weights->tensor_shape().x() == 1) || (weights->tensor_shape().x() == 3) || (weights->tensor_shape().x() == 5);
- bool is_correct_stride = (conv_info.stride().first) <= 2 && (conv_info.stride().second <= 2);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(!(is_square && is_direct && is_correct_stride), "Direct convolution is not supported for given configuration");
- }
-
- return Status{};
-}
-} // namespace
-
-Status GCNodeValidator::validate(INode *node)
-{
- if(node == nullptr)
- {
- return Status{};
- }
-
- NodeType type = node->type();
- switch(type)
- {
- case NodeType::BoundingBoxTransformLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : BoundingBoxTransformLayer");
- case NodeType::ChannelShuffleLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ChannelShuffleLayer");
- case NodeType::ConvolutionLayer:
- return validate_convolution_layer(*polymorphic_downcast<ConvolutionLayerNode *>(node));
- case NodeType::DepthwiseConvolutionLayer:
- return validate_depthwise_convolution_layer(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node));
- case NodeType::DequantizationLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : DequantizationLayer");
- case NodeType::DetectionOutputLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : DetectionOutputLayer");
- case NodeType::DetectionPostProcessLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : DetectionPostProcessLayer");
- case NodeType::FlattenLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : FlattenLayer");
- case NodeType::GenerateProposalsLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : GenerateProposalsLayer");
- case NodeType::NormalizePlanarYUVLayer:
- return detail::validate_normalize_planar_yuv_layer<GCNormalizePlanarYUVLayer>(*polymorphic_downcast<NormalizePlanarYUVLayerNode *>(node));
- case NodeType::PadLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : PadLayer");
- case NodeType::PermuteLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : PermuteLayer");
- case NodeType::PriorBoxLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : PriorBoxLayer");
- case NodeType::QuantizationLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : QuantizationLayer");
- case NodeType::ReorgLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ReorgLayer");
- case NodeType::ReshapeLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ReshapeLayer");
- case NodeType::ROIAlignLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ROIAlignLayer");
- case NodeType::SliceLayer:
- return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : SliceLayer");
- default:
- return Status{};
- }
-}
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute
diff --git a/src/graph/backends/GLES/GCTensorHandle.cpp b/src/graph/backends/GLES/GCTensorHandle.cpp
deleted file mode 100644
index 94e8813246..0000000000
--- a/src/graph/backends/GLES/GCTensorHandle.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2018-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/graph/backends/GLES/GCTensorHandle.h"
-
-#include "arm_compute/runtime/IMemoryGroup.h"
-
-namespace arm_compute
-{
-namespace graph
-{
-namespace backends
-{
-GCTensorHandle::GCTensorHandle(const ITensorInfo &info)
- : _tensor()
-{
- _tensor.allocator()->init(info);
-}
-
-void GCTensorHandle::allocate()
-{
- _tensor.allocator()->allocate();
-}
-
-void GCTensorHandle::free()
-{
- _tensor.allocator()->free();
-}
-
-void GCTensorHandle::manage(IMemoryGroup *mg)
-{
- if(mg != nullptr)
- {
- mg->manage(&_tensor);
- }
-}
-
-void GCTensorHandle::map(bool blocking)
-{
- _tensor.map(blocking);
-}
-
-void GCTensorHandle::unmap()
-{
- _tensor.unmap();
-}
-
-void GCTensorHandle::release_if_unused()
-{
- // TODO (geopin01): Release tensor only if all sub-tensors are marked as not used
- if(!_tensor.is_used())
- {
- _tensor.allocator()->free();
- }
-}
-
-const arm_compute::ITensor &GCTensorHandle::tensor() const
-{
- return _tensor;
-}
-
-arm_compute::ITensor &GCTensorHandle::tensor()
-{
- return _tensor;
-}
-
-ITensorHandle *GCTensorHandle::parent_handle()
-{
- return this;
-}
-
-bool GCTensorHandle::is_subtensor() const
-{
- return false;
-}
-
-Target GCTensorHandle::target() const
-{
- return Target::GC;
-}
-} // namespace backends
-} // namespace graph
-} // namespace arm_compute \ No newline at end of file
diff --git a/src/runtime/GLES_COMPUTE/GCBufferAllocator.cpp b/src/runtime/GLES_COMPUTE/GCBufferAllocator.cpp
deleted file mode 100644
index 695331d743..0000000000
--- a/src/runtime/GLES_COMPUTE/GCBufferAllocator.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h"
-
-#include <cstddef>
-
-namespace arm_compute
-{
-void *GCBufferAllocator::allocate(size_t size, size_t alignment)
-{
- ARM_COMPUTE_UNUSED(alignment);
-
- auto *gl_ssbo_name = new GLuint;
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, *gl_ssbo_name));
- ARM_COMPUTE_GL_CHECK(glBufferData(GL_SHADER_STORAGE_BUFFER, static_cast<GLsizeiptr>(size), nullptr, GL_STATIC_DRAW));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0));
-
- return reinterpret_cast<void *>(gl_ssbo_name);
-}
-
-void GCBufferAllocator::free(void *ptr)
-{
- ARM_COMPUTE_ERROR_ON(ptr == nullptr);
- auto *gl_ssbo_name = reinterpret_cast<GLuint *>(ptr);
- ARM_COMPUTE_GL_CHECK(glDeleteBuffers(1, gl_ssbo_name));
- delete gl_ssbo_name;
-}
-
-std::unique_ptr<IMemoryRegion> GCBufferAllocator::make_region(size_t size, size_t alignment)
-{
- ARM_COMPUTE_UNUSED(alignment);
- return std::make_unique<GCBufferMemoryRegion>(size);
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/GCHelpers.cpp b/src/runtime/GLES_COMPUTE/GCHelpers.cpp
deleted file mode 100644
index f4378d0fbf..0000000000
--- a/src/runtime/GLES_COMPUTE/GCHelpers.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCHelpers.h"
-
-#include "arm_compute/core/Error.h"
-
-namespace arm_compute
-{
-std::tuple<EGLDisplay, EGLContext, EGLBoolean> create_opengl_display_and_context()
-{
- EGLBoolean res;
- EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(display == EGL_NO_DISPLAY, "Failed to get display: 0x%x.", eglGetError());
-
- res = eglInitialize(display, nullptr, nullptr);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to initialize egl: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- const char *egl_extension_st = eglQueryString(display, EGL_EXTENSIONS);
- ARM_COMPUTE_ERROR_ON_MSG((strstr(egl_extension_st, "EGL_KHR_create_context") == nullptr), "Failed to query EGL_KHR_create_context");
- ARM_COMPUTE_ERROR_ON_MSG((strstr(egl_extension_st, "EGL_KHR_surfaceless_context") == nullptr), "Failed to query EGL_KHR_surfaceless_context");
- ARM_COMPUTE_UNUSED(egl_extension_st);
-
- const std::array<EGLint, 3> config_attribs =
- {
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT_KHR,
- EGL_NONE
- };
- EGLConfig cfg;
- EGLint count;
-
- res = eglChooseConfig(display, config_attribs.data(), &cfg, 1, &count);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to choose config: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- res = eglBindAPI(EGL_OPENGL_ES_API);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to bind api: 0x%x.", eglGetError());
-
- const std::array<EGLint, 3> attribs =
- {
- EGL_CONTEXT_CLIENT_VERSION, 3,
- EGL_NONE
- };
- EGLContext context = eglCreateContext(display,
- cfg,
- EGL_NO_CONTEXT,
- attribs.data());
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(context == EGL_NO_CONTEXT, "Failed to create context: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- res = eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, context);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to make current: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- return std::make_tuple(display, context, res);
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/GCMemory.cpp b/src/runtime/GLES_COMPUTE/GCMemory.cpp
deleted file mode 100644
index 4d74555f4e..0000000000
--- a/src/runtime/GLES_COMPUTE/GCMemory.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemory.h"
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h"
-#include "support/Cast.h"
-
-namespace arm_compute
-{
-GCMemory::GCMemory()
- : _region(nullptr), _region_owned(nullptr)
-{
-}
-
-GCMemory::GCMemory(const std::shared_ptr<IGCMemoryRegion> &memory)
- : _region(nullptr), _region_owned(memory)
-{
- _region_owned = memory;
- _region = _region_owned.get();
-}
-
-GCMemory::GCMemory(IGCMemoryRegion *memory)
- : _region(memory), _region_owned(nullptr)
-{
- _region = memory;
-}
-
-IGCMemoryRegion *GCMemory::gc_region()
-{
- return _region;
-}
-
-IGCMemoryRegion *GCMemory::gc_region() const
-{
- return _region;
-}
-
-IMemoryRegion *GCMemory::region()
-{
- return _region;
-}
-
-IMemoryRegion *GCMemory::region() const
-{
- return _region;
-}
-
-void GCMemory::set_region(IMemoryRegion *region)
-{
- auto gc_region = utils::cast::polymorphic_downcast<IGCMemoryRegion *>(region);
- _region_owned = nullptr;
- _region = gc_region;
-}
-
-void GCMemory::set_owned_region(std::unique_ptr<IMemoryRegion> region)
-{
- _region_owned = utils::cast::polymorphic_downcast_unique_ptr<IGCMemoryRegion>(std::move(region));
- _region = _region_owned.get();
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/GCMemoryRegion.cpp b/src/runtime/GLES_COMPUTE/GCMemoryRegion.cpp
deleted file mode 100644
index 562854fb2b..0000000000
--- a/src/runtime/GLES_COMPUTE/GCMemoryRegion.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h"
-
-#include "arm_compute/core/Error.h"
-
-namespace arm_compute
-{
-IGCMemoryRegion::IGCMemoryRegion(size_t size)
- : IMemoryRegion(size), _mapping(nullptr), _ssbo_name(0)
-{
-}
-
-const GLuint &IGCMemoryRegion::gc_ssbo_name() const
-{
- return _ssbo_name;
-}
-
-void *IGCMemoryRegion::buffer()
-{
- return _mapping;
-}
-
-const void *IGCMemoryRegion::buffer() const
-{
- return _mapping;
-}
-
-GCBufferMemoryRegion::GCBufferMemoryRegion(size_t size)
- : IGCMemoryRegion(size)
-{
- ARM_COMPUTE_GL_CHECK(glGenBuffers(1, &_ssbo_name));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, _ssbo_name));
- ARM_COMPUTE_GL_CHECK(glBufferData(GL_SHADER_STORAGE_BUFFER, static_cast<GLsizeiptr>(size), nullptr, GL_STATIC_DRAW));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0));
-}
-
-GCBufferMemoryRegion::~GCBufferMemoryRegion()
-{
- ARM_COMPUTE_GL_CHECK(glDeleteBuffers(1, &_ssbo_name));
-}
-
-void *GCBufferMemoryRegion::ptr()
-{
- return nullptr;
-}
-
-void *GCBufferMemoryRegion::map(bool blocking)
-{
- ARM_COMPUTE_ERROR_ON(_mapping != nullptr);
- ARM_COMPUTE_UNUSED(blocking);
-
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, _ssbo_name));
- void *p = ARM_COMPUTE_GL_CHECK(glMapBufferRange(GL_SHADER_STORAGE_BUFFER, 0, static_cast<GLsizeiptr>(size()), GL_MAP_READ_BIT | GL_MAP_WRITE_BIT));
- _mapping = reinterpret_cast<uint8_t *>(p);
-
- return _mapping;
-}
-
-void GCBufferMemoryRegion::unmap()
-{
- ARM_COMPUTE_ERROR_ON(_mapping == nullptr);
-
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, _ssbo_name));
- ARM_COMPUTE_GL_CHECK(glUnmapBuffer(GL_SHADER_STORAGE_BUFFER));
- ARM_COMPUTE_GL_CHECK(glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0));
- _mapping = nullptr;
-}
-
-std::unique_ptr<IMemoryRegion> GCBufferMemoryRegion::extract_subregion(size_t offset, size_t size)
-{
- ARM_COMPUTE_UNUSED(offset, size);
- return nullptr;
-}
-} // namespace arm_compute \ No newline at end of file
diff --git a/src/runtime/GLES_COMPUTE/GCRuntimeContext.cpp b/src/runtime/GLES_COMPUTE/GCRuntimeContext.cpp
deleted file mode 100644
index 2ed78fe099..0000000000
--- a/src/runtime/GLES_COMPUTE/GCRuntimeContext.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2019-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h"
-
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-namespace arm_compute
-{
-GCRuntimeContext::GCRuntimeContext()
- : _gpu_owned_scheduler(std::make_unique<GCScheduler>()),
- _gpu_scheduler(_gpu_owned_scheduler.get()),
- _core_context()
-{
- auto attrs = create_opengl_display_and_context();
- auto display = std::get<0>(attrs);
- auto ctx = std::get<1>(attrs);
-
- _gpu_owned_scheduler->default_init_with_context(display, ctx);
- _kernel_lib.init("./cs_shaders/", display, ctx);
-
- _core_context = GCCoreRuntimeContext(&_kernel_lib);
-}
-
-GCKernelLibrary &GCRuntimeContext::kernel_library()
-{
- return _kernel_lib;
-}
-
-GCCoreRuntimeContext *GCRuntimeContext::core_runtime_context()
-{
- return &_core_context;
-}
-
-void GCRuntimeContext::set_gpu_scheduler(GCScheduler *scheduler)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(scheduler);
- _gpu_scheduler = scheduler;
-}
-
-GCScheduler *GCRuntimeContext::gpu_scheduler()
-{
- return _gpu_scheduler;
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/GCScheduler.cpp b/src/runtime/GLES_COMPUTE/GCScheduler.cpp
deleted file mode 100644
index 946d558e05..0000000000
--- a/src/runtime/GLES_COMPUTE/GCScheduler.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
-
-using namespace arm_compute;
-
-std::once_flag GCScheduler::_initialize_symbols;
-
-GCScheduler::GCScheduler()
- : _display(EGL_NO_DISPLAY), _context(EGL_NO_CONTEXT), _target(GPUTarget::MIDGARD)
-{
-}
-
-GCScheduler::~GCScheduler()
-{
- eglDestroyContext(_display, _context);
- eglTerminate(_display);
-
- _context = EGL_NO_CONTEXT;
- _display = EGL_NO_DISPLAY;
-}
-
-void GCScheduler::default_init()
-{
- setup_context();
-
- init(_display, _context);
-}
-
-void GCScheduler::default_init_with_context(EGLDisplay display, EGLContext ctx)
-{
- _context = ctx;
- _display = display;
-
- _target = get_target_from_device();
-}
-
-void GCScheduler::init(EGLDisplay dpy, EGLContext ctx)
-{
- _target = get_target_from_device();
-
- GCKernelLibrary::get().init("./cs_shaders/", dpy, ctx);
-}
-
-GCScheduler &GCScheduler::get()
-{
- std::call_once(_initialize_symbols, opengles31_is_available);
- static GCScheduler scheduler;
- return scheduler;
-}
-
-void GCScheduler::dispatch(IGCKernel &kernel, bool flush)
-{
- kernel.run(kernel.window());
- if(flush)
- {
- ARM_COMPUTE_GL_CHECK(glFlush());
- }
-}
-
-void GCScheduler::memory_barrier()
-{
- ARM_COMPUTE_GL_CHECK(glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT));
-}
-
-void GCScheduler::setup_context()
-{
- EGLBoolean res;
- _display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(_display == EGL_NO_DISPLAY, "Failed to get display: 0x%x.", eglGetError());
-
- res = eglInitialize(_display, nullptr, nullptr);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to initialize egl: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- const char *egl_extension_st = eglQueryString(_display, EGL_EXTENSIONS);
- ARM_COMPUTE_ERROR_ON_MSG((strstr(egl_extension_st, "EGL_KHR_create_context") == nullptr), "Failed to query EGL_KHR_create_context");
- ARM_COMPUTE_ERROR_ON_MSG((strstr(egl_extension_st, "EGL_KHR_surfaceless_context") == nullptr), "Failed to query EGL_KHR_surfaceless_context");
- ARM_COMPUTE_UNUSED(egl_extension_st);
-
- const std::array<EGLint, 3> config_attribs =
- {
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT_KHR,
- EGL_NONE
- };
- EGLConfig cfg;
- EGLint count;
-
- res = eglChooseConfig(_display, config_attribs.data(), &cfg, 1, &count);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to choose config: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- res = eglBindAPI(EGL_OPENGL_ES_API);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to bind api: 0x%x.", eglGetError());
-
- const std::array<EGLint, 3> attribs =
- {
- EGL_CONTEXT_CLIENT_VERSION, 3,
- EGL_NONE
- };
- _context = eglCreateContext(_display,
- cfg,
- EGL_NO_CONTEXT,
- attribs.data());
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(_context == EGL_NO_CONTEXT, "Failed to create context: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-
- res = eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, _context);
-
- ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to make current: 0x%x.", eglGetError());
- ARM_COMPUTE_UNUSED(res);
-}
diff --git a/src/runtime/GLES_COMPUTE/GCTensor.cpp b/src/runtime/GLES_COMPUTE/GCTensor.cpp
deleted file mode 100644
index a73c9950a4..0000000000
--- a/src/runtime/GLES_COMPUTE/GCTensor.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-
-namespace arm_compute
-{
-GCTensor::GCTensor(IRuntimeContext *)
- : _allocator(this)
-{
-}
-
-ITensorAllocator *GCTensor::allocator()
-{
- return &_allocator;
-}
-
-TensorInfo *GCTensor::info() const
-{
- return &_allocator.info();
-}
-
-TensorInfo *GCTensor::info()
-{
- return &_allocator.info();
-}
-
-uint8_t *GCTensor::buffer() const
-{
- return _allocator.data();
-}
-
-GLuint GCTensor::gc_buffer() const
-{
- return _allocator.get_gl_ssbo_name();
-}
-
-void GCTensor::associate_memory_group(arm_compute::IMemoryGroup *memory_group)
-{
- _allocator.set_associated_memory_group(memory_group);
-}
-
-void GCTensor::map(bool blocking)
-{
- IGCTensor::map(blocking);
-}
-
-void GCTensor::unmap()
-{
- IGCTensor::unmap();
-}
-
-uint8_t *GCTensor::do_map(bool blocking)
-{
- return _allocator.map(blocking);
-}
-
-void GCTensor::do_unmap()
-{
- _allocator.unmap();
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp b/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp
deleted file mode 100644
index b3344d8ecb..0000000000
--- a/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryRegion.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-GCTensorAllocator::GCTensorAllocator(IMemoryManageable *owner)
- : _owner(owner), _associated_memory_group(nullptr), _memory(), _mapping(nullptr)
-{
-}
-
-uint8_t *GCTensorAllocator::data()
-{
- return _mapping;
-}
-
-void GCTensorAllocator::allocate()
-{
- if(_associated_memory_group == nullptr)
- {
- _memory.set_owned_region(std::make_unique<GCBufferMemoryRegion>(info().total_size()));
- }
- else
- {
- _associated_memory_group->finalize_memory(_owner, _memory, info().total_size(), alignment());
- }
- info().set_is_resizable(false);
-}
-
-void GCTensorAllocator::free()
-{
- _mapping = nullptr;
- _memory.set_region(nullptr);
- info().set_is_resizable(true);
-}
-
-void GCTensorAllocator::set_associated_memory_group(IMemoryGroup *associated_memory_group)
-{
- ARM_COMPUTE_ERROR_ON(associated_memory_group == nullptr);
- ARM_COMPUTE_ERROR_ON(_associated_memory_group != nullptr && _associated_memory_group != associated_memory_group);
- ARM_COMPUTE_ERROR_ON(_memory.region() != nullptr && _memory.gc_region()->gc_ssbo_name() != 0);
-
- _associated_memory_group = associated_memory_group;
-}
-
-uint8_t *GCTensorAllocator::lock()
-{
- return map(true);
-}
-
-void GCTensorAllocator::unlock()
-{
- unmap();
-}
-
-GLuint GCTensorAllocator::get_gl_ssbo_name() const
-{
- return (_memory.region() == nullptr) ? static_cast<GLuint>(0) : _memory.gc_region()->gc_ssbo_name();
-}
-
-uint8_t *GCTensorAllocator::map(bool blocking)
-{
- ARM_COMPUTE_ERROR_ON(_mapping != nullptr);
- ARM_COMPUTE_ERROR_ON(_memory.region() == nullptr);
-
- _mapping = reinterpret_cast<uint8_t *>(_memory.gc_region()->map(blocking));
- return _mapping;
-}
-
-void GCTensorAllocator::unmap()
-{
- ARM_COMPUTE_ERROR_ON(_mapping == nullptr);
- ARM_COMPUTE_ERROR_ON(_memory.region() == nullptr);
-
- _memory.gc_region()->unmap();
- _mapping = nullptr;
-}
diff --git a/src/runtime/GLES_COMPUTE/IGCSimpleFunction.cpp b/src/runtime/GLES_COMPUTE/IGCSimpleFunction.cpp
deleted file mode 100644
index 4bb6a9994f..0000000000
--- a/src/runtime/GLES_COMPUTE/IGCSimpleFunction.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-IGCSimpleFunction::IGCSimpleFunction(GCRuntimeContext *ctx) //NOLINT
- : _kernel(),
- _border_handler(),
- _ctx(ctx)
-{
-}
-
-void IGCSimpleFunction::run()
-{
- ARM_COMPUTE_ERROR_ON_MSG(!_kernel, "The child class didn't set the GLES kernel or function isn't configured");
- GCScheduler *scheduler = (_ctx != nullptr) ? _ctx->gpu_scheduler() : &GCScheduler::get().get();
- ARM_COMPUTE_ERROR_ON(scheduler == nullptr);
-
- scheduler->dispatch(_border_handler, false);
- scheduler->memory_barrier();
- scheduler->dispatch(*_kernel);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.cpp b/src/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.cpp
deleted file mode 100644
index 29630c8981..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCAbsoluteDifferenceKernel.h"
-#include "arm_compute/core/Helpers.h"
-
-#include <utility>
-
-using namespace arm_compute;
-
-void GCAbsoluteDifference::configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output)
-{
- auto k = std::make_unique<GCAbsoluteDifferenceKernel>();
- k->configure(input1, input2, output);
- _kernel = std::move(k);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCActivationLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCActivationLayer.cpp
deleted file mode 100644
index b3815f1625..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCActivationLayer.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.h"
-#include "arm_compute/core/Helpers.h"
-
-namespace arm_compute
-{
-GCActivationLayer::GCActivationLayer(GCRuntimeContext *ctx)
- : IGCSimpleFunction(ctx)
-{
-}
-
-void GCActivationLayer::configure(IGCTensor *input, IGCTensor *output, ActivationLayerInfo act_info)
-{
- auto core_ctx = _ctx ? _ctx->core_runtime_context() : /* Legacy */ nullptr;
-
- auto k = std::make_unique<GCActivationLayerKernel>(core_ctx);
- k->configure(input, output, act_info);
- _kernel = std::move(k);
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.cpp b/src/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.cpp
deleted file mode 100755
index 5661a9bfdd..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2016-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.h"
-
-#include <utility>
-
-using namespace arm_compute;
-
-void GCArithmeticAddition::configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, ConvertPolicy policy, const ActivationLayerInfo &act_info)
-{
- ARM_COMPUTE_UNUSED(act_info);
- auto k = std::make_unique<GCArithmeticAdditionKernel>();
- k->configure(input1, input2, output, policy);
- _kernel = std::move(k);
-}
-
-Status GCArithmeticAddition::validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info)
-{
- ARM_COMPUTE_RETURN_ERROR_ON(act_info.enabled());
- return GCArithmeticAdditionKernel::validate(input1, input2, output, policy);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.cpp
deleted file mode 100755
index 7ec0e4224f..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-GCBatchNormalizationLayer::GCBatchNormalizationLayer()
- : _norm_kernel()
-{
-}
-
-void GCBatchNormalizationLayer::configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *var, const IGCTensor *beta, const IGCTensor *gamma, float epsilon,
- ActivationLayerInfo act_info)
-{
- _norm_kernel.configure(input, output, mean, var, beta, gamma, epsilon, act_info);
-}
-
-void GCBatchNormalizationLayer::run()
-{
- GCScheduler::get().dispatch(_norm_kernel, true);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.cpp
deleted file mode 100644
index 2c21d81e17..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2019-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/utils/misc/ShapeCalculator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "src/core/helpers/AutoConfiguration.h"
-
-namespace arm_compute
-{
-GCConcatenateLayer::GCConcatenateLayer()
- : _concat_kernels(),
- _num_inputs(0),
- _axis(Window::DimZ)
-{
-}
-
-void GCConcatenateLayer::configure(std::vector<IGCTensor *> inputs_vector, IGCTensor *output, size_t axis)
-{
- ARM_COMPUTE_ERROR_ON(inputs_vector.size() < 2);
-
- _num_inputs = inputs_vector.size();
- _axis = axis;
-
- TensorShape output_shape = arm_compute::misc::shape_calculator::calculate_concatenate_shape(inputs_vector, axis);
-
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output->info(), output_shape, 1, inputs_vector[0]->info()->data_type());
-
- unsigned int offset = 0;
- switch(axis)
- {
- case Window::DimZ:
- {
- for(unsigned int i = 0; i < _num_inputs; ++i)
- {
- auto kernel = std::make_unique<GCDepthConcatenateLayerKernel>();
- kernel->configure(inputs_vector.at(i), offset, output);
- offset += inputs_vector.at(i)->info()->dimension(axis);
- _concat_kernels.emplace_back(std::move(kernel));
- }
- break;
- }
- default:
- ARM_COMPUTE_ERROR("Axis not supported");
- }
-}
-
-void GCConcatenateLayer::run()
-{
- for(auto &kernel : _concat_kernels)
- {
- GCScheduler::get().dispatch(*kernel, true);
- }
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp
deleted file mode 100644
index 93a66f012e..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h"
-
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/Size2D.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-#include <cmath>
-#include <tuple>
-
-using namespace arm_compute;
-
-GCConvolutionLayerReshapeWeights::GCConvolutionLayerReshapeWeights()
- : _weights_reshape_kernel()
-{
-}
-
-void GCConvolutionLayerReshapeWeights::configure(const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(weights, output);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(weights, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON(weights->info()->num_dimensions() > 4);
-
- if(biases != nullptr)
- {
- ARM_COMPUTE_ERROR_ON(is_data_type_quantized_asymmetric(weights->info()->data_type()));
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(weights, biases);
- ARM_COMPUTE_ERROR_ON(biases->info()->dimension(0) != weights->info()->dimension(3));
- ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() > 1);
- }
-
- const bool append_biases = (biases != nullptr) && !is_data_type_quantized_asymmetric(weights->info()->data_type());
- const IGCTensor *biases_to_use = (append_biases) ? biases : nullptr;
-
- _weights_reshape_kernel.configure(weights, biases_to_use, output);
-}
-
-void GCConvolutionLayerReshapeWeights::run()
-{
- GCScheduler::get().dispatch(_weights_reshape_kernel);
-}
-
-GCConvolutionLayer::GCConvolutionLayer(std::shared_ptr<IMemoryManager> memory_manager)
- : _memory_group(std::move(memory_manager)), _reshape_weights(), _input_im2col_kernel(), _mm_gemm(), _output_col2im_kernel(), _fill_border(), _activationlayer_function(), _original_weights(nullptr),
- _input_im2col_reshaped(), _input_interleaved_reshaped(), _weights_reshaped(), _weights_transposed(), _gemm_output(), _tmp_output(), _is_activationlayer_enabled(false), _is_prepared(false)
-{
-}
-
-void GCConvolutionLayer::configure_mm(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, weights);
- ARM_COMPUTE_ERROR_THROW_ON(validate_mm(input->info(), weights->info(), output->info()));
-
- _mm_gemm.configure(input, weights, nullptr, output, 1.f, 0.0f, GEMMInfo(false, false, true /* Reshape weights only for the first run */));
-}
-
-Status GCConvolutionLayer::validate_mm(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *output)
-{
- // Perform validation step on Matrix multiply function
- GCGEMM::validate(input, weights, nullptr, output, 1.0f, 0.0f, GEMMInfo(false, false, true /* Reshape weights only for the first run */));
- return Status{};
-}
-
-void GCConvolutionLayer::configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, const WeightsInfo &weights_info,
- const Size2D &dilation, const ActivationLayerInfo &act_info, unsigned int num_groups)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(input, weights);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
- ARM_COMPUTE_ERROR_ON_MSG(weights_info.are_reshaped(), "Weights already reshaped are not supported!");
- ARM_COMPUTE_ERROR_ON(weights->info()->dimension(2) != input->info()->dimension(2));
- ARM_COMPUTE_ERROR_ON(weights->info()->num_dimensions() > 4);
- ARM_COMPUTE_ERROR_ON(num_groups > 1);
- ARM_COMPUTE_UNUSED(num_groups);
-
- _is_prepared = false;
- _original_weights = weights;
-
- if(biases != nullptr)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, biases);
- ARM_COMPUTE_ERROR_ON(biases->info()->dimension(0) != weights->info()->dimension(3));
- ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() > 1);
- }
-
- const DataType dt = input->info()->data_type();
-
- // Set the GPU target for im2col and col2im
- _input_im2col_kernel.set_target(GCScheduler::get().get_target());
- _output_col2im_kernel.set_target(GCScheduler::get().get_target());
-
- const bool append_bias = (biases != nullptr);
- const unsigned bias_element = (append_bias) ? 1 : 0;
- const IGCTensor *biases_to_use = (append_bias) ? biases : nullptr;
-
- // Get parameters from conv_info
- unsigned int stride_x = 0;
- unsigned int stride_y = 0;
- std::tie(stride_x, stride_y) = conv_info.stride();
-
- // Get convolved dimensions
- unsigned int conv_w = 0;
- unsigned int conv_h = 0;
-
- const unsigned int kernel_width = weights->info()->dimension(0);
- const unsigned int kernel_height = weights->info()->dimension(1);
- std::tie(conv_w, conv_h) = scaled_dimensions(input->info()->dimension(0), input->info()->dimension(1), kernel_width, kernel_height,
- conv_info, dilation);
-
- unsigned int mat_weights_cols = weights->info()->dimension(3);
- unsigned int mat_weights_rows = weights->info()->dimension(0) * weights->info()->dimension(1) * weights->info()->dimension(2) + bias_element;
-
- // _weights_reshaped will be auto configured in the kernel.
- // Just append biases and do not transpose 1xW as it will be reshaped in GCGEMM
- _reshape_weights.configure(weights, biases_to_use, &_weights_reshaped);
-
- weights = &_weights_reshaped;
-
- // Create tensor to store im2col reshaped inputs
- const unsigned int mat_input_cols = mat_weights_rows;
- const unsigned int mat_input_rows = conv_w * conv_h;
- TensorShape shape_im2col = input->info()->tensor_shape();
- shape_im2col.set(0, mat_input_cols);
- shape_im2col.set(1, mat_input_rows);
- shape_im2col.set(2, 1);
-
- // FIXME: input->clone() doesn't work with subtensors for grouped convolutions.
- TensorInfo im2col_reshaped_info(shape_im2col, 1, dt);
- _input_im2col_reshaped.allocator()->init(im2col_reshaped_info);
- _memory_group.manage(&_input_im2col_reshaped);
-
- // Create GEMM output tensor
- TensorShape shape_gemm = _input_im2col_reshaped.info()->tensor_shape();
- shape_gemm.set(0, mat_weights_cols);
- shape_gemm.set(1, mat_input_rows);
- const DataType gemm_data_type = dt;
-
- // FIXME: input->clone() doesn't work with subtensors for grouped convolutions.
- TensorInfo info_gemm(shape_gemm, 1, gemm_data_type);
- _gemm_output.allocator()->init(info_gemm);
- _memory_group.manage(&_gemm_output);
-
- if(dt == DataType::F16)
- {
- BorderSize border_size = BorderSize(conv_info.pad_top(), conv_info.pad_right(), conv_info.pad_bottom(), conv_info.pad_left());
- input->info()->extend_padding(border_size);
- _fill_border.configure(input, border_size, BorderMode::CONSTANT, PixelValue()); // for PAD of im2col fp16: consider it as border
- }
- // Configure im2col
- _input_im2col_kernel.configure(input, &_input_im2col_reshaped, Size2D(kernel_width, kernel_height), conv_info, append_bias, dilation);
-
- // Configure GEMM
- configure_mm(&_input_im2col_reshaped, weights, &_gemm_output);
-
- _input_im2col_reshaped.allocator()->allocate();
-
- // Configure Col2Im
- _output_col2im_kernel.configure(&_gemm_output, output, std::make_pair(conv_w, conv_h));
- _gemm_output.allocator()->allocate();
-
- ARM_COMPUTE_ERROR_ON_MSG((output->info()->dimension(0) != conv_w) || (output->info()->dimension(1) != conv_h), "Output shape does not match the expected one");
-
- //Configure Activation Layer
- _is_activationlayer_enabled = act_info.enabled();
-
- if(_is_activationlayer_enabled)
- {
- _activationlayer_function.configure(output, nullptr, act_info);
- }
-
- ARM_COMPUTE_UNUSED(weights_info);
-}
-
-void GCConvolutionLayer::run()
-{
- prepare();
-
- MemoryGroupResourceScope scope_mg(_memory_group);
-
- // Run im2col
- GCScheduler::get().dispatch(_fill_border);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_input_im2col_kernel);
-
- // Run gemm on reshaped matrices
- _mm_gemm.run();
- GCScheduler::get().memory_barrier();
-
- // Reshape output matrix
- GCScheduler::get().dispatch(_output_col2im_kernel, false);
- GCScheduler::get().memory_barrier();
-
- // Run Activation Layer
- if(_is_activationlayer_enabled)
- {
- _activationlayer_function.run();
- }
-}
-
-void GCConvolutionLayer::prepare()
-{
- if(!_is_prepared)
- {
- ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
-
- // Run weights reshaping and mark as unused
- _weights_reshaped.allocator()->allocate();
- _reshape_weights.run();
-
- // Mark original weights tensor as unused
- _original_weights->mark_as_unused();
-
- _is_prepared = true;
- }
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp
deleted file mode 100644
index 46d5cc40d9..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-GCDepthwiseConvolutionLayer3x3::GCDepthwiseConvolutionLayer3x3()
- : _kernel(nullptr), _border_handler(), _shift_handler(), _activationlayer_function(), _is_activationlayer_enabled(false)
-{
-}
-
-void GCDepthwiseConvolutionLayer3x3::configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info,
- unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation)
-{
- ARM_COMPUTE_ERROR_ON(dilation.x() != 1 || dilation.y() != 1);
- ARM_COMPUTE_UNUSED(dilation);
- auto k = std::make_unique<GCDepthwiseConvolutionLayer3x3Kernel>();
- k->configure(input, weights, biases, output, conv_info, depth_multiplier);
- _kernel = std::move(k);
-
- // Configure border handler
- _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue());
-
- _shift_handler.configure(input);
-
- //Configure Activation Layer
- _is_activationlayer_enabled = act_info.enabled();
-
- if(_is_activationlayer_enabled)
- {
- _activationlayer_function.configure(output, nullptr, act_info);
- }
-}
-
-void GCDepthwiseConvolutionLayer3x3::run()
-{
- GCScheduler::get().dispatch(_shift_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_border_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(*_kernel);
-
- // Run Activation Layer
- if(_is_activationlayer_enabled)
- {
- _activationlayer_function.run();
- }
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp
deleted file mode 100644
index 63c963196a..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-GCDirectConvolutionLayer::GCDirectConvolutionLayer()
- : _kernel(nullptr), _border_handler(), _shift_handler()
-{
-}
-
-void GCDirectConvolutionLayer::configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info,
- const ActivationLayerInfo &act_info)
-{
- int kernel_size = weights->info()->dimension(0);
-
- if(kernel_size == 1)
- {
- auto k = std::make_unique<GCDirectConvolutionLayer1x1Kernel>();
- k->configure(input, weights, biases, output, conv_info, act_info);
- _kernel = std::move(k);
- }
- else if(kernel_size == 3)
- {
- auto k = std::make_unique<GCDirectConvolutionLayer3x3Kernel>();
- k->configure(input, weights, biases, output, conv_info, act_info);
- _kernel = std::move(k);
- }
- else if(kernel_size == 5)
- {
- auto k = std::make_unique<GCDirectConvolutionLayer5x5Kernel>();
- k->configure(input, weights, biases, output, conv_info, act_info);
- _kernel = std::move(k);
- }
- else
- {
- ARM_COMPUTE_ERROR("kernel size unsupported!");
- return;
- }
-
- _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue());
-
- _shift_handler.configure(input);
-}
-
-void GCDirectConvolutionLayer::run()
-{
- GCScheduler::get().dispatch(_shift_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_border_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(*_kernel);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_shift_handler);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCDropoutLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDropoutLayer.cpp
deleted file mode 100644
index 661bf5f9d6..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCDropoutLayer.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2017 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h"
-
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-
-using namespace arm_compute;
-
-GCDropoutLayer::GCDropoutLayer()
- : _dropout_kernel()
-{
-}
-
-void GCDropoutLayer::configure(const IGCTensor *input, IGCTensor *mask, IGCTensor *output, float ratio, bool forward)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, mask, output);
-
- // Configure kernel
- _dropout_kernel.configure(input, mask, output, ratio, forward);
-}
-
-void GCDropoutLayer::run()
-{
- GCScheduler::get().dispatch(_dropout_kernel);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCFillBorder.cpp b/src/runtime/GLES_COMPUTE/functions/GCFillBorder.cpp
deleted file mode 100644
index 97b4fd946c..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCFillBorder.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
-#include "arm_compute/core/Helpers.h"
-
-#include <utility>
-
-using namespace arm_compute;
-
-void GCFillBorder::configure(IGCTensor *tensor, unsigned int border_width, BorderMode border_mode, const PixelValue &constant_border_value)
-{
- auto k = std::make_unique<GCFillBorderKernel>();
- k->configure(tensor, BorderSize(border_width), border_mode, constant_border_value);
- _kernel = std::move(k);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.cpp
deleted file mode 100644
index 299a027b42..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h"
-
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-#include <algorithm>
-
-using namespace arm_compute;
-
-void GCFullyConnectedLayerReshapeWeights::configure(const IGCTensor *input, IGCTensor *output)
-{
- auto k = std::make_unique<GCTransposeKernel>();
- k->configure(input, output);
- _kernel = std::move(k);
-}
-
-GCFullyConnectedLayer::GCFullyConnectedLayer(std::shared_ptr<IMemoryManager> memory_manager, IWeightsManager *weights_manager)
- : _memory_group(std::move(memory_manager)), _weights_manager(std::move(weights_manager)), _im2col_kernel(), _reshape_weights_kernel(), _mm_kernel(), _accumulate_biases_kernel(), _im2col_output(),
- _reshape_weights_output(), _original_weights(nullptr), _are_weights_reshaped(true), _is_fc_after_conv(true), _accumulate_biases(false)
-{
-}
-
-void GCFullyConnectedLayer::configure_conv_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON((weights->info()->dimension(1) != (input->info()->dimension(0) * input->info()->dimension(1) * input->info()->dimension(2))));
-
- const DataType dt = input->info()->data_type();
-
- // If the fully connected layer is called after a convolution layer, the input tensor must be linearized
-
- // Initialize output tensor for im2col
- TensorShape shape_im2col;
- shape_im2col.set(0, input->info()->dimension(0) * input->info()->dimension(1) * input->info()->dimension(2));
- shape_im2col.set(1, input->info()->dimension(3));
- shape_im2col.set(2, input->info()->dimension(4));
- shape_im2col.set(3, input->info()->dimension(5));
- _im2col_output.allocator()->init(TensorInfo(shape_im2col, 1, dt));
-
- // Configure im2col kernel
- _memory_group.manage(&_im2col_output);
- _im2col_kernel.configure(input, &_im2col_output, Size2D(1, 1), PadStrideInfo(1, 1, 0, 0), false);
-
- // Configure matrix multiply kernel
- _mm_kernel.configure(&_im2col_output, weights, output, 1.0f, false);
-
- // Allocate the output tensor for im2col once all the configure methods have been called
- _im2col_output.allocator()->allocate();
-}
-
-void GCFullyConnectedLayer::configure_fc_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output)
-{
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(0) != weights->info()->dimension(1));
-
- // Configure matrix multiply kernel
- _mm_kernel.configure(input, weights, output, 1.0f, false);
-}
-
-void GCFullyConnectedLayer::configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output,
- FullyConnectedLayerInfo fc_info)
-{
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32, DataType::F16);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights, output);
- ARM_COMPUTE_ERROR_ON(weights->info()->num_dimensions() > 2);
-
- _original_weights = weights;
- _are_weights_reshaped = fc_info.transpose_weights ? fc_info.are_weights_reshaped : true;
- _is_fc_after_conv = true;
- _accumulate_biases = false;
-
- if(biases != nullptr)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, biases);
-
- _accumulate_biases = true;
-
- // Configure accumulate biases kernel
- _accumulate_biases_kernel.configure(output, biases);
- }
-
- // With the Fully Connected layer we can have 4 different cases:
- // 1) Convolution layer -> Fully Connected layer without batches
- // 2) Fully Connected layer -> Fully Connected layer without batches
- // 3) Convolution layer -> Fully Connected layer with batches
- // 4) Fully Connected layer -> Fully Connected layer with batches
-
- const IGCTensor *weights_to_use = weights;
-
- if(!_are_weights_reshaped)
- {
- weights_to_use = &_reshape_weights_output;
-
- // Reshape the weights
- _reshape_weights_kernel.configure(weights, &_reshape_weights_output);
- }
-
- // Check if we have a fully connected layer with batches
- const bool is_batched_fc_layer = output->info()->dimension(1) > 1;
-
- if(is_batched_fc_layer)
- {
- _is_fc_after_conv = (TensorShape::num_max_dimensions >= 4) && (std::equal(input->info()->tensor_shape().cbegin() + 3,
- input->info()->tensor_shape().cend(),
- output->info()->tensor_shape().cbegin() + 1));
- }
- else
- {
- _is_fc_after_conv = input->info()->num_dimensions() > 1;
- }
-
- if(_is_fc_after_conv)
- {
- // Fully Connected layer after a Convolution Layer without batches
- configure_conv_fc(input, weights_to_use, output);
- }
- else
- {
- // Fully Connected layer after a Fully Connected Layer without batches
- configure_fc_fc(input, weights_to_use, output);
- }
-
- ARM_COMPUTE_ERROR_ON(fc_info.retain_internal_weights && _reshape_weights_output.gc_buffer() == 0);
- _are_weights_reshaped = _are_weights_reshaped || fc_info.retain_internal_weights;
-}
-
-void GCFullyConnectedLayer::run()
-{
- prepare();
-
- MemoryGroupResourceScope scope_mg(_memory_group);
-
- // Linearize input if it comes from a convolutional layer
- if(_is_fc_after_conv)
- {
- GCScheduler::get().dispatch(_im2col_kernel, false);
- }
-
- if(!_are_weights_reshaped || _is_fc_after_conv)
- {
- GCScheduler::get().memory_barrier();
- }
-
- // Run matrix multiply
- GCScheduler::get().dispatch(_mm_kernel, !_accumulate_biases);
-
- // Accumulate biases if provided
- if(_accumulate_biases)
- {
- GCScheduler::get().memory_barrier();
-
- GCScheduler::get().dispatch(_accumulate_biases_kernel);
- }
-}
-
-void GCFullyConnectedLayer::prepare()
-{
- // Reshape of the weights (happens only once)
- if(!_are_weights_reshaped)
- {
- ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
-
- // Run reshape weights kernel and mark weights as unused
- _reshape_weights_output.allocator()->allocate();
- _reshape_weights_kernel.run();
-
- // Mark original weights tensor as unused
- _original_weights->mark_as_unused();
-
- _are_weights_reshaped = true;
- }
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp b/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp
deleted file mode 100644
index a5a26f4bb9..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#include "arm_compute/runtime/ITensorAllocator.h"
-
-using namespace arm_compute;
-
-namespace
-{
-Status validate_arguments(const ITensorInfo *a, const ITensorInfo *b, const IGCTensor *c, const ITensorInfo *output, const float alpha, const float beta, const GEMMInfo &gemm_info = GEMMInfo())
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(a, b, output);
-
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(a, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(a, b, output);
- ARM_COMPUTE_ERROR_ON_MSG(gemm_info.is_a_reshaped(), "Matrix A already reshaped is not supported");
- ARM_COMPUTE_ERROR_ON_MSG(gemm_info.is_b_reshaped(), "Matrix B already reshaped is not supported");
-
- if(c != nullptr)
- {
- ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(a, c->info());
- ARM_COMPUTE_ERROR_ON_MSG(a->dimension(1) != c->info()->dimension(1), "The C matrix must have the same number of rows as the matrix A");
- ARM_COMPUTE_ERROR_ON_MSG(b->dimension(0) != c->info()->dimension(0), "The C matrix must have the same number of columns as the matrix B");
- }
-
- if(output->total_size() != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(b->dimension(0) != output->dimension(0), "The output matrix must have the same number of columns as the matrix B");
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(a->dimension(1) != output->dimension(1), "The output matrix must have the same number of rows as the matrix A");
- }
-
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(a->dimension(0) != b->dimension(1), "The product AB is defined only if the number of columns in A is equal to the number of rows in B");
-
- ARM_COMPUTE_UNUSED(alpha);
- ARM_COMPUTE_UNUSED(beta);
- ARM_COMPUTE_UNUSED(gemm_info);
- return Status{};
-}
-} // namespace
-
-GCGEMM::GCGEMM(std::shared_ptr<IMemoryManager> memory_manager)
- : _memory_group(std::move(memory_manager)), _interleave_kernel(), _transpose_kernel(), _mm_kernel(), _ma_kernel(), _tmp_a(), _tmp_b(), _original_b(nullptr), _is_interleaved_transposed(false),
- _run_addition(false), _reshape_b_only_on_first_run(false), _is_prepared(false)
-{
-}
-
-void GCGEMM::configure(const IGCTensor *a, const IGCTensor *b, const IGCTensor *c, IGCTensor *output, float alpha, float beta, const GEMMInfo &gemm_info)
-{
- ARM_COMPUTE_ERROR_ON_NULLPTR(a, b, output);
-
- // Perform validation step
- ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(a->info(), b->info(), c, output->info(), alpha, beta, gemm_info));
-
- // Check if we need to reshape the matrix B only on the first run
- _reshape_b_only_on_first_run = gemm_info.reshape_b_only_on_first_run();
- _is_prepared = false;
- _original_b = b;
-
- const IGCTensor *matrix_a = a;
- const IGCTensor *matrix_b = b;
-
- // Get the GPU target
- const GPUTarget gpu_target = GCScheduler::get().get_target();
-
- // Set the target for the kernels
- _interleave_kernel.set_target(gpu_target);
- _mm_kernel.set_target(gpu_target);
-
- // Arguments used by GEMMReshapeInfo
- // If we pass the matrix A and matrix B reshaped to GCGEMMMatrixMultiplyKernel, we need to pass m, n, k, mult_transpose1xW_width and mult_interleave4x4_height to GCGEMMReshapeInfo
- // in order to know how the matrices have been reshaped
- const int m = a->info()->dimension(1);
- const int n = b->info()->dimension(0);
- const int k = a->info()->dimension(0);
- int mult_transpose1xW_width = 1;
- int mult_interleave4x4_height = 1;
-
- // If the input tensor has less than 16 rows, we run a special version of GEMM without reshaping the input tensors
- _is_interleaved_transposed = a->info()->dimension(1) > 16;
-
- if(_is_interleaved_transposed)
- {
- matrix_a = &_tmp_a;
- matrix_b = &_tmp_b;
-
- // Manage intermediate buffers
- _memory_group.manage(&_tmp_a);
- if(!_reshape_b_only_on_first_run)
- {
- _memory_group.manage(&_tmp_b);
- }
- // _tmp_a and _tmp_b will be auto configured in _interleave_kernel and in _transpose_kernel
-
- // Configure interleave kernel
- _interleave_kernel.configure(a, &_tmp_a);
-
- // Configure transpose kernel
- _transpose_kernel.configure(b, &_tmp_b);
- }
-
- _mm_kernel.configure(matrix_a, matrix_b, output, alpha, _is_interleaved_transposed, GEMMReshapeInfo(m, n, k, mult_transpose1xW_width, mult_interleave4x4_height));
-
- if(_is_interleaved_transposed)
- {
- // Allocate intermediate tensors
- _tmp_a.allocator()->allocate();
- if(!_reshape_b_only_on_first_run)
- {
- _tmp_b.allocator()->allocate();
- }
- }
-
- // Configure matrix addition kernel
- if(beta != 0 && c != nullptr)
- {
- _ma_kernel.configure(c, output, beta);
- _run_addition = true;
- }
-}
-
-Status GCGEMM::validate(const ITensorInfo *a, const ITensorInfo *b, const IGCTensor *c, const ITensorInfo *output, const float alpha, const float beta, const GEMMInfo &gemm_info)
-{
- ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(a, b, c, output, alpha, beta, gemm_info));
- return Status{};
-}
-
-void GCGEMM::run()
-{
- prepare();
-
- MemoryGroupResourceScope scope_mg(_memory_group);
-
- if(_is_interleaved_transposed)
- {
- // Run interleave kernel
- GCScheduler::get().dispatch(_interleave_kernel, false);
-
- if(!_reshape_b_only_on_first_run)
- {
- // Run transpose kernel
- GCScheduler::get().dispatch(_transpose_kernel, false);
- }
-
- GCScheduler::get().memory_barrier();
- }
-
- // Run matrix multiply kernel
- GCScheduler::get().dispatch(_mm_kernel, !_run_addition);
-
- // Run matrix addition kernel
- if(_run_addition)
- {
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_ma_kernel);
- }
-}
-
-void GCGEMM::prepare()
-{
- if(!_is_prepared)
- {
- if(_is_interleaved_transposed && _reshape_b_only_on_first_run)
- {
- ARM_COMPUTE_ERROR_ON(!_original_b->is_used());
-
- // Run transpose kernel
- _tmp_b.allocator()->allocate();
- GCScheduler::get().dispatch(_transpose_kernel, false);
- GCScheduler::get().memory_barrier();
-
- // Mark original weights tensor as unused
- _original_b->mark_as_unused();
- }
-
- _is_prepared = true;
- }
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.cpp b/src/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.cpp
deleted file mode 100644
index c1287f7e9c..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h"
-
-using namespace arm_compute;
-
-void GCGEMMInterleave4x4::configure(const IGCTensor *input, IGCTensor *output)
-{
- auto k = std::make_unique<GCGEMMInterleave4x4Kernel>();
- k->configure(input, output);
- _kernel = std::move(k);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.cpp b/src/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.cpp
deleted file mode 100644
index d085357eaa..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h"
-#include "arm_compute/core/Types.h"
-
-using namespace arm_compute;
-
-void GCGEMMTranspose1xW::configure(const IGCTensor *input, IGCTensor *output)
-{
- auto k = std::make_unique<GCGEMMTranspose1xWKernel>();
- k->configure(input, output);
- _kernel = std::move(k);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp
deleted file mode 100644
index c4bf141446..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-GCNormalizationLayer::GCNormalizationLayer(std::shared_ptr<IMemoryManager> memory_manager)
- : _memory_group(std::move(memory_manager)), _squared_input(), _norm_kernel(), _multiply_kernel(), _border_handler()
-{
-}
-
-void GCNormalizationLayer::configure(const IGCTensor *input, IGCTensor *output, const NormalizationLayerInfo &norm_info)
-{
- ARM_COMPUTE_ERROR_ON(input == nullptr);
-
- _squared_input.allocator()->init(TensorInfo(input->info()->tensor_shape(), 1, input->info()->data_type()));
- _memory_group.manage(&_squared_input);
-
- _norm_kernel.configure(input, &_squared_input, output, norm_info);
- _multiply_kernel.configure(input, input, &_squared_input, 1.0f);
- // Fill the border by 3 elements since we need vload4 in the IN_MAP normalization kernel
- _border_handler.configure(&_squared_input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue());
-
- // Allocate intermediate buffers
- _squared_input.allocator()->allocate();
-}
-
-void GCNormalizationLayer::run()
-{
- MemoryGroupResourceScope scope_mg(_memory_group);
-
- GCScheduler::get().dispatch(_multiply_kernel, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_border_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_norm_kernel, true);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.cpp
deleted file mode 100755
index 3e677b5d97..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2017-2018 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-using namespace arm_compute;
-
-GCNormalizePlanarYUVLayer::GCNormalizePlanarYUVLayer()
- : _norm_kernel()
-{
-}
-
-void GCNormalizePlanarYUVLayer::configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *std)
-{
- _norm_kernel.configure(input, output, mean, std);
-}
-
-Status GCNormalizePlanarYUVLayer::validate(const ITensorInfo *input, const ITensorInfo *output,
- const ITensorInfo *mean, const ITensorInfo *std)
-{
- return GCNormalizePlanarYUVLayerKernel::validate(input, output, mean, std);
-}
-
-void GCNormalizePlanarYUVLayer::run()
-{
- GCScheduler::get().dispatch(_norm_kernel, true);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.cpp b/src/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.cpp
deleted file mode 100755
index ce50a63e53..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h"
-
-#include <utility>
-
-using namespace arm_compute;
-
-void GCPixelWiseMultiplication::configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, float scale, const ActivationLayerInfo &act_info)
-{
- ARM_COMPUTE_UNUSED(act_info);
- auto k = std::make_unique<GCPixelWiseMultiplicationKernel>();
- k->configure(input1, input2, output, scale);
- _kernel = std::move(k);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp
deleted file mode 100644
index 6a71fbebe7..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-namespace arm_compute
-{
-GCPoolingLayer::GCPoolingLayer()
- : _kernel(nullptr), _border_handler(), _shift_handler()
-{
-}
-
-void GCPoolingLayer::configure(IGCTensor *input, IGCTensor *output, const PoolingLayerInfo &pool_info, IGCTensor *indices)
-{
- // Configure pooling kernel
- auto k = std::make_unique<GCPoolingLayerKernel>();
- k->configure(input, output, pool_info, indices);
- _kernel = std::move(k);
-
- // Configure border depending on operation required
- BorderMode border_mode = (PoolingType::MAX == pool_info.pool_type) ? BorderMode::REPLICATE : BorderMode::CONSTANT;
- _border_handler.configure(input, _kernel->border_size(), border_mode, PixelValue(0.0f));
-
- _shift_handler.configure(input);
-}
-
-Status GCPoolingLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices)
-{
- return GCPoolingLayerKernel::validate(input, output, pool_info, indices);
-}
-
-void GCPoolingLayer::run()
-{
- GCScheduler::get().dispatch(_shift_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_border_handler, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(*_kernel);
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/functions/GCScale.cpp b/src/runtime/GLES_COMPUTE/functions/GCScale.cpp
deleted file mode 100644
index 225bb4131f..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCScale.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016-2021 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h"
-
-#include "arm_compute/core/Error.h"
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h"
-#include "arm_compute/core/Validate.h"
-
-namespace arm_compute
-{
-void GCScale::configure(IGCTensor *input, IGCTensor *output, const ScaleKernelInfo &info)
-{
- auto k = std::make_unique<GCScaleKernel>();
- k->configure(input, output, info);
- _kernel = std::move(k);
- _border_handler.configure(input, _kernel->border_size(), info.border_mode, info.constant_border_value);
-}
-} // namespace arm_compute
diff --git a/src/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.cpp
deleted file mode 100644
index fdb9a42f13..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-
-namespace arm_compute
-{
-GCSoftmaxLayer::GCSoftmaxLayer(std::shared_ptr<IMemoryManager> memory_manager)
- : _memory_group(std::move(memory_manager)), _max_kernel(), _shift_exp_sum_kernel(), _norm_kernel(), _max(), _sum(), _tmp()
-{
-}
-
-void GCSoftmaxLayer::configure(const IGCTensor *input, IGCTensor *output, float beta, int32_t axis)
-{
- ARM_COMPUTE_UNUSED(beta, axis);
-
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32);
- ARM_COMPUTE_ERROR_ON(beta != 1.0f);
- ARM_COMPUTE_ERROR_ON_MSG(axis != 0, "axis must be 0 for GLES");
-
- // Create intermediate tensors shapes
- _tmp.allocator()->init(TensorInfo(input->info()->tensor_shape(), input->info()->num_channels(), input->info()->data_type()));
-
- TensorShape shape = input->info()->tensor_shape();
- shape.set(0, 1);
- TensorInfo tensor_info_max_sum(shape, input->info()->num_channels(), input->info()->data_type());
- _max.allocator()->init(tensor_info_max_sum);
- _sum.allocator()->init(tensor_info_max_sum);
-
- // Manage intermediate buffers
- _memory_group.manage(&_tmp);
- _memory_group.manage(&_max);
- _memory_group.manage(&_sum);
-
- // Configure Kernels
- _max_kernel.configure(input, &_max);
- _shift_exp_sum_kernel.configure(input, &_max, &_tmp, &_sum);
- _norm_kernel.configure(&_tmp, &_sum, output);
-
- // Allocate intermediate buffers
- _tmp.allocator()->allocate();
- _max.allocator()->allocate();
- _sum.allocator()->allocate();
-}
-
-void GCSoftmaxLayer::run()
-{
- MemoryGroupResourceScope scope_mg(_memory_group);
-
- GCScheduler::get().dispatch(_max_kernel, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_shift_exp_sum_kernel, false);
- GCScheduler::get().memory_barrier();
- GCScheduler::get().dispatch(_norm_kernel);
-}
-
-} // namespace arm_compute \ No newline at end of file
diff --git a/src/runtime/GLES_COMPUTE/functions/GCTensorShift.cpp b/src/runtime/GLES_COMPUTE/functions/GCTensorShift.cpp
deleted file mode 100644
index 050dc7e9f5..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCTensorShift.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h"
-
-#include "arm_compute/core/GLES_COMPUTE/IGCTensor.h"
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h"
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/PixelValue.h"
-#include "arm_compute/core/Utils.h"
-
-using namespace arm_compute;
-
-void GCTensorShift::configure(IGCTensor *input)
-{
- auto k = std::make_unique<GCTensorShiftKernel>();
- k->configure(input);
- _kernel = std::move(k);
-}
diff --git a/src/runtime/GLES_COMPUTE/functions/GCTranspose.cpp b/src/runtime/GLES_COMPUTE/functions/GCTranspose.cpp
deleted file mode 100644
index 14125e9db2..0000000000
--- a/src/runtime/GLES_COMPUTE/functions/GCTranspose.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h"
-
-#include "arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h"
-
-#include <utility>
-
-using namespace arm_compute;
-
-void GCTranspose::configure(const IGCTensor *input, IGCTensor *output)
-{
- auto k = std::make_unique<GCTransposeKernel>();
- k->configure(input, output);
- _kernel = std::move(k);
-}
diff --git a/tests/GLES_COMPUTE/GCAccessor.h b/tests/GLES_COMPUTE/GCAccessor.h
deleted file mode 100644
index 65df0a5ddc..0000000000
--- a/tests/GLES_COMPUTE/GCAccessor.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_GCACCESSOR_H
-#define ARM_COMPUTE_TEST_GCACCESSOR_H
-
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "tests/IAccessor.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Accessor implementation for @ref GCTensor objects. */
-class GCAccessor : public IAccessor
-{
-public:
- /** Create an accessor for the given @p tensor.
- *
- * @param[in, out] tensor To be accessed tensor.
- *
- * @note The GLES memory is mapped by the constructor.
- *
- */
- GCAccessor(GCTensor &tensor);
-
- /** Prevent instances of this class from being copy constructed */
- GCAccessor(const GCAccessor &) = delete;
- /** Prevent instances of this class from being copied */
- GCAccessor &operator=(const GCAccessor &) = delete;
- /** Allow instances of this class to be move constructed */
- GCAccessor(GCAccessor &&) = default;
- /** Prevent instances of this class to be moved */
- GCAccessor &operator=(GCAccessor &&) = delete;
-
- /** Destructor that unmaps the GLES memory. */
- ~GCAccessor();
-
- TensorShape shape() const override;
- size_t element_size() const override;
- size_t size() const override;
- Format format() const override;
- DataLayout data_layout() const override;
- DataType data_type() const override;
- int num_channels() const override;
- int num_elements() const override;
- PaddingSize padding() const override;
- QuantizationInfo quantization_info() const override;
- const void *operator()(const Coordinates &coord) const override;
- void *operator()(const Coordinates &coord) override;
-
-private:
- GCTensor &_tensor;
-};
-
-inline GCAccessor::GCAccessor(GCTensor &tensor)
- : _tensor{ tensor }
-{
- _tensor.map();
-}
-
-inline GCAccessor::~GCAccessor()
-{
- _tensor.unmap();
-}
-
-inline TensorShape GCAccessor::shape() const
-{
- return _tensor.info()->tensor_shape();
-}
-
-inline size_t GCAccessor::element_size() const
-{
- return _tensor.info()->element_size();
-}
-
-inline size_t GCAccessor::size() const
-{
- return _tensor.info()->total_size();
-}
-
-inline Format GCAccessor::format() const
-{
- return _tensor.info()->format();
-}
-
-inline DataLayout GCAccessor::data_layout() const
-{
- return _tensor.info()->data_layout();
-}
-
-inline DataType GCAccessor::data_type() const
-{
- return _tensor.info()->data_type();
-}
-
-inline int GCAccessor::num_channels() const
-{
- return _tensor.info()->num_channels();
-}
-
-inline int GCAccessor::num_elements() const
-{
- return _tensor.info()->tensor_shape().total_size();
-}
-
-inline PaddingSize GCAccessor::padding() const
-{
- return _tensor.info()->padding();
-}
-
-inline QuantizationInfo GCAccessor::quantization_info() const
-{
- return _tensor.info()->quantization_info();
-}
-
-inline const void *GCAccessor::operator()(const Coordinates &coord) const
-{
- return _tensor.ptr_to_element(coord);
-}
-
-inline void *GCAccessor::operator()(const Coordinates &coord)
-{
- return _tensor.ptr_to_element(coord);
-}
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_GCACCESSOR_H */
diff --git a/tests/GLES_COMPUTE/Helper.h b/tests/GLES_COMPUTE/Helper.h
deleted file mode 100644
index fb1679e3ff..0000000000
--- a/tests/GLES_COMPUTE/Helper.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_GC_HELPER_H
-#define ARM_COMPUTE_TEST_GC_HELPER_H
-
-#include "tests/Globals.h"
-
-#include "arm_compute/core/ITensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-
-#include <iostream>
-
-namespace arm_compute
-{
-namespace test
-{
-/** Helper to create an empty tensor.
- *
- * @param[in] shape Desired shape.
- * @param[in] data_type Desired data type.
- * @param[in] num_channels (Optional) It indicates the number of channels for each tensor element
- *
- * @return Empty @ref GCTensor with the specified shape and data type.
- */
-inline GCTensor create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1)
-{
- GCTensor tensor;
- tensor.allocator()->init(TensorInfo(shape, num_channels, data_type));
-
- return tensor;
-}
-
-/** Helper to create an empty tensor.
- *
- * @param[in] name File name from which to get the dimensions.
- * @param[in] data_type Desired data type.
- *
- * @return Empty @ref GCTensor with the specified shape and data type.
- */
-inline GCTensor create_tensor(const std::string &name, DataType data_type)
-{
- constexpr unsigned int num_channels = 1;
-
- const RawTensor &raw = library->get(name);
-
- GCTensor tensor;
- tensor.allocator()->init(TensorInfo(raw.shape(), num_channels, data_type));
-
- return tensor;
-}
-
-/** Helper to print tensor.
- *
- * @param[in] tensor Tensor to print.
- * @param[in] name Tensor name.
- * @param[in] info Format information.
- *
- * @return Empty @ref GCTensor with the specified shape and data type.
- */
-inline void print_tensor(ITensor &tensor, const std::string &name, IOFormatInfo info = IOFormatInfo(IOFormatInfo::PrintRegion::Full))
-{
- std::ostringstream s;
- IGCTensor &t = dynamic_cast<IGCTensor &>(tensor);
- t.map();
- t.print(s, info);
-
- std::cout << name << ":" << std::endl;
- std::cout << s.str().c_str();
- t.unmap();
-}
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_GC_HELPER_H */
diff --git a/tests/SConscript b/tests/SConscript
index 041ed8f548..8eebe5f2d8 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -145,16 +145,6 @@ if env['neon']:
if env['external_tests_dir']:
files_validation += Glob(env['external_tests_dir'] + '/tests/validation/NEON/' + filter_pattern)
-
-if env['gles_compute']:
- test_env.Append(CPPDEFINES=['ARM_COMPUTE_GC'])
-
- files_benchmark += Glob('benchmark/GLES_COMPUTE/*/*.cpp')
- files_benchmark += Glob('benchmark/GLES_COMPUTE/*.cpp')
-
- files_validation += Glob('validation/GLES_COMPUTE/*/*.cpp')
- files_validation += Glob('validation/GLES_COMPUTE/*.cpp')
-
extra_link_flags = []
if env['os'] == 'android':
test_env.Append(LIBS = ["log"])
diff --git a/tests/Utils.h b/tests/Utils.h
index 81fd253cee..ab256032b0 100644
--- a/tests/Utils.h
+++ b/tests/Utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -40,11 +40,6 @@
#include "arm_compute/runtime/CL/CLScheduler.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#endif /* ARM_COMPUTE_GC */
-
#include <cmath>
#include <cstddef>
#include <limits>
@@ -806,17 +801,7 @@ inline void sync_if_necessary()
template <typename TensorType>
inline void sync_tensor_if_necessary(TensorType &tensor)
{
-#ifdef ARM_COMPUTE_GC
- if(opengles31_is_available() && std::is_same<typename std::decay<TensorType>::type, arm_compute::GCTensor>::value)
- {
- // Force sync the tensor by calling map and unmap.
- IGCTensor &t = dynamic_cast<IGCTensor &>(tensor);
- t.map();
- t.unmap();
- }
-#else /* ARM_COMPUTE_GC */
ARM_COMPUTE_UNUSED(tensor);
-#endif /* ARM_COMPUTE_GC */
}
} // namespace test
} // namespace arm_compute
diff --git a/tests/benchmark/GLES_COMPUTE/Scale.cpp b/tests/benchmark/GLES_COMPUTE/Scale.cpp
deleted file mode 100644
index b3b2735a93..0000000000
--- a/tests/benchmark/GLES_COMPUTE/Scale.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2017-2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/benchmark/fixtures/ScaleLayerFixture.h"
-#include "tests/datasets/ScaleLayerDataset.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "utils/TypePrinter.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace benchmark
-{
-namespace
-{
-const auto data_types = framework::dataset::make("DataType", { DataType::F16 });
-} // namespace
-
-template <typename T>
-using GCScaleLayerFixture = ScaleLayerFixture<GCTensor, GCScale, GCAccessor, T>;
-
-TEST_SUITE(GC)
-
-REGISTER_FIXTURE_DATA_TEST_CASE(SmallScaleLayer, GCScaleLayerFixture<half>, framework::DatasetMode::ALL,
- framework::dataset::combine(datasets::SmallScaleLayerShapes(), data_types));
-
-TEST_SUITE_END()
-} // namespace benchmark
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/benchmark_examples/RunExample.cpp b/tests/benchmark_examples/RunExample.cpp
index 8adcd95ff6..e5dfe74d0e 100644
--- a/tests/benchmark_examples/RunExample.cpp
+++ b/tests/benchmark_examples/RunExample.cpp
@@ -38,9 +38,6 @@
#include "arm_compute/runtime/CL/CLHelpers.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#endif /* ARM_COMPUTE_GC */
#include <libgen.h>
diff --git a/tests/framework/ParametersLibrary.cpp b/tests/framework/ParametersLibrary.cpp
index a6953eac69..5041653cac 100644
--- a/tests/framework/ParametersLibrary.cpp
+++ b/tests/framework/ParametersLibrary.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Arm Limited.
+ * Copyright (c) 2019-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -56,12 +56,5 @@ typename ContextType<CLTensor>::type *ParametersLibrary::get_ctx<CLTensor>()
}
#endif /* ARM_COMPUTE_CL */
-#if ARM_COMPUTE_GC
-template <>
-typename ContextType<GCTensor>::type *ParametersLibrary::get_ctx<GCTensor>()
-{
- return static_cast<typename ContextType<GCTensor>::type *>(_gc_ctx.get());
-}
-#endif /* ARM_COMPUTE_GC */
} // namespace test
} // namespace arm_compute
diff --git a/tests/framework/ParametersLibrary.h b/tests/framework/ParametersLibrary.h
index 064b5edf2d..d3677726ad 100644
--- a/tests/framework/ParametersLibrary.h
+++ b/tests/framework/ParametersLibrary.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Arm Limited.
+ * Copyright (c) 2019-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -30,10 +30,6 @@
#include "arm_compute/runtime/CL/CLRuntimeContext.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#endif /* ARM_COMPUTE_GC */
#include <memory>
@@ -61,14 +57,6 @@ struct ContextType<CLTensor>
};
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-template <>
-struct ContextType<GCTensor>
-{
- using type = GCRuntimeContext;
-};
-#endif /* ARM_COMPUTE_GC */
-
/** Class that contains all the global parameters used by the tests */
class ParametersLibrary final
{
diff --git a/tests/framework/SConscript b/tests/framework/SConscript
index 0ac9f9e5a9..e805ac0e2c 100644
--- a/tests/framework/SConscript
+++ b/tests/framework/SConscript
@@ -47,11 +47,6 @@ Help(new_options.GenerateHelpText(framework_env))
if(env['opencl']):
framework_env.Append(CPPDEFINES=['ARM_COMPUTE_CL'])
-if(env['gles_compute']):
- framework_env.Append(CPPDEFINES=['ARM_COMPUTE_GC'])
- if env['os'] != 'android':
- framework_env.Append(CPPPATH = ["#opengles-3.1/include", "#opengles-3.1/mali_include"])
-
framework_env.Append(CPPPATH = ["."])
framework_env.Append(CPPFLAGS=['-Wno-overloaded-virtual'])
diff --git a/tests/main.cpp b/tests/main.cpp
index 2c5eb9a2fd..bd15fd3507 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -44,9 +44,6 @@
#include "arm_compute/runtime/CL/CLTuner.h"
#include "utils/TypePrinter.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#endif /* ARM_COMPUTE_GC */
#include "arm_compute/runtime/Scheduler.h"
#include <fstream>
@@ -179,20 +176,6 @@ int main(int argc, char **argv)
parameters = std::make_unique<ParametersLibrary>();
parameters->set_cpu_ctx(std::move(cpu_ctx));
-#ifdef ARM_COMPUTE_GC
- // Setup OpenGL context
- {
- auto gles_ctx = std::make_unique<GCRuntimeContext>();
- ARM_COMPUTE_ERROR_ON(gles_ctx == nullptr);
- {
- // Legacy singletons API: This has been deprecated and the singletons will be removed in future releases
- // Setup singleton for backward compatibility
- GCScheduler::get().default_init();
- }
- parameters->set_gc_ctx(std::move(gles_ctx));
- };
-#endif /* ARM_COMPUTE_GC */
-
#ifdef ARM_COMPUTE_CL
CLTuner cl_tuner(false);
CLGEMMHeuristicsHandle gemm_heuristics;
diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp
index 736d4816f5..8ba3c2b295 100644
--- a/tests/validate_examples/RunExample.cpp
+++ b/tests/validate_examples/RunExample.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -40,9 +40,6 @@
#ifdef ARM_COMPUTE_CL
#include "arm_compute/runtime/CL/CLScheduler.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#endif /* ARM_COMPUTE_GC */
#include <libgen.h>
diff --git a/tests/validation/GLES_COMPUTE/ActivationLayer.cpp b/tests/validation/GLES_COMPUTE/ActivationLayer.cpp
deleted file mode 100644
index 630c0a96e7..0000000000
--- a/tests/validation/GLES_COMPUTE/ActivationLayer.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/ActivationFunctionsDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/ActivationLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Define tolerance of the activation layer.
- *
- * @param[in] activation The activation function used.
- * @param[in] data_type Data type.
- *
- * @return Tolerance depending on the activation function.
- */
-AbsoluteTolerance<float> tolerance(ActivationLayerInfo::ActivationFunction activation, DataType data_type)
-{
- constexpr float epsilon = 1e-6f;
-
- switch(activation)
- {
- case ActivationLayerInfo::ActivationFunction::LINEAR:
- return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.2f : epsilon);
- case ActivationLayerInfo::ActivationFunction::SQUARE:
- return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.1f : epsilon);
- case ActivationLayerInfo::ActivationFunction::LOGISTIC:
- return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.001f : epsilon);
- case ActivationLayerInfo::ActivationFunction::LEAKY_RELU:
- return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.00001f : epsilon);
- case ActivationLayerInfo::ActivationFunction::SOFT_RELU:
- case ActivationLayerInfo::ActivationFunction::ELU:
- case ActivationLayerInfo::ActivationFunction::SQRT:
- return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.01f : 0.00001f);
- case ActivationLayerInfo::ActivationFunction::TANH:
- return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.001f : 0.00001f);
- default:
- return AbsoluteTolerance<float>(epsilon);
- }
-}
-
-/** CNN data types */
-const auto CNNDataTypes = framework::dataset::make("DataType",
-{
- DataType::F16,
- DataType::F32,
-});
-
-/** Input data sets. */
-const auto ActivationDataset = combine(combine(framework::dataset::make("InPlace", { false, true }), datasets::ActivationFunctions()), framework::dataset::make("AlphaBeta", { 0.5f, 1.f }));
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(ActivationLayer)
-template <typename T>
-using GCActivationLayerFixture = ActivationValidationFixture<GCTensor, GCAccessor, GCActivationLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCActivationLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), ActivationDataset),
- framework::dataset::make("DataType",
- DataType::F16)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance(_function, _data_type));
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCActivationLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ActivationDataset),
- framework::dataset::make("DataType",
- DataType::F16)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance(_function, _data_type));
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCActivationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), ActivationDataset), framework::dataset::make("DataType",
- DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance(_function, _data_type));
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCActivationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ActivationDataset), framework::dataset::make("DataType",
- DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance(_function, _data_type));
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp b/tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp
deleted file mode 100644
index c245e7eadc..0000000000
--- a/tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/ConvertPolicyDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/ArithmeticOperationsFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Input data sets **/
-const auto ArithmeticAdditionFP16Dataset = combine(combine(framework::dataset::make("DataType", DataType::F16), framework::dataset::make("DataType", DataType::F16)),
- framework::dataset::make("DataType", DataType::F16));
-
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(ArithmeticAddition)
-template <typename T>
-using GCArithmeticAdditionFixture = ArithmeticAdditionValidationFixture<GCTensor, GCAccessor, GCArithmeticAddition, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCArithmeticAdditionFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), ArithmeticAdditionFP16Dataset),
- framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp b/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp
deleted file mode 100644
index ec4925a0c6..0000000000
--- a/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/RandomBatchNormalizationLayerDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Helpers.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/BatchNormalizationLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-constexpr AbsoluteTolerance<float> tolerance_f(0.00001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
-constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
-const auto act_infos = framework::dataset::make("ActivationInfo",
-{
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f),
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 8.f, 2.f),
-});
-
-const auto data_GB = combine(framework::dataset::make("UseGamma", { false, true }),
- framework::dataset::make("UseBeta", { false, true }));
-const auto data_f16 = combine(combine(combine(data_GB, act_infos), framework::dataset::make("DataType", DataType::F16)),
- framework::dataset::make("DataLayout", { DataLayout::NCHW }));
-const auto data_f32 = combine(combine(combine(data_GB, act_infos), framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("DataLayout", { DataLayout::NCHW }));
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(BatchNormalizationLayer)
-
-template <typename T>
-using GCBatchNormalizationLayerFixture = BatchNormalizationLayerValidationFixture<GCTensor, GCAccessor, GCBatchNormalizationLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(Random, GCBatchNormalizationLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(datasets::SmallRandomBatchNormalizationLayerDataset(), data_f16))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16, 0);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(Random, GCBatchNormalizationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(datasets::LargeRandomBatchNormalizationLayerDataset(), data_f32))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f, 0);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp
deleted file mode 100644
index d533d76599..0000000000
--- a/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/LargeConvolutionLayerDataset.h"
-#include "tests/datasets/SmallConvolutionLayerDataset.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/ConvolutionLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.2)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
-RelativeTolerance<float> tolerance_f32(0.00001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
-constexpr float tolerance_num = 0.07f; /**< Tolerance number */
-
-/** CNN data types */
-const auto CNNDataTypes = framework::dataset::make("DataType",
-{
- DataType::F16,
- DataType::F32,
-});
-const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo",
-{
- ActivationLayerInfo(),
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 0.5f)
-});
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(ConvolutionLayer)
-
-template <typename T>
-using GCConvolutionLayerFixture = ConvolutionValidationFixture<GCTensor, GCAccessor, GCConvolutionLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::SmallConvolutionLayerReducedDataset(),
- framework::dataset::make("ReshapeWeights", { true })),
- framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout",
- DataLayout::NCHW)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeConvolutionLayerDataset(),
- framework::dataset::make("ReshapeWeights", { true })),
- framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout",
- DataLayout::NCHW)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::SmallConvolutionLayerReducedDataset(),
- framework::dataset::make("ReshapeWeights", { true })),
- framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("DataLayout",
- DataLayout::NCHW)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32, tolerance_num);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeConvolutionLayerDataset(),
- framework::dataset::make("ReshapeWeights", { true })),
- framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("DataLayout",
- DataLayout::NCHW)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32, tolerance_num);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp b/tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp
deleted file mode 100644
index d2659e1035..0000000000
--- a/tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/ConcatenateLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-TEST_SUITE(GC)
-TEST_SUITE(DepthConcatenateLayer)
-
-template <typename T>
-using GCDepthConcatenateLayerFixture = ConcatenateLayerValidationFixture<GCTensor, IGCTensor, GCAccessor, GCConcatenateLayer, T, false>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCDepthConcatenateLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Small3DShapes(),
- framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("Axis", 2)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCDepthConcatenateLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large3DShapes(),
- framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("Axis", 2)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCDepthConcatenateLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Small3DShapes(),
- framework::dataset::make("DataType",
- DataType::F32)),
- framework::dataset::make("Axis", 2)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCDepthConcatenateLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large3DShapes(), framework::dataset::make("DataType",
- DataType::F32)),
- framework::dataset::make("Axis", 2)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp
deleted file mode 100644
index 0c5a7d4d4b..0000000000
--- a/tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/DepthwiseConvolutionLayerDataset.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-RelativeTolerance<half> tolerance_fp16(half(0.2)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
-constexpr float tolerance_num = 0.07f; /**< Tolerance number */
-
-const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 3 });
-
-//Activation Functions
-const auto ActivationFunctionsEmptyDataset = framework::dataset::make("ActivationInfo",
-{ ActivationLayerInfo() });
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(DepthwiseConvolutionLayer)
-
-template <typename T>
-using GCDepthwiseConvolutionLayerFixture3x3 = DepthwiseConvolutionLayerValidationFixture<GCTensor, GCAccessor, GCDepthwiseConvolutionLayer3x3, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-TEST_SUITE(W3x3)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCDepthwiseConvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
- depth_multipliers),
- framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout", DataLayout::NCHW)),
- ActivationFunctionsEmptyDataset))
-{
- validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCDepthwiseConvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
- depth_multipliers),
- framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout", DataLayout::NCHW)),
- ActivationFunctionsEmptyDataset))
-{
- validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp
deleted file mode 100644
index 205a283300..0000000000
--- a/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/DirectConvolutionLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-RelativeTolerance<half> tolerance_fp16(half(0.2)); /**< Tolerance for floating point tests */
-RelativeTolerance<float> tolerance_fp32(0.02f); /**< Tolerance for floating point tests */
-constexpr float tolerance_num = 0.07f; /**< Tolerance number */
-
-/** Direct convolution data set. */
-const auto data_quantized = combine(datasets::SmallDirectConvolutionShapes(),
- combine(framework::dataset::make("StrideX", 1, 3),
- combine(framework::dataset::make("StrideY", 1, 3),
- combine(concat(combine(framework::dataset::make("PadX", 0),
- combine(framework::dataset::make("PadY", 0),
- framework::dataset::make("KernelSize", 1))),
- combine(framework::dataset::make("PadX", 0, 2),
- combine(framework::dataset::make("PadY", 0, 2),
- framework::dataset::make("KernelSize", { 3 })))),
- framework::dataset::make("NumKernels", { 1, 4, 8, 16 })))));
-
-const auto data = combine(datasets::SmallDirectConvolutionShapes(),
- combine(framework::dataset::make("StrideX", 1, 3),
- combine(framework::dataset::make("StrideY", 1, 3),
- combine(concat(combine(framework::dataset::make("PadX", 0),
- combine(framework::dataset::make("PadY", 0),
- framework::dataset::make("KernelSize", 1))),
- combine(framework::dataset::make("PadX", 0, 2),
- combine(framework::dataset::make("PadY", 0, 2),
- framework::dataset::make("KernelSize", { 3, 5 })))),
- framework::dataset::make("NumKernels", { 1, 4, 8, 16 })))));
-/** Activation function Dataset*/
-const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo",
-{
- ActivationLayerInfo(),
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC),
- ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
-});
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(DirectConvolutionLayer)
-
-template <typename T>
-using GCDirectConvolutionLayerFixture = DirectConvolutionValidationFixture<GCTensor, GCAccessor, GCDirectConvolutionLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data, framework::dataset::make("DataType", DataType::F16)),
- ActivationFunctionsDataset),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data, framework::dataset::make("DataType", DataType::F32)),
- ActivationFunctionsDataset),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_fp32);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp b/tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp
deleted file mode 100644
index 83033de3ec..0000000000
--- a/tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-RelativeTolerance<half> tolerance_fp16(half(0.2)); /**< Tolerance for floating point tests */
-RelativeTolerance<float> tolerance_fp32(0.02f); /**< Tolerance for floating point tests */
-constexpr float tolerance_num = 0.07f; /**< Tolerance number */
-constexpr float abs_tolerance_fp32(0.02f); /**< Absolute tolerance for floating point tests */
-
-/** Direct convolution data set. */
-const auto data = combine(datasets::SmallDirectConvolutionTensorShiftShapes(),
- combine(framework::dataset::make("StrideX", 1, 3),
- combine(framework::dataset::make("StrideY", 1, 3),
- combine(concat(combine(framework::dataset::make("PadX", 0),
- combine(framework::dataset::make("PadY", 0),
- framework::dataset::make("KernelSize", 1))),
- combine(framework::dataset::make("PadX", 0, 2),
- combine(framework::dataset::make("PadY", 0, 2),
- framework::dataset::make("KernelSize", { 3, 5 })))),
- framework::dataset::make("NumKernels", { 3 })))));
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(DirectConvolutionLayerTensorShift)
-
-template <typename T>
-using GCDirectConvolutionLayerTensorShiftFixture = DirectConvolutionValidationTensorShiftFixture<GCTensor, GCAccessor, GCDirectConvolutionLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerTensorShiftFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(data, framework::dataset::make("DataType", DataType::F16)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerTensorShiftFixture<float>, framework::DatasetMode::NIGHTLY, combine(data, framework::dataset::make("DataType", DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_fp32, 0.f, abs_tolerance_fp32);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/DropoutLayer.cpp b/tests/validation/GLES_COMPUTE/DropoutLayer.cpp
deleted file mode 100644
index bb34155a5e..0000000000
--- a/tests/validation/GLES_COMPUTE/DropoutLayer.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/DropoutLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-//constexpr AbsoluteTolerance<float> tolerance_f(0.00001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
-
-const auto testparam = combine(framework::dataset::make("ratio", { 0.5f }), framework::dataset::make("forward", { false, true }));
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(DropoutLayer)
-
-template <typename T>
-using GCDropoutLayerFixture = DropoutLayerValidationFixture<GCTensor, GCAccessor, GCDropoutLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(Random, GCDropoutLayerFixture<float>, framework::DatasetMode::NIGHTLY,
- combine(combine(datasets::SmallShapes(), testparam), framework::dataset::make("DataType", DataType::F32)))
-{
- // FIXME(APPBROWSER-302)
- // Validate output
- //validate(GCAccessor(_target), _reference, tolerance_f, 0);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(Random, GCDropoutLayerFixture<float>, framework::DatasetMode::NIGHTLY,
- combine(combine(datasets::SmallShapes(), testparam), framework::dataset::make("DataType", DataType::F16)))
-{
- // FIXME(APPBROWSER-302)
- // Validate output
- //validate(GCAccessor(_target), _reference, tolerance_f, 0);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp b/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp
deleted file mode 100644
index db83bd8e7a..0000000000
--- a/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/GLES_COMPUTE/Helper.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/FullyConnectedLayerDataset.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/FullyConnectedLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Tolerance for float operations */
-constexpr RelativeTolerance<float> rel_tolerance_f32(0.05f);
-constexpr AbsoluteTolerance<float> abs_tolerance_f32(0.0001f);
-RelativeTolerance<half_float::half> tolerance_f16(half(0.2));
-constexpr float tolerance_num = 0.07f; /**< Tolerance number */
-
-/** CNN data types */
-const auto CNNDataTypes = framework::dataset::make("DataType",
-{
- DataType::F16,
- DataType::F32,
-});
-
-const auto FullyConnectedParameters = combine(framework::dataset::make("TransposeWeights", { false, true }), framework::dataset::make("ReshapeWeights", { false, true }));
-const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", ActivationLayerInfo());
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(FullyConnectedLayer)
-
-template <typename T>
-using GCFullyConnectedLayerFixture = FullyConnectedLayerValidationFixture<GCTensor, GCAccessor, GCFullyConnectedLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCFullyConnectedLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(),
- FullyConnectedParameters),
- framework::dataset::make("DataType", DataType::F16)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCFullyConnectedLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeFullyConnectedLayerDataset(),
- FullyConnectedParameters),
- framework::dataset::make("DataType", DataType::F16)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCFullyConnectedLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(), FullyConnectedParameters),
- framework::dataset::make("DataType", DataType::F32)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, rel_tolerance_f32);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCFullyConnectedLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeFullyConnectedLayerDataset(), FullyConnectedParameters),
- framework::dataset::make("DataType", DataType::F32)),
- ActivationFunctionsDataset))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, rel_tolerance_f32, 0, abs_tolerance_f32);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/GEMM.cpp b/tests/validation/GLES_COMPUTE/GEMM.cpp
deleted file mode 100644
index b1db9c9546..0000000000
--- a/tests/validation/GLES_COMPUTE/GEMM.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/GLES_COMPUTE/Helper.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/LargeGEMMDataset.h"
-#include "tests/datasets/SmallGEMMDataset.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/GEMMFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-RelativeTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for floating point data types */
-
-/** CNN data types */
-const auto CNNDataTypes = framework::dataset::make("DataType",
-{
- DataType::F32,
-});
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(GEMM)
-
-template <typename T>
-using GCGEMMFixture = GEMMValidationFixture<GCTensor, GCAccessor, GCGEMM, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCGEMMFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallGEMMDataset(),
- framework::dataset::make("ReshapeWeights", { true })),
- framework::dataset::make("DataType", DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCGEMMFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeGEMMDataset(),
- framework::dataset::make("ReshapeWeights", { true })),
- framework::dataset::make("DataType", DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp b/tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp
deleted file mode 100644
index 984309ee7a..0000000000
--- a/tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/PoolingTypesDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/PoolingLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Input data set for float data types */
-const auto GlobalPoolingLayerDataset = combine(datasets::GlobalPoolingShapes(), datasets::PoolingTypes());
-
-/** Input data set for quantized data types */
-constexpr AbsoluteTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for FP32 types */
-constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for FP16 types */
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(GlobalPoolingLayer)
-
-template <typename T>
-using GCGlobalPoolingLayerFixture = GlobalPoolingLayerValidationFixture<GCTensor, GCAccessor, GCPoolingLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunGlobalPooling, GCGlobalPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(GlobalPoolingLayerDataset, framework::dataset::make("DataType",
- DataType::F32)),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunGlobalPooling, GCGlobalPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(GlobalPoolingLayerDataset, framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/NormalizationLayer.cpp b/tests/validation/GLES_COMPUTE/NormalizationLayer.cpp
deleted file mode 100644
index 85b1e0965f..0000000000
--- a/tests/validation/GLES_COMPUTE/NormalizationLayer.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/NormalizationTypesDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/NormalizationLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Tolerance for float operations */
-constexpr AbsoluteTolerance<float> tolerance_f32(0.00001f);
-
-/** Input data set. */
-const auto NormalizationDataset = combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("NormType", { NormType::IN_MAP_1D, NormType::CROSS_MAP })),
- framework::dataset::make("NormalizationSize", 3, 9, 2)),
- framework::dataset::make("Beta", { 0.5f, 1.f, 2.f })),
- framework::dataset::make("IsScaled", { true, false }));
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(NormalizationLayer)
-
-//TODO(COMPMID-415): Missing configuration?
-
-template <typename T>
-using GCNormalizationLayerFixture = NormalizationValidationFixture<GCTensor, GCAccessor, GCNormalizationLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCNormalizationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(NormalizationDataset,
- framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCNormalizationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(NormalizationDataset,
- framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp b/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp
deleted file mode 100644
index f9f26f78be..0000000000
--- a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/RandomNormalizePlanarYUVLayerDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/NormalizePlanarYUVLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-constexpr AbsoluteTolerance<float> tolerance_f16(0.5f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(NormalizePlanarYUVLayer)
-
-template <typename T>
-using GCNormalizePlanarYUVLayerFixture = NormalizePlanarYUVLayerValidationFixture<GCTensor, GCAccessor, GCNormalizePlanarYUVLayer, T>;
-
-// *INDENT-OFF*
-// clang-format off
-DATA_TEST_CASE(Validate, framework::DatasetMode::NIGHTLY, zip(zip(zip(
- framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Mismatching data types
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Window shrink
- TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), // Unsupported data type
- TensorInfo(TensorShape(32U, 16U, 8U), 1, DataType::F16),
- TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F16), // Mismatching mean and sd shapes
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Mismatching shapes
- }),
- framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16),
- TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
- TensorInfo(TensorShape(32U, 16U, 8U), 1, DataType::F16),
- TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F16),
- TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F16),
- })),
- framework::dataset::make("MSTDInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F16),
- TensorInfo(TensorShape(2U), 1, DataType::F16),
- TensorInfo(TensorShape(2U), 1, DataType::U8),
- TensorInfo(TensorShape(8U), 1, DataType::F16),
- TensorInfo(TensorShape(6U), 1, DataType::F16),
- TensorInfo(TensorShape(2U), 1, DataType::F16),
- })),
- framework::dataset::make("Expected", { false, false, false, true, false, false })),
- input_info, output_info, msd_info, expected)
-{
- const auto &mean_info = msd_info;
- const auto &sd_info = msd_info;
- bool has_error = bool(GCNormalizePlanarYUVLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), &mean_info.clone()->set_is_resizable(false), &sd_info.clone()->set_is_resizable(false)));
- ARM_COMPUTE_EXPECT(has_error == expected, framework::LogLevel::ERRORS);
-}
-// clang-format on
-// *INDENT-ON*
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(Random, GCNormalizePlanarYUVLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::RandomNormalizePlanarYUVLayerDataset(),
- framework::dataset::make("DataType", DataType::F16)),
- framework::dataset::make("DataLayout", { DataLayout::NCHW })))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16, 0);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/PoolingLayer.cpp b/tests/validation/GLES_COMPUTE/PoolingLayer.cpp
deleted file mode 100644
index afae4ff4ea..0000000000
--- a/tests/validation/GLES_COMPUTE/PoolingLayer.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/PoolingTypesDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/PoolingLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Input data set for floating-point data types */
-const auto PoolingLayerDatasetFP = combine(combine(combine(datasets::PoolingTypes(), framework::dataset::make("PoolingSize", { Size2D(2, 2), Size2D(3, 3), Size2D(4, 4), Size2D(7, 7), Size2D(9, 9) })),
- framework::dataset::make("PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })),
- framework::dataset::make("ExcludePadding", { true, false }));
-
-constexpr AbsoluteTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for 32-bit floating-point type */
-constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for 16-bit floating-point type */
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(PoolingLayer)
-
-//clang-format off
-DATA_TEST_CASE(Validate, framework::DatasetMode::NIGHTLY, zip(zip(zip(
- framework::dataset::make("InputInfo",
-{
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Window shrink
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid pad/size combination
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid pad/size combination
- TensorInfo(TensorShape(15U, 13U, 5U), 1, DataType::F32), // Non-rectangular Global Pooling
- TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), // Invalid output Global Pooling
- TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32),
-}),
-framework::dataset::make("OutputInfo",
-{
- TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(25U, 16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), TensorInfo(TensorShape(2U, 2U, 5U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32),
-})),
-framework::dataset::make("PoolInfo",
-{
- PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)),
- PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)),
- PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)),
- PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)),
- PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 2, 0)),
- PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 2)),
- PoolingLayerInfo(PoolingType::L2, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)),
- PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW),
- PoolingLayerInfo(PoolingType::MAX, DataLayout::NCHW),
- PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW),
-})),
-framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, false, true })),
-input_info, output_info, pool_info, expected)
-{
- ARM_COMPUTE_EXPECT(bool(GCPoolingLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pool_info)) == expected, framework::LogLevel::ERRORS);
-}
-//clang-format on
-
-template <typename T>
-using GCPoolingLayerFixture = PoolingLayerValidationFixture<GCTensor, GCAccessor, GCPoolingLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFP,
- framework::dataset::make("DataType",
- DataType::F32))),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP,
- framework::dataset::make("DataType",
- DataType::F32))),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFP,
- framework::dataset::make("DataType", DataType::F16))),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP,
- framework::dataset::make("DataType", DataType::F16))),
- framework::dataset::make("DataLayout", DataLayout::NCHW)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/Scale.cpp b/tests/validation/GLES_COMPUTE/Scale.cpp
deleted file mode 100644
index 8731f0bc80..0000000000
--- a/tests/validation/GLES_COMPUTE/Scale.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2017-2021 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h"
-#include "arm_compute/runtime/Tensor.h"
-#include "arm_compute/runtime/TensorAllocator.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/BorderModeDataset.h"
-#include "tests/datasets/SamplingPolicyDataset.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Helpers.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/ScaleFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** CNN data types */
-const auto ScaleDataTypes = framework::dataset::make("DataType",
-{
- DataType::F16,
-});
-
-/** Aligned corners, this functionality is supported only by Neon and OpenCL backends */
-const auto AlignCorners = framework::dataset::make("AlignCorners",
-{
- false,
-});
-
-/** Tolerance */
-RelativeTolerance<half> tolerance_f16(half(0.1));
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(Scale)
-
-template <typename T>
-using GCScaleFixture = ScaleValidationFixture<GCTensor, GCAccessor, GCScale, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCScaleFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout", { DataLayout::NCHW })),
- framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR })),
- datasets::BorderModes()),
- datasets::SamplingPolicies()),
- AlignCorners))
-{
- //Create valid region
- TensorInfo src_info(_shape, 1, _data_type);
- const ValidRegion valid_region = calculate_valid_region_scale(src_info, _reference.shape(), _policy, _sampling_policy, (_border_mode == BorderMode::UNDEFINED));
-
- // Validate output
- validate(GCAccessor(_target), _reference, valid_region, tolerance_f16);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCScaleFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(datasets::LargeShapes(), framework::dataset::make("DataType",
- DataType::F16)),
- framework::dataset::make("DataLayout", { DataLayout::NCHW })),
- framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR })),
- datasets::BorderModes()),
- datasets::SamplingPolicies()),
- AlignCorners))
-{
- //Create valid region
- TensorInfo src_info(_shape, 1, _data_type);
- const ValidRegion valid_region = calculate_valid_region_scale(src_info, _reference.shape(), _policy, _sampling_policy, (_border_mode == BorderMode::UNDEFINED));
-
- // Validate output
- validate(GCAccessor(_target), _reference, valid_region, tolerance_f16);
-}
-TEST_SUITE_END()
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp b/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp
deleted file mode 100644
index 868662f4e7..0000000000
--- a/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/SoftmaxLayerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-/** Tolerance for float operations */
-RelativeTolerance<half> tolerance_f16(half(0.2));
-RelativeTolerance<float> tolerance_f32(0.001f);
-
-/** CNN data types */
-const auto CNNDataTypes = framework::dataset::make("DataType",
-{
- DataType::F16,
- DataType::F32,
-});
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(SoftmaxLayer)
-
-template <typename T>
-using GCSoftmaxLayerFixture = SoftmaxValidationFixture<GCTensor, GCAccessor, GCSoftmaxLayer, T>;
-
-TEST_SUITE(Float)
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCSoftmaxLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerSmallShapes(),
- framework::dataset::make("DataType", DataType::F16)),
- framework::dataset::make("Beta", 1.0f)),
- framework::dataset::make("Axis", 0)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCSoftmaxLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerLargeShapes(),
- framework::dataset::make("DataType", DataType::F16)),
- framework::dataset::make("Beta", 1.0f)),
- framework::dataset::make("Axis", 0)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f16);
-}
-TEST_SUITE_END() // FP16
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCSoftmaxLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerSmallShapes(),
- framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("Beta", 1.0f)),
- framework::dataset::make("Axis", 0)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCSoftmaxLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerLargeShapes(),
- framework::dataset::make("DataType", DataType::F32)),
- framework::dataset::make("Beta", 1.0f)),
- framework::dataset::make("Axis", 0)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-TEST_SUITE_END() // FP32
-TEST_SUITE_END() // Float
-
-TEST_SUITE_END() // SoftmaxLayer
-TEST_SUITE_END() // GC
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/Transpose.cpp b/tests/validation/GLES_COMPUTE/Transpose.cpp
deleted file mode 100644
index 80d628374d..0000000000
--- a/tests/validation/GLES_COMPUTE/Transpose.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/PaddingCalculator.h"
-#include "tests/datasets/ShapeDatasets.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/TransposeFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-TEST_SUITE(GC)
-TEST_SUITE(Transpose)
-
-template <typename T>
-using GCTransposeFixture = TransposeValidationFixture<GCTensor, GCAccessor, GCTranspose, T>;
-
-TEST_SUITE(FP16)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCTransposeFixture<half>, framework::DatasetMode::NIGHTLY, combine(datasets::Small2DShapes(), framework::dataset::make("DataType", DataType::F16)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCTransposeFixture<half>, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), framework::dataset::make("DataType", DataType::F16)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-TEST_SUITE_END()
-
-TEST_SUITE(FP32)
-FIXTURE_DATA_TEST_CASE(RunSmall, GCTransposeFixture<float>, framework::DatasetMode::NIGHTLY, combine(datasets::Small2DShapes(), framework::dataset::make("DataType", DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-FIXTURE_DATA_TEST_CASE(RunLarge, GCTransposeFixture<float>, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), framework::dataset::make("DataType", DataType::F32)))
-{
- // Validate output
- validate(GCAccessor(_target), _reference);
-}
-TEST_SUITE_END()
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp b/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp
deleted file mode 100644
index 6d57f84acc..0000000000
--- a/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2019-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/BlobLifetimeManager.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-#include "arm_compute/runtime/MemoryManagerOnDemand.h"
-#include "arm_compute/runtime/PoolManager.h"
-#include "tests/AssetsLibrary.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/framework/datasets/Datasets.h"
-#include "tests/validation/fixtures/UNIT/DynamicTensorFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-#ifndef DOXYGEN_SKIP_THIS
-using GCNormLayerWrapper = SimpleFunctionWrapper<MemoryManagerOnDemand, GCNormalizationLayer, IGCTensor>;
-template <>
-void GCNormLayerWrapper::configure(IGCTensor *src, IGCTensor *dst)
-{
- _func.configure(src, dst, NormalizationLayerInfo(NormType::CROSS_MAP, 3));
-}
-#endif // DOXYGEN_SKIP_THIS
-
-TEST_SUITE(GC)
-TEST_SUITE(UNIT)
-TEST_SUITE(DynamicTensor)
-
-using BlobMemoryManagementService = MemoryManagementService<GCBufferAllocator, BlobLifetimeManager, PoolManager, MemoryManagerOnDemand>;
-using GCDynamicTensorType3SingleFunction = DynamicTensorType3SingleFunction<GCTensor, GCAccessor, BlobMemoryManagementService, GCNormLayerWrapper>;
-
-/** Tests the memory manager with dynamic input and output tensors.
- *
- * Create and manage the tensors needed to run a simple function. After the function is executed,
- * change the input and output size requesting more memory and go through the manage/allocate process.
- * The memory manager should be able to update the inner structures and allocate the requested memory
- * */
-FIXTURE_DATA_TEST_CASE(DynamicTensorType3Single, GCDynamicTensorType3SingleFunction, framework::DatasetMode::NIGHTLY,
- framework::dataset::zip(framework::dataset::make("Level0Shape", { TensorShape(12U, 11U, 3U), TensorShape(256U, 8U, 12U) }),
- framework::dataset::make("Level1Shape", { TensorShape(67U, 31U, 15U), TensorShape(11U, 2U, 3U) })))
-{
- ARM_COMPUTE_EXPECT(internal_l0.size() == internal_l1.size(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(cross_l0.size() == cross_l1.size(), framework::LogLevel::ERRORS);
-
- const unsigned int internal_size = internal_l0.size();
- const unsigned int cross_size = cross_l0.size();
- if(input_l0.total_size() < input_l1.total_size())
- {
- for(unsigned int i = 0; i < internal_size; ++i)
- {
- ARM_COMPUTE_EXPECT(internal_l0[i].size < internal_l1[i].size, framework::LogLevel::ERRORS);
- }
- for(unsigned int i = 0; i < cross_size; ++i)
- {
- ARM_COMPUTE_EXPECT(cross_l0[i].size < cross_l1[i].size, framework::LogLevel::ERRORS);
- }
- }
- else
- {
- for(unsigned int i = 0; i < internal_size; ++i)
- {
- ARM_COMPUTE_EXPECT(internal_l0[i].size == internal_l1[i].size, framework::LogLevel::ERRORS);
- }
- for(unsigned int i = 0; i < cross_size; ++i)
- {
- ARM_COMPUTE_EXPECT(cross_l0[i].size == cross_l1[i].size, framework::LogLevel::ERRORS);
- }
- }
-}
-
-TEST_SUITE_END() // DynamicTensor
-TEST_SUITE_END() // UNIT
-TEST_SUITE_END() // GC
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp b/tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp
deleted file mode 100644
index d205a3b1c6..0000000000
--- a/tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h"
-#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h"
-#include "arm_compute/runtime/MemoryGroup.h"
-#include "tests/AssetsLibrary.h"
-#include "tests/GLES_COMPUTE/GCAccessor.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-#include "tests/framework/Asserts.h"
-#include "tests/framework/Macros.h"
-#include "tests/validation/Validation.h"
-#include "tests/validation/fixtures/UNIT/MemoryManagerFixture.h"
-
-namespace arm_compute
-{
-namespace test
-{
-namespace validation
-{
-namespace
-{
-RelativeTolerance<float> tolerance_f32(0.05f);
-} // namespace
-
-TEST_SUITE(GC)
-TEST_SUITE(UNIT)
-TEST_SUITE(MemoryManager)
-
-// Setting BlobMemoryManagerSimpleWithinFunctionLevel test
-using GCBlobMemoryManagerSimpleWithinFunctionLevelFixture = BlobMemoryManagerSimpleTestCaseFixture<GCTensor,
- GCAccessor,
- GCBufferAllocator,
- GCFullyConnectedLayer>;
-FIXTURE_TEST_CASE(BlobMemoryManagerSimpleWithinFunctionLevel,
- GCBlobMemoryManagerSimpleWithinFunctionLevelFixture,
- framework::DatasetMode::NIGHTLY)
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-
-// Setting BlobMemoryManagerReconfigure test
-using GCBlobMemoryManagerReconfigureFixture = BlobMemoryManagerReconfigureTestCaseFixture<GCTensor,
- GCAccessor,
- GCBufferAllocator,
- GCFullyConnectedLayer>;
-FIXTURE_TEST_CASE(BlobMemoryManagerReconfigure,
- GCBlobMemoryManagerReconfigureFixture,
- framework::DatasetMode::NIGHTLY)
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-
-// Setting BlobMemoryManagerReconfigure2 test
-using GCBlobMemoryManagerReconfigure2Fixture = BlobMemoryManagerReconfigure2TestCaseFixture<GCTensor,
- GCAccessor,
- GCBufferAllocator,
- GCFullyConnectedLayer,
- GCSoftmaxLayer>;
-FIXTURE_TEST_CASE(BlobMemoryManagerReconfigure2,
- GCBlobMemoryManagerReconfigure2Fixture,
- framework::DatasetMode::NIGHTLY)
-{
- // Validate output
- validate(GCAccessor(_target), _reference, tolerance_f32);
-}
-
-TEST_SUITE_END()
-TEST_SUITE_END()
-TEST_SUITE_END()
-} // namespace validation
-} // namespace test
-} // namespace arm_compute
diff --git a/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h b/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h
index 44edc91231..6ef30d3c21 100644
--- a/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h
+++ b/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h
@@ -23,7 +23,6 @@
*/
#include "arm_compute/core/TensorShape.h"
#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
#include "tests/AssetsLibrary.h"
#include "tests/Globals.h"
#include "tests/IAccessor.h"
diff --git a/utils/Utils.h b/utils/Utils.h
index 9c9026edc4..f8c84851b5 100644
--- a/utils/Utils.h
+++ b/utils/Utils.h
@@ -45,9 +45,6 @@
#include "arm_compute/runtime/CL/CLDistribution1D.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
-#endif /* ARM_COMPUTE_GC */
#include <cstdlib>
#include <cstring>
@@ -269,27 +266,6 @@ inline void unmap(CLDistribution1D &distribution)
}
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-/** Maps a tensor if needed
- *
- * @param[in] tensor Tensor to be mapped
- * @param[in] blocking Specified if map is blocking or not
- */
-inline void map(GCTensor &tensor, bool blocking)
-{
- tensor.map(blocking);
-}
-
-/** Unmaps a tensor if needed
- *
- * @param tensor Tensor to be unmapped
- */
-inline void unmap(GCTensor &tensor)
-{
- tensor.unmap();
-}
-#endif /* ARM_COMPUTE_GC */
-
/** Specialized class to generate random non-zero FP16 values.
* uniform_real_distribution<half> generates values that get rounded off to zero, causing
* differences between ACL and reference implementation