Remove code under USE_LOCAL_WORK_GROUP (#1063)

Local work groups are not relevant to these tests.

Fixes #1019

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
diff --git a/test_conformance/buffers/test_buffer_fill.cpp b/test_conformance/buffers/test_buffer_fill.cpp
index 142b7da..5c1dd48 100644
--- a/test_conformance/buffers/test_buffer_fill.cpp
+++ b/test_conformance/buffers/test_buffer_fill.cpp
@@ -24,8 +24,6 @@
 #include "procs.h"
 #include "harness/errorHelpers.h"
 
-#define USE_LOCAL_WORK_GROUP    1
-
 #define TEST_PRIME_CHAR        0x77
 #define TEST_PRIME_INT        ((1<<16)+1)
 #define TEST_PRIME_UINT        ((1U<<16)+1U)
@@ -571,9 +569,6 @@
     cl_event    event[2];
     size_t      ptrSizes[5];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     int         err;
     int         i, ii;
     int         src_flag_id;
@@ -645,11 +640,6 @@
                 return -1;
             }
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-            test_error( err, "Unable to get work group size to use" );
-#endif
-
             err = clSetKernelArg( kernel[i], 0, sizeof( cl_mem ), (void *)&buffers[ii] );
             err |= clSetKernelArg( kernel[i], 1, sizeof( cl_mem ), (void *)&buffers[ii+1] );
             if ( err != CL_SUCCESS ){
@@ -674,11 +664,7 @@
             }
             clReleaseEvent(event[0]);
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
             err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
             if (err != CL_SUCCESS){
                 print_error( err, "clEnqueueNDRangeKernel failed" );
                 return -1;
@@ -730,9 +716,6 @@
     cl_event    event[2];
     size_t      ptrSize = sizeof( TestStruct );
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     int         n, err;
     size_t      j, offset_elements, fill_elements;
     int         src_flag_id;
@@ -851,11 +834,6 @@
                 return -1;
             }
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = get_max_common_work_group_size( context, kernel, global_work_size[0], &local_work_size[0] );
-            test_error( err, "Unable to get work group size to use" );
-#endif
-
             err = clSetKernelArg( kernel, 0, sizeof( cl_mem ), (void *)&buffers[0] );
             err |= clSetKernelArg( kernel, 1, sizeof( cl_mem ), (void *)&buffers[1] );
             if ( err != CL_SUCCESS ){
@@ -892,11 +870,7 @@
             }
             clReleaseEvent( event[0] );
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = clEnqueueNDRangeKernel( queue, kernel, 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
             err = clEnqueueNDRangeKernel( queue, kernel, 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
             if ( err != CL_SUCCESS ){
                 print_error( err, " clEnqueueNDRangeKernel failed" );
                 clReleaseKernel( kernel );
diff --git a/test_conformance/buffers/test_buffer_mem.cpp b/test_conformance/buffers/test_buffer_mem.cpp
index 2753eab..52eb723 100644
--- a/test_conformance/buffers/test_buffer_mem.cpp
+++ b/test_conformance/buffers/test_buffer_mem.cpp
@@ -27,8 +27,6 @@
 typedef unsigned char uchar;
 #endif
 
-#define USE_LOCAL_WORK_GROUP 1
-
 
 const char *mem_read_write_kernel_code =
 "__kernel void test_mem_read_write(__global int *dst)\n"
@@ -77,9 +75,6 @@
     clProgramWrapper program;
     clKernelWrapper kernel;
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i;
 
@@ -158,12 +153,6 @@
         return -1;
     }
 
-#ifdef USE_LOCAL_WORK_GROUP
-    err = get_max_common_work_group_size(context, kernel, global_work_size[0],
-                                         &local_work_size[0]);
-    test_error( err, "Unable to get work group size to use" );
-#endif
-
     err = clSetKernelArg(kernel, 0, sizeof(cl_mem), (void *)&buffers[0]);
     if (test_read_only && (err == CL_SUCCESS))
     {
@@ -176,13 +165,8 @@
         return -1;
     }
 
-#ifdef USE_LOCAL_WORK_GROUP
-    err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, global_work_size,
-                                 local_work_size, 0, NULL, NULL);
-#else
     err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, global_work_size, NULL,
                                  0, NULL, NULL);
-#endif
     if (err != CL_SUCCESS){
         log_error("clEnqueueNDRangeKernel failed\n");
         align_free( (void *)outptr );
diff --git a/test_conformance/buffers/test_buffer_read.cpp b/test_conformance/buffers/test_buffer_read.cpp
index fa981b7..a3d0254 100644
--- a/test_conformance/buffers/test_buffer_read.cpp
+++ b/test_conformance/buffers/test_buffer_read.cpp
@@ -627,9 +627,6 @@
     cl_program  program[5];
     cl_kernel   kernel[5];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i;
     size_t      ptrSizes[5];
@@ -701,14 +698,7 @@
                 return -1;
             }
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-            test_error( err, "Unable to get work group size to use" );
-
-            err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
             err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
             if ( err != CL_SUCCESS ){
                 print_error( err, "clEnqueueNDRangeKernel failed" );
                 clReleaseMemObject( buffers[i] );
@@ -781,9 +771,6 @@
     void        *outptr[5];
     void        *inptr[5];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i;
     size_t      lastIndex;
@@ -857,14 +844,7 @@
                 return -1;
             }
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-            test_error( err, "Unable to get work group size to use" );
-
-            err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
             err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
             if ( err != CL_SUCCESS ){
                 print_error( err, "clEnqueueNDRangeKernel failed" );
                 clReleaseMemObject( buffers[i] );
@@ -936,9 +916,6 @@
     cl_event    event;
     void        *outptr[5], *inptr[5];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i;
     size_t      lastIndex;
@@ -1011,14 +988,7 @@
                 return -1;
             }
 
