mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Migrate integer_ops suite to the new test registration framework (#2332)
Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/2181. Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "harness/compat.h"
|
||||
#include "testBase.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "procs.h"
|
||||
|
||||
static int verify_subsat_char( const cl_char *inA, const cl_char *inB, const cl_char *outptr, int n, const char *sizeName, int vecSize )
|
||||
{
|
||||
int i;
|
||||
@@ -184,7 +181,7 @@ static const char *vector_size_names[] = { "", "2", "3", "4", "8", "16" };
|
||||
|
||||
static const size_t kSizes[8] = { 1, 1, 2, 2, 4, 4, 8, 8 };
|
||||
|
||||
int test_integer_sub_sat(cl_device_id device, cl_context context, cl_command_queue queue, int n_elems)
|
||||
REGISTER_TEST(integer_sub_sat)
|
||||
{
|
||||
int *input_ptr[2], *output_ptr, *p;
|
||||
int err;
|
||||
@@ -194,7 +191,7 @@ int test_integer_sub_sat(cl_device_id device, cl_context context, cl_command_que
|
||||
MTdata d;
|
||||
int fail_count = 0;
|
||||
|
||||
size_t length = sizeof(int) * 4 * n_elems;
|
||||
size_t length = sizeof(int) * 4 * num_elements;
|
||||
|
||||
input_ptr[0] = (int*)malloc(length);
|
||||
input_ptr[1] = (int*)malloc(length);
|
||||
@@ -202,11 +199,9 @@ int test_integer_sub_sat(cl_device_id device, cl_context context, cl_command_que
|
||||
|
||||
d = init_genrand( gRandomSeed );
|
||||
p = input_ptr[0];
|
||||
for (i=0; i<4 * (cl_uint) n_elems; i++)
|
||||
p[i] = genrand_int32(d);
|
||||
for (i = 0; i < 4 * (cl_uint)num_elements; i++) p[i] = genrand_int32(d);
|
||||
p = input_ptr[1];
|
||||
for (i=0; i<4 * (cl_uint) n_elems; i++)
|
||||
p[i] = genrand_int32(d);
|
||||
for (i = 0; i < 4 * (cl_uint)num_elements; i++) p[i] = genrand_int32(d);
|
||||
free_mtdata(d); d = NULL;
|
||||
|
||||
for( type = 0; type < sizeof( test_str_names ) / sizeof( test_str_names[0] ); type++ )
|
||||
@@ -374,5 +369,3 @@ int test_integer_sub_sat(cl_device_id device, cl_context context, cl_command_que
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user