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

Function verify_absdiff_int

test_conformance/integer_ops/test_absdiff.cpp:115–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static int verify_absdiff_int( const void *p, const void *q, const void *r, size_t n, const char *sizeName, size_t vecSize )
116{
117 const cl_int *inA = (const cl_int *)p;
118 const cl_int *inB = (const cl_int *)q;
119 const cl_uint *outptr = (const cl_uint *)r;
120 size_t i;
121 for( i = 0; i < n; i++ )
122 {
123 cl_uint r = abs_diff(inA[i], inB[i]);
124 if( r != outptr[i] )
125 {
126 log_info("%zu) Failure for absdiff( (int%s) 0x%8.8x, (int%s) "
127 "0x%8.8x) = *0x%8.8x vs 0x%8.8x\n",
128 i, sizeName, inA[i], sizeName, inB[i], r, outptr[i]);
129 return -1;
130 }
131 }
132 return 0;
133}
134
135static int verify_absdiff_uint( const void *p, const void *q, const void *r, size_t n, const char *sizeName, size_t vecSize )
136{

Callers

nothing calls this directly

Calls 1

abs_diffFunction · 0.85

Tested by

no test coverage detected