-#ifdef USE_LOCAL_WORK_GROUP
-            err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-            test_error( err, "Unable to get work group size to use" );
-
-            err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
             err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
             if ( err != CL_SUCCESS ){
                 print_error( err, "clEnqueueNDRangeKernel failed" );
                 clReleaseMemObject( buffers[i] );
@@ -1157,9 +1127,6 @@
     cl_program  program[1];
     cl_kernel   kernel[1];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     size_t      objSize = sizeof(TestStruct);
 
@@ -1197,14 +1164,7 @@
         return -1;
     }
 
-#ifdef USE_LOCAL_WORK_GROUP
-    err = get_max_common_work_group_size( context, kernel[0], global_work_size[0], &local_work_size[0] );
-    test_error( err, "Unable to get work group size to use" );
-
-    err = clEnqueueNDRangeKernel( queue, kernel[0], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
     err = clEnqueueNDRangeKernel( queue, kernel[0], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
     if ( err != CL_SUCCESS ){
         print_error( err, "clEnqueueNDRangeKernel failed" );
         clReleaseMemObject( buffers[0] );
@@ -1250,9 +1210,6 @@
     cl_program  program[3];
     cl_kernel   kernel[3];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i, j;
     size_t      ptrSizes[3];    // sizeof(int), sizeof(int2), sizeof(int4)
@@ -1334,14 +1291,7 @@
             return -1;
         }
 
-#ifdef USE_LOCAL_WORK_GROUP
-        err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-        test_error( err, "Unable to get work group size to use" );
-
-        err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
         err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
         if ( err != CL_SUCCESS ){
             print_error( err, "clEnqueueNDRangeKernel failed" );
             clReleaseMemObject( buffers[i] );
diff --git a/test_conformance/buffers/test_buffer_write.cpp b/test_conformance/buffers/test_buffer_write.cpp
index c9420a1..83b1779 100644
--- a/test_conformance/buffers/test_buffer_write.cpp
+++ b/test_conformance/buffers/test_buffer_write.cpp
@@ -24,7 +24,6 @@
 #include "procs.h"
 #include "harness/errorHelpers.h"
 
-#define USE_LOCAL_WORK_GROUP    1
 
 #ifndef uchar
 typedef unsigned char uchar;
@@ -631,9 +630,6 @@
     cl_kernel   kernel[5];
     size_t      ptrSizes[5];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i, ii;
     int         src_flag_id, dst_flag_id;
@@ -729,11 +725,6 @@
                     return -1;
                 }
 
-#ifdef USE_LOCAL_WORK_GROUP
-                err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-                test_error( err, "Unable to get work group size to use" );
-#endif
-
                 err = clSetKernelArg( kernel[i], 0, sizeof( cl_mem ), (void *)&buffers[ii] );
                 err |= clSetKernelArg( kernel[i], 1, sizeof( cl_mem ), (void *)&buffers[ii+1] );
                 if ( err != CL_SUCCESS ){
@@ -746,11 +737,7 @@
                     return -1;
                 }
 
-#ifdef USE_LOCAL_WORK_GROUP
-                err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
                 err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
                 if ( err != CL_SUCCESS ){
                     print_error( err, " clEnqueueNDRangeKernel failed" );
                     clReleaseMemObject( buffers[ii] );
@@ -811,9 +798,6 @@
     size_t      ptrSizes[5];
     size_t      size = sizeof( TestStruct );
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i, ii;
     cl_uint     j;
@@ -916,11 +900,6 @@
                     return -1;
                 }
 
-#ifdef USE_LOCAL_WORK_GROUP
-                err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-                test_error( err, "Unable to get work group size to use" );
-#endif
-
                 err = clSetKernelArg( kernel[i], 0, sizeof( cl_mem ), (void *)&buffers[ii] );
                 err |= clSetKernelArg( kernel[i], 1, sizeof( cl_mem ), (void *)&buffers[ii+1] );
                 if ( err != CL_SUCCESS ){
@@ -934,11 +913,7 @@
                     return -1;
                 }
 
-#ifdef USE_LOCAL_WORK_GROUP
-                err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
                 err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
                 if ( err != CL_SUCCESS ){
                     print_error( err, " clEnqueueNDRangeKernel failed" );
                     clReleaseMemObject( buffers[ii] );
@@ -997,9 +972,6 @@
     cl_event    event[2];
     size_t      ptrSizes[5];
     size_t      global_work_size[3];
-#ifdef USE_LOCAL_WORK_GROUP
-    size_t      local_work_size[3];
-#endif
     cl_int      err;
     int         i, ii;
     int         src_flag_id, dst_flag_id;
@@ -1056,11 +1028,6 @@
                     return -1;
                 }
 
-#ifdef USE_LOCAL_WORK_GROUP
-                err = get_max_common_work_group_size( context, kernel[i], global_work_size[0], &local_work_size[0] );
-                test_error( err, "Unable to get work group size to use" );
-#endif
-
                 err = clSetKernelArg( kernel[i], 0, sizeof( cl_mem ), (void *)&buffers[ii] );
                 err |= clSetKernelArg( kernel[i], 1, sizeof( cl_mem ), (void *)&buffers[ii+1] );
                 if ( err != CL_SUCCESS ){
@@ -1084,11 +1051,8 @@
                     return -1;
                 }
 
-#ifdef USE_LOCAL_WORK_GROUP
-                err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, local_work_size, 0, NULL, NULL );
-#else
                 err = clEnqueueNDRangeKernel( queue, kernel[i], 1, NULL, global_work_size, NULL, 0, NULL, NULL );
-#endif
+
                 if (err != CL_SUCCESS){
                     print_error( err, "clEnqueueNDRangeKernel failed" );
                     return -1;