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

Function verify_subimage

test_conformance/profiling/copy.cpp:47–69  ·  view source on GitHub ↗

--- the verify functions

Source from the content-addressed store, hash-verified

45
46//--- the verify functions
47static int verify_subimage( unsigned char *src, unsigned char *dst, size_t srcx, size_t srcy,
48 size_t dstx, size_t dsty, size_t subw, size_t subh, size_t pitch, size_t element_pitch )
49{
50 size_t i, j, k;
51 size_t srcj, dstj;
52 size_t srcLoc, dstLoc;
53
54 for( j = 0; j < subh; j++ ){
55 srcj = ( j + srcy ) * pitch * element_pitch;
56 dstj = ( j + dsty ) * pitch * element_pitch;
57 for( i = 0; i < subw; i++ ){
58 srcLoc = srcj + ( i + srcx ) * element_pitch;
59 dstLoc = dstj + ( i + dstx ) * element_pitch;
60 for( k = 0; k < element_pitch; k++ ){ // test each channel
61 if( src[srcLoc+k] != dst[dstLoc+k] ){
62 return -1;
63 }
64 }
65 }
66 }
67
68 return 0;
69}
70
71
72static int verify_copy_array( int *inptr, int *outptr, int n )

Callers 2

copy_image_sizeFunction · 0.85
REGISTER_TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected