mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
[NFC] Migrate profiling suite to new registration framework (#2187)
Contributes to #2181 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -381,7 +381,7 @@ static int copy_partial_size( cl_device_id device, cl_context context, cl_comman
|
||||
} // end copy_partial_size()
|
||||
|
||||
|
||||
int test_copy_array( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(copy_array)
|
||||
{
|
||||
int i, err = 0;
|
||||
int size;
|
||||
@@ -405,7 +405,7 @@ int test_copy_array( cl_device_id device, cl_context context, cl_command_queue q
|
||||
} // end copy_array()
|
||||
|
||||
|
||||
int test_copy_partial_array( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(copy_partial_array)
|
||||
{
|
||||
int i, err = 0;
|
||||
int size;
|
||||
@@ -681,7 +681,7 @@ static int copy_image_size( cl_device_id device, cl_context context,
|
||||
} // end copy_image_size()
|
||||
|
||||
|
||||
int test_copy_image( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(copy_image)
|
||||
{
|
||||
int err = 0;
|
||||
int i;
|
||||
@@ -754,7 +754,7 @@ int test_copy_image( cl_device_id device, cl_context context, cl_command_queue q
|
||||
} // end copy_image()
|
||||
|
||||
|
||||
int test_copy_array_to_image( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(copy_array_to_image)
|
||||
{
|
||||
cl_mem memobjs[3];
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_UNORM_INT8 };
|
||||
|
||||
@@ -360,7 +360,7 @@ static int basicFilter( int w, int h, int nChannels, uchar *inptr, uchar *outptr
|
||||
} // end of basicFilter()
|
||||
|
||||
|
||||
int test_execute( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(execute)
|
||||
{
|
||||
uchar *inptr;
|
||||
uchar *outptr[2];
|
||||
|
||||
@@ -264,7 +264,7 @@ static int run_kernel( cl_device_id device, cl_context context, cl_command_queue
|
||||
// use 3d to exercise the multipass events. In the future 3d may not be multpass, in which
|
||||
// case we will need to ensure that we use gdims large enough to force multipass.
|
||||
|
||||
int execute_multipass( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(execute_multipass)
|
||||
{
|
||||
cl_uchar *inptr;
|
||||
cl_uchar *outptr;
|
||||
|
||||
@@ -18,50 +18,12 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cinttypes>
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
// FIXME: To use certain functions in harness/imageHelpers.h
|
||||
// (for example, generate_random_image_data()), the tests are required to declare
|
||||
// the following variables (<rdar://problem/11111245>):
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST(read_array_int),
|
||||
ADD_TEST(read_array_uint),
|
||||
ADD_TEST(read_array_long),
|
||||
ADD_TEST(read_array_ulong),
|
||||
ADD_TEST(read_array_short),
|
||||
ADD_TEST(read_array_ushort),
|
||||
ADD_TEST(read_array_float),
|
||||
ADD_TEST(read_array_char),
|
||||
ADD_TEST(read_array_uchar),
|
||||
ADD_TEST(read_array_struct),
|
||||
ADD_TEST(write_array_int),
|
||||
ADD_TEST(write_array_uint),
|
||||
ADD_TEST(write_array_long),
|
||||
ADD_TEST(write_array_ulong),
|
||||
ADD_TEST(write_array_short),
|
||||
ADD_TEST(write_array_ushort),
|
||||
ADD_TEST(write_array_float),
|
||||
ADD_TEST(write_array_char),
|
||||
ADD_TEST(write_array_uchar),
|
||||
ADD_TEST(write_array_struct),
|
||||
ADD_TEST(read_image_float),
|
||||
ADD_TEST(read_image_char),
|
||||
ADD_TEST(read_image_uchar),
|
||||
ADD_TEST(write_image_float),
|
||||
ADD_TEST(write_image_char),
|
||||
ADD_TEST(write_image_uchar),
|
||||
ADD_TEST(copy_array),
|
||||
ADD_TEST(copy_partial_array),
|
||||
ADD_TEST(copy_image),
|
||||
ADD_TEST(copy_array_to_image),
|
||||
ADD_TEST(execute),
|
||||
ADD_TEST_VERSION(profiling_timebase, Version(2, 1)),
|
||||
};
|
||||
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
|
||||
// FIXME: use timer resolution rather than hardcoding 1µs per tick.
|
||||
|
||||
#define QUEUE_SECONDS_LIMIT 30
|
||||
@@ -133,7 +95,8 @@ int check_times(cl_ulong queueStart, cl_ulong commandSubmit, cl_ulong commandSta
|
||||
|
||||
int main( int argc, const char *argv[] )
|
||||
{
|
||||
return runTestHarness(argc, argv, test_num, test_list, false,
|
||||
return runTestHarness(argc, argv, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), false,
|
||||
CL_QUEUE_PROFILING_ENABLE);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,47 +21,8 @@
|
||||
#include "harness/imageHelpers.h"
|
||||
#include "harness/mt19937.h"
|
||||
|
||||
|
||||
extern int check_times(cl_ulong queueStart, cl_ulong submitStart, cl_ulong commandStart, cl_ulong commandEnd, cl_device_id device);
|
||||
|
||||
extern int test_read_array_int( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_uint( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_long( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_ulong( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_short( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_ushort( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_float( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_half( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_char( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_array_struct( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_int( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_uint( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_long( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_ulong( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_short( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_ushort( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_float( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_half( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_char( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_array_struct( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_image_float( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_image_char( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_read_image_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_image_float( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_image_char( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_write_image_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_copy_array( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_copy_partial_array( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_copy_image( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_copy_array_to_image( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_execute( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_parallel_kernels( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements );
|
||||
extern int test_profiling_timebase(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
|
||||
|
||||
#endif // #ifndef __PROCS_H__
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
const char *kernelCode = "__kernel void kernel_empty(){}";
|
||||
|
||||
int test_profiling_timebase(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(profiling_timebase)
|
||||
{
|
||||
Version version = get_device_cl_version(device);
|
||||
cl_platform_id platform = getPlatformFromDevice(device);
|
||||
|
||||
@@ -758,7 +758,7 @@ int test_stream_read( cl_device_id device, cl_context context, cl_command_queue
|
||||
} // end test_stream_read()
|
||||
|
||||
|
||||
int test_read_array_int( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_int)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_int;
|
||||
@@ -768,7 +768,7 @@ int test_read_array_int( cl_device_id device, cl_context context, cl_command_que
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_uint( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_uint)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_uint;
|
||||
@@ -778,7 +778,7 @@ int test_read_array_uint( cl_device_id device, cl_context context, cl_command_qu
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_long( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_long)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_long;
|
||||
@@ -794,7 +794,7 @@ int test_read_array_long( cl_device_id device, cl_context context, cl_command_qu
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_ulong( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_ulong)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_ulong;
|
||||
@@ -810,7 +810,7 @@ int test_read_array_ulong( cl_device_id device, cl_context context, cl_command_q
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_short( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_short)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_short;
|
||||
@@ -820,7 +820,7 @@ int test_read_array_short( cl_device_id device, cl_context context, cl_command_q
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_ushort( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_ushort)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_ushort;
|
||||
@@ -830,7 +830,7 @@ int test_read_array_ushort( cl_device_id device, cl_context context, cl_command_
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_float( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_float)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_float;
|
||||
@@ -840,7 +840,7 @@ int test_read_array_float( cl_device_id device, cl_context context, cl_command_q
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_half( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_half)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_half;
|
||||
@@ -850,7 +850,7 @@ int test_read_array_half( cl_device_id device, cl_context context, cl_command_qu
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_char( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_char)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_char;
|
||||
@@ -860,7 +860,7 @@ int test_read_array_char( cl_device_id device, cl_context context, cl_command_qu
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_uchar)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_uchar;
|
||||
@@ -870,7 +870,7 @@ int test_read_array_uchar( cl_device_id device, cl_context context, cl_command_q
|
||||
}
|
||||
|
||||
|
||||
int test_read_array_struct( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(read_array_struct)
|
||||
{
|
||||
int (*foo)(void *,int);
|
||||
foo = verify_read_struct;
|
||||
|
||||
@@ -339,33 +339,33 @@ int read_image( cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
} // end read_image()
|
||||
|
||||
|
||||
int test_read_image_float( cl_device_id device, cl_context context, cl_command_queue queue, int numElements )
|
||||
REGISTER_TEST(read_image_float)
|
||||
{
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_UNORM_INT8 };
|
||||
PASSIVE_REQUIRE_IMAGE_SUPPORT( device )
|
||||
// 0 to 255 for unsigned image data
|
||||
return read_image( device, context, queue, numElements, readKernelCode[0], readKernelName[0], image_format_desc );
|
||||
|
||||
return read_image(device, context, queue, num_elements, readKernelCode[0],
|
||||
readKernelName[0], image_format_desc);
|
||||
}
|
||||
|
||||
|
||||
int test_read_image_char( cl_device_id device, cl_context context, cl_command_queue queue, int numElements )
|
||||
REGISTER_TEST(read_image_char)
|
||||
{
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_SIGNED_INT8 };
|
||||
PASSIVE_REQUIRE_IMAGE_SUPPORT( device )
|
||||
// -128 to 127 for signed iamge data
|
||||
return read_image( device, context, queue, numElements, readKernelCode[1], readKernelName[1], image_format_desc );
|
||||
|
||||
return read_image(device, context, queue, num_elements, readKernelCode[1],
|
||||
readKernelName[1], image_format_desc);
|
||||
}
|
||||
|
||||
|
||||
int test_read_image_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int numElements )
|
||||
REGISTER_TEST(read_image_uchar)
|
||||
{
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_UNSIGNED_INT8 };
|
||||
PASSIVE_REQUIRE_IMAGE_SUPPORT( device )
|
||||
// 0 to 255 for unsigned image data
|
||||
return read_image( device, context, queue, numElements, readKernelCode[2], readKernelName[2], image_format_desc );
|
||||
|
||||
return read_image(device, context, queue, num_elements, readKernelCode[2],
|
||||
readKernelName[2], image_format_desc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -821,7 +821,7 @@ int test_stream_write( cl_device_id device, cl_context context, cl_command_queue
|
||||
} // end test_stream_write()
|
||||
|
||||
|
||||
int test_write_array_int( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_int)
|
||||
{
|
||||
int *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -857,7 +857,7 @@ int test_write_array_int( cl_device_id device, cl_context context, cl_command_qu
|
||||
} // end write_int_array()
|
||||
|
||||
|
||||
int test_write_array_uint( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_uint)
|
||||
{
|
||||
cl_uint *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -892,7 +892,7 @@ int test_write_array_uint( cl_device_id device, cl_context context, cl_command_q
|
||||
} // end write_uint_array()
|
||||
|
||||
|
||||
int test_write_array_short( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_short)
|
||||
{
|
||||
short *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -927,7 +927,7 @@ int test_write_array_short( cl_device_id device, cl_context context, cl_command_
|
||||
} // end write_short_array()
|
||||
|
||||
|
||||
int test_write_array_ushort( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_ushort)
|
||||
{
|
||||
cl_ushort *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -962,7 +962,7 @@ int test_write_array_ushort( cl_device_id device, cl_context context, cl_command
|
||||
} // end write_ushort_array()
|
||||
|
||||
|
||||
int test_write_array_char( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_char)
|
||||
{
|
||||
char *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -997,7 +997,7 @@ int test_write_array_char( cl_device_id device, cl_context context, cl_command_q
|
||||
} // end write_char_array()
|
||||
|
||||
|
||||
int test_write_array_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_uchar)
|
||||
{
|
||||
uchar *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -1032,7 +1032,7 @@ int test_write_array_uchar( cl_device_id device, cl_context context, cl_command_
|
||||
} // end write_uchar_array()
|
||||
|
||||
|
||||
int test_write_array_float( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_float)
|
||||
{
|
||||
float *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -1067,7 +1067,7 @@ int test_write_array_float( cl_device_id device, cl_context context, cl_command_
|
||||
} // end write_float_array()
|
||||
|
||||
|
||||
int test_write_array_half( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_half)
|
||||
{
|
||||
float *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -1102,7 +1102,7 @@ int test_write_array_half( cl_device_id device, cl_context context, cl_command_q
|
||||
} // end write_half_array()
|
||||
|
||||
|
||||
int test_write_array_long( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_long)
|
||||
{
|
||||
cl_long *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -1143,7 +1143,7 @@ int test_write_array_long( cl_device_id device, cl_context context, cl_command_q
|
||||
} // end write_long_array()
|
||||
|
||||
|
||||
int test_write_array_ulong( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_ulong)
|
||||
{
|
||||
cl_ulong *inptr[5];
|
||||
size_t ptrSizes[5];
|
||||
@@ -1184,7 +1184,7 @@ int test_write_array_ulong( cl_device_id device, cl_context context, cl_command_
|
||||
} // end write_ulong_array()
|
||||
|
||||
|
||||
int test_write_array_struct( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements )
|
||||
REGISTER_TEST(write_array_struct)
|
||||
{
|
||||
TestStruct *inptr[1];
|
||||
size_t ptrSizes[1];
|
||||
|
||||
@@ -636,33 +636,33 @@ int write_image( cl_device_id device, cl_context context, cl_command_queue queue
|
||||
} // end write_image()
|
||||
|
||||
|
||||
int test_write_image_float( cl_device_id device, cl_context context, cl_command_queue queue, int numElements )
|
||||
REGISTER_TEST(write_image_float)
|
||||
{
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_UNORM_INT8 };
|
||||
PASSIVE_REQUIRE_IMAGE_SUPPORT( device )
|
||||
// 0 to 255 for unsigned image data
|
||||
return write_image( device, context, queue, numElements, readKernelCode[0], readKernelName[0], image_format_desc, 1 );
|
||||
|
||||
return write_image(device, context, queue, num_elements, readKernelCode[0],
|
||||
readKernelName[0], image_format_desc, 1);
|
||||
}
|
||||
|
||||
|
||||
int test_write_image_char( cl_device_id device, cl_context context, cl_command_queue queue, int numElements )
|
||||
REGISTER_TEST(write_image_char)
|
||||
{
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_SIGNED_INT8 };
|
||||
PASSIVE_REQUIRE_IMAGE_SUPPORT( device )
|
||||
// -128 to 127 for signed iamge data
|
||||
return write_image( device, context, queue, numElements, readKernelCode[1], readKernelName[1], image_format_desc, 0 );
|
||||
|
||||
return write_image(device, context, queue, num_elements, readKernelCode[1],
|
||||
readKernelName[1], image_format_desc, 0);
|
||||
}
|
||||
|
||||
|
||||
int test_write_image_uchar( cl_device_id device, cl_context context, cl_command_queue queue, int numElements )
|
||||
REGISTER_TEST(write_image_uchar)
|
||||
{
|
||||
cl_image_format image_format_desc = { CL_RGBA, CL_UNSIGNED_INT8 };
|
||||
PASSIVE_REQUIRE_IMAGE_SUPPORT( device )
|
||||
// 0 to 255 for unsigned image data
|
||||
return write_image( device, context, queue, numElements, readKernelCode[2], readKernelName[2], image_format_desc, 0 );
|
||||
|
||||
return write_image(device, context, queue, num_elements, readKernelCode[2],
|
||||
readKernelName[2], image_format_desc, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user