MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / REGISTER_TEST

Function REGISTER_TEST

test_conformance/profiling/writeArray.cpp:770–803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768
769
770REGISTER_TEST(write_array_int)
771{
772 int *inptr[5];
773 size_t ptrSizes[5];
774 int i, j, err;
775 int (*foo)(void *,void *,int);
776 MTdata d = init_genrand( gRandomSeed );
777 foo = verify_write_int;
778
779 ptrSizes[0] = sizeof(cl_int);
780 ptrSizes[1] = ptrSizes[0] << 1;
781 ptrSizes[2] = ptrSizes[1] << 1;
782 ptrSizes[3] = ptrSizes[2] << 1;
783 ptrSizes[4] = ptrSizes[3] << 1;
784
785 for( i = 0; i < 5; i++ ){
786 inptr[i] = (int *)malloc(ptrSizes[i] * num_elements);
787
788 for( j = 0; (unsigned int)j < ptrSizes[i] * num_elements / ptrSizes[0]; j++ )
789 inptr[i][j] = genrand_int32(d);
790 }
791
792 err = test_stream_write( device, context, queue, num_elements, sizeof( cl_int ), "int", 5, (void**)inptr,
793 stream_write_int_kernel_code, int_kernel_name, foo, d );
794
795 for( i = 0; i < 5; i++ ){
796 free( (void *)inptr[i] );
797 }
798
799 free_mtdata(d);
800
801 return err;
802
803} // end write_int_array()
804
805
806REGISTER_TEST(write_array_uint)

Callers

nothing calls this directly

Calls 5

init_genrandFunction · 0.85
genrand_int32Function · 0.85
test_stream_writeFunction · 0.85
free_mtdataFunction · 0.85
get_random_floatFunction · 0.85

Tested by

no test coverage detected