diff --git a/test_conformance/buffers/test_sub_buffers.cpp b/test_conformance/buffers/test_sub_buffers.cpp index bf7802607..7b0a3ccd0 100644 --- a/test_conformance/buffers/test_sub_buffers.cpp +++ b/test_conformance/buffers/test_sub_buffers.cpp @@ -344,16 +344,26 @@ int test_sub_buffers_read_write_core( cl_context context, cl_command_queue queue size_t sbThatFailed = find_subbuffer_by_index( subBuffers, numSubBuffers, i + j ); if ( sbThatFailed == numSubBuffers ) { - log_error( "ERROR: Validation failure outside of a sub-buffer! (Shouldn't be possible, but it happened at index %zu out of %zu...)\n", i + j, mainSize ); + log_error("ERROR: Validation failure outside of a " + "sub-buffer! (Shouldn't be possible, but it " + "happened at index %zu out of %zu...)\n", + i + j, mainSize); // Since this is a nonsensical, don't bother continuing to check // (we will, however, print our map of sub-buffers for comparison) for ( size_t k = 0; k < numSubBuffers; k++ ) { - log_error( "\tBuffer %zu: %zu to %zu (length %zu)\n", k, subBuffers[ k ].mOrigin, subBuffers[ k ].mOrigin + subBuffers[ k ].mSize, subBuffers[ k ].mSize ); + log_error("\tBuffer %zu: %zu to %zu (length %zu)\n", + k, subBuffers[k].mOrigin, + subBuffers[k].mOrigin + + subBuffers[k].mSize, + subBuffers[k].mSize); } return -1; } - log_error( "ERROR: Validation failure on sub-buffer %zu (start: %zu, length: %zu)\n", sbThatFailed, subBuffers[ sbThatFailed ].mOrigin, subBuffers[ sbThatFailed ].mSize ); + log_error("ERROR: Validation failure on sub-buffer %zu " + "(start: %zu, length: %zu)\n", + sbThatFailed, subBuffers[sbThatFailed].mOrigin, + subBuffers[sbThatFailed].mSize); size_t newPos = subBuffers[ sbThatFailed ].mOrigin + subBuffers[ sbThatFailed ].mSize - 1; i = newPos & ~65535; j = newPos - i; @@ -589,8 +599,10 @@ int test_sub_buffers_overlapping( cl_device_id deviceID, cl_context context, cl_ } } - log_info( "\tTesting %d sub-buffers with %lld overlapping Kbytes (%d%%; as many as %zu buffers overlapping at once)\n", - 16, ( delta / 1024LL ), (int)( delta * 100LL / (long long)mainSize ), maxOverlap ); + log_info("\tTesting %d sub-buffers with %lld overlapping Kbytes (%d%%; as " + "many as %zu buffers overlapping at once)\n", + 16, (delta / 1024LL), (int)(delta * 100LL / (long long)mainSize), + maxOverlap); // Write some random contents to the main buffer cl_char * contents = new cl_char[ mainSize ]; @@ -615,7 +627,7 @@ int test_sub_buffers_overlapping( cl_device_id deviceID, cl_context context, cl_ if ( memcmp( tempBuffer, contents + subBuffers[ i ].mOrigin, subBuffers[ i ].mSize ) != 0 ) { - log_error( "ERROR: Validation for sub-buffer %zu failed!\n", i ); + log_error("ERROR: Validation for sub-buffer %zu failed!\n", i); numErrors++; } } diff --git a/test_conformance/contractions/contractions.cpp b/test_conformance/contractions/contractions.cpp index 1848ba9af..880a23ab5 100644 --- a/test_conformance/contractions/contractions.cpp +++ b/test_conformance/contractions/contractions.cpp @@ -976,7 +976,7 @@ static int RunTest( int testNumber ) for( i = 0; i < sizeof(args ) / sizeof( args[0]); i++ ) if( (error = clSetKernelArg(k, i, sizeof( cl_mem ), args + i) )) { - vlog_error( "Error %d setting kernel arg # %zu\n", error, i ); + vlog_error("Error %d setting kernel arg # %zu\n", error, i); return error; } @@ -1021,24 +1021,72 @@ static int RunTest( int testNumber ) switch( testNumber ) { // Zeros for these should be positive - case 0: vlog_error( "%zu) Error for %s %s: %a * %a + %a = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; - case 1: vlog_error( "%zu) Error for %s %s: %a * %a - %a = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; - case 2: vlog_error( "%zu) Error for %s %s: %a + %a * %a = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; - case 3: vlog_error( "%zu) Error for %s %s: %a - %a * %a = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; + case 0: + vlog_error("%zu) Error for %s %s: %a * %a + %a = *%a " + "vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; + case 1: + vlog_error("%zu) Error for %s %s: %a * %a - %a = *%a " + "vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; + case 2: + vlog_error("%zu) Error for %s %s: %a + %a * %a = *%a " + "vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; + case 3: + vlog_error("%zu) Error for %s %s: %a - %a * %a = *%a " + "vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; // Zeros for these shouzu be negative - case 4: vlog_error( "%zu) Error for %s %s: -(%a * %a + %a) = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; - case 5: vlog_error( "%zu) Error for %s %s: -(%a * %a - %a) = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; - case 6: vlog_error( "%zu) Error for %s %s: -(%a + %a * %a) = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; - case 7: vlog_error( "%zu) Error for %s %s: -(%a - %a * %a) = *%a vs. %a\n", i, sizeNames[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); clReleaseKernel(k); return -1; + case 4: + vlog_error("%zu) Error for %s %s: -(%a * %a + %a) = " + "*%a vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; + case 5: + vlog_error("%zu) Error for %s %s: -(%a * %a - %a) = " + "*%a vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; + case 6: + vlog_error("%zu) Error for %s %s: -(%a + %a * %a) = " + "*%a vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; + case 7: + vlog_error("%zu) Error for %s %s: -(%a - %a * %a) = " + "*%a vs. %a\n", + i, sizeNames[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + clReleaseKernel(k); + return -1; default: vlog_error( "error: Unknown test number!\n" ); clReleaseKernel(k); @@ -1097,7 +1145,7 @@ static int RunTest_Double( int testNumber ) for( i = 0; i < sizeof(args ) / sizeof( args[0]); i++ ) if( (error = clSetKernelArg(k, i, sizeof( cl_mem ), args + i) )) { - vlog_error( "Error %d setting kernel arg # %zu\n", error, i ); + vlog_error("Error %d setting kernel arg # %zu\n", error, i); return error; } @@ -1138,24 +1186,64 @@ static int RunTest_Double( int testNumber ) switch( testNumber ) { // Zeros for these should be positive - case 0: vlog_error( "%zu) Error for %s %s: %a * %a + %a = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); return -1; - case 1: vlog_error( "%zu) Error for %s %s: %a * %a - %a = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); return -1; - case 2: vlog_error( "%zu) Error for %s %s: %a + %a * %a = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); return -1; - case 3: vlog_error( "%zu) Error for %s %s: %a - %a * %a = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); return -1; + case 0: + vlog_error("%zu) Error for %s %s: %a * %a + %a = *%a " + "vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + return -1; + case 1: + vlog_error("%zu) Error for %s %s: %a * %a - %a = *%a " + "vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + return -1; + case 2: + vlog_error("%zu) Error for %s %s: %a + %a * %a = *%a " + "vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + return -1; + case 3: + vlog_error("%zu) Error for %s %s: %a - %a * %a = *%a " + "vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + return -1; // Zeros for these shouzu be negative - case 4: vlog_error( "%zu) Error for %s %s: -(%a * %a + %a) = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); return -1; - case 5: vlog_error( "%zu) Error for %s %s: -(%a * %a - %a) = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - a[i], b[i], c[i], correct[testNumber][i], test[i] ); return -1; - case 6: vlog_error( "%zu) Error for %s %s: -(%a + %a * %a) = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); return -1; - case 7: vlog_error( "%zu) Error for %s %s: -(%a - %a * %a) = *%a vs. %a\n", i, sizeNames_double[ vectorSize], kernelName[ testNumber ], - c[i], a[i], b[i], correct[testNumber][i], test[i] ); return -1; + case 4: + vlog_error("%zu) Error for %s %s: -(%a * %a + %a) = " + "*%a vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + return -1; + case 5: + vlog_error("%zu) Error for %s %s: -(%a * %a - %a) = " + "*%a vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], a[i], b[i], c[i], + correct[testNumber][i], test[i]); + return -1; + case 6: + vlog_error("%zu) Error for %s %s: -(%a + %a * %a) = " + "*%a vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + return -1; + case 7: + vlog_error("%zu) Error for %s %s: -(%a - %a * %a) = " + "*%a vs. %a\n", + i, sizeNames_double[vectorSize], + kernelName[testNumber], c[i], a[i], b[i], + correct[testNumber][i], test[i]); + return -1; default: vlog_error( "error: Unknown test number!\n" ); return -2; diff --git a/test_conformance/device_partition/test_device_partition.cpp b/test_conformance/device_partition/test_device_partition.cpp index 3e3c0dac1..d47396222 100644 --- a/test_conformance/device_partition/test_device_partition.cpp +++ b/test_conformance/device_partition/test_device_partition.cpp @@ -229,11 +229,14 @@ int test_device_set(size_t deviceCount, size_t queueCount, cl_device_id *devices RandomSeed seed( gRandomSeed ); if (queueCount > MAX_QUEUES) { - log_error("Number of queues (%zu) is greater than the number for which the test was written (%d).", queueCount, MAX_QUEUES); + log_error("Number of queues (%zu) is greater than the number for which " + "the test was written (%d).", + queueCount, MAX_QUEUES); return -1; } - log_info("Testing with %zu queues on %zu devices, %zu kernel executions.\n", queueCount, deviceCount, queueCount*num_elements/TEST_SIZE); + log_info("Testing with %zu queues on %zu devices, %zu kernel executions.\n", + queueCount, deviceCount, queueCount * num_elements / TEST_SIZE); for (i=0; idepth * imageInfo->slicePitch ); + log_error("ERROR: Unable to create backing store for pitched 3D " + "image. %zu bytes\n", + imageInfo->depth * imageInfo->slicePitch); return NULL; } if (imageInfo->type != CL_MEM_OBJECT_IMAGE1D_BUFFER) @@ -424,7 +426,8 @@ int test_copy_image_generic( cl_context context, cl_command_queue queue, image_d // Update the host verification copy of the data. srcHost.reset(malloc(srcBytes),NULL,0,srcBytes); if (srcHost == NULL) { - log_error( "ERROR: Unable to malloc %zu bytes for srcHost\n", srcBytes ); + log_error("ERROR: Unable to malloc %zu bytes for srcHost\n", + srcBytes); return -1; } memcpy(srcHost,srcData,srcBytes); @@ -456,7 +459,8 @@ int test_copy_image_generic( cl_context context, cl_command_queue queue, image_d log_info( " - Resizing destination buffer...\n" ); dstData.reset(malloc(destImageSize),NULL,0,destImageSize); if (dstData == NULL) { - log_error( "ERROR: Unable to malloc %zu bytes for dstData\n", destImageSize ); + log_error("ERROR: Unable to malloc %zu bytes for dstData\n", + destImageSize); return -1; } } @@ -467,7 +471,8 @@ int test_copy_image_generic( cl_context context, cl_command_queue queue, image_d dstHost.reset(malloc(destImageSize),NULL,0,destImageSize); if (dstHost == NULL) { dstData.reset(NULL); - log_error( "ERROR: Unable to malloc %zu bytes for dstHost\n", destImageSize ); + log_error("ERROR: Unable to malloc %zu bytes for dstHost\n", + destImageSize); return -1; } } diff --git a/test_conformance/images/clFillImage/test_fill_generic.cpp b/test_conformance/images/clFillImage/test_fill_generic.cpp index c59f2a8eb..586e845d0 100644 --- a/test_conformance/images/clFillImage/test_fill_generic.cpp +++ b/test_conformance/images/clFillImage/test_fill_generic.cpp @@ -158,7 +158,9 @@ cl_mem create_image( cl_context context, cl_command_queue queue, BufferOwningPtr { if ( NULL == host_ptr ) { - log_error( "ERROR: Unable to create backing store for pitched 3D image. %zu bytes\n", imageInfo->depth * imageInfo->slicePitch ); + log_error("ERROR: Unable to create backing store for pitched 3D " + "image. %zu bytes\n", + imageInfo->depth * imageInfo->slicePitch); return NULL; } if (imageInfo->type != CL_MEM_OBJECT_IMAGE1D_BUFFER) @@ -427,7 +429,8 @@ int test_fill_image_generic( cl_context context, cl_command_queue queue, image_d imgHost.reset(malloc(dataBytes),NULL,0,dataBytes); if (imgHost == NULL) { - log_error( "ERROR: Unable to malloc %zu bytes for imgHost\n", dataBytes ); + log_error("ERROR: Unable to malloc %zu bytes for imgHost\n", + dataBytes); return -1; } } diff --git a/test_conformance/images/kernel_read_write/test_iterations.cpp b/test_conformance/images/kernel_read_write/test_iterations.cpp index 3903191d0..0c87d87dc 100644 --- a/test_conformance/images/kernel_read_write/test_iterations.cpp +++ b/test_conformance/images/kernel_read_write/test_iterations.cpp @@ -97,7 +97,9 @@ template int determine_validation_error( void *imagePtr, image_descrip { if( (--numClamped) == 0 ) { - log_error( "ERROR: TEST FAILED: Read is erroneously clamping coordinates for image size %zu x %zu!\n", imageInfo->width, imageInfo->height ); + log_error("ERROR: TEST FAILED: Read is erroneously clamping " + "coordinates for image size %zu x %zu!\n", + imageInfo->width, imageInfo->height); if (imageInfo->format->image_channel_order == CL_DEPTH) { if( printAsFloat ) @@ -139,7 +141,9 @@ template int determine_validation_error( void *imagePtr, image_descrip { if( (--numClamped) == 0 ) { - log_error( "ERROR: TEST FAILED: Clamping is erroneously returning border color for image size %zu x %zu!\n", imageInfo->width, imageInfo->height ); + log_error("ERROR: TEST FAILED: Clamping is erroneously " + "returning border color for image size %zu x %zu!\n", + imageInfo->width, imageInfo->height); if (imageInfo->format->image_channel_order == CL_DEPTH) { if( printAsFloat ) @@ -203,7 +207,8 @@ template int determine_validation_error( void *imagePtr, image_descrip (int)resultPtr[ 0 ], (int)resultPtr[ 1 ], (int)resultPtr[ 2 ], (int)resultPtr[ 3 ] ); } } - log_error( "img size %zu,%zu (pitch %zu)", imageInfo->width, imageInfo->height, imageInfo->rowPitch ); + log_error("img size %zu,%zu (pitch %zu)", imageInfo->width, + imageInfo->height, imageInfo->rowPitch); if( clamped ) { log_error( " which would clamp to %d,%d\n", clampedX, clampedY ); diff --git a/test_conformance/images/kernel_read_write/test_write_1D.cpp b/test_conformance/images/kernel_read_write/test_write_1D.cpp index a91ebf453..74292f9bf 100644 --- a/test_conformance/images/kernel_read_write/test_write_1D.cpp +++ b/test_conformance/images/kernel_read_write/test_write_1D.cpp @@ -207,8 +207,11 @@ int test_write_image_1D( cl_device_id device, cl_context context, cl_command_que } if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 1D image of size %zu pitch %zu (%s, %s)\n", imageInfo->width, - imageInfo->rowPitch, IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create 1D image of size %zu pitch " + "%zu (%s, %s)\n", + imageInfo->width, imageInfo->rowPitch, + IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } @@ -234,8 +237,11 @@ int test_write_image_1D( cl_device_id device, cl_context context, cl_command_que imageInfo->format, &image_desc, NULL, &error); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create %d level 1D image of size %zu (%s, %s)\n", imageInfo->num_mip_levels, imageInfo->width, - IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create %d level 1D image of " + "size %zu (%s, %s)\n", + imageInfo->num_mip_levels, imageInfo->width, + IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -246,8 +252,11 @@ int test_write_image_1D( cl_device_id device, cl_context context, cl_command_que imageValues, NULL, &error ); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 1D image of size %zu pitch %zu (%s, %s)\n", imageInfo->width, - imageInfo->rowPitch, IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create 1D image of size %zu " + "pitch %zu (%s, %s)\n", + imageInfo->width, imageInfo->rowPitch, + IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -368,7 +377,9 @@ int test_write_image_1D( cl_device_id device, cl_context context, cl_command_que { unsigned int *e = (unsigned int *)resultBuffer; unsigned int *a = (unsigned int *)resultPtr; - log_error( "ERROR: Sample %zu did not validate! (%s)\n", i, mem_flag_names[ mem_flag_index ] ); + log_error( + "ERROR: Sample %zu did not validate! (%s)\n", i, + mem_flag_names[mem_flag_index]); log_error( " Expected: %a %a %a %a\n", expected[ 0 ], expected[ 1 ], expected[ 2 ], expected[ 3 ] ); log_error( " Expected: %08x %08x %08x %08x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: %a %a %a %a\n", actual[ 0 ], actual[ 1 ], actual[ 2 ], actual[ 3 ] ); @@ -385,7 +396,9 @@ int test_write_image_1D( cl_device_id device, cl_context context, cl_command_que if( !validate_half_write_results( e, a, imageInfo ) ) { totalErrors++; - log_error( "ERROR: Sample %zu did not validate! (%s)\n", i, mem_flag_names[ mem_flag_index ] ); + log_error( + "ERROR: Sample %zu did not validate! (%s)\n", i, + mem_flag_names[mem_flag_index]); log_error( " Expected: 0x%04x 0x%04x 0x%04x 0x%04x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: 0x%04x 0x%04x 0x%04x 0x%04x\n", a[ 0 ], a[ 1 ], a[ 2 ], a[ 3 ] ); if( inputType == kFloat ) @@ -435,7 +448,12 @@ int test_write_image_1D( cl_device_id device, cl_context context, cl_command_que deviceResults[ 4 ] == 5 && deviceResults[ 5 ] == 5 && deviceResults[ 6 ] == 6 && deviceResults[ 7 ] == 6 ) deviceRounding = "round to even"; - log_error( "ERROR: Rounding mode sample (%zu) did not validate, probably due to the device's rounding mode being wrong (%s)\n", i, mem_flag_names[mem_flag_index] ); + log_error( + "ERROR: Rounding mode sample (%zu) did " + "not validate, probably due to the " + "device's rounding mode being wrong " + "(%s)\n", + i, mem_flag_names[mem_flag_index]); log_error( " Actual values rounded by device: %x %x %x %x %x %x %x %x\n", deviceResults[ 0 ], deviceResults[ 1 ], deviceResults[ 2 ], deviceResults[ 3 ], deviceResults[ 4 ], deviceResults[ 5 ], deviceResults[ 6 ], deviceResults[ 7 ] ); log_error( " Rounding mode of device appears to be %s\n", deviceRounding ); diff --git a/test_conformance/images/kernel_read_write/test_write_1D_array.cpp b/test_conformance/images/kernel_read_write/test_write_1D_array.cpp index e568eeddf..0e64600f4 100644 --- a/test_conformance/images/kernel_read_write/test_write_1D_array.cpp +++ b/test_conformance/images/kernel_read_write/test_write_1D_array.cpp @@ -218,8 +218,11 @@ int test_write_image_1D_array( cl_device_id device, cl_context context, cl_comma } if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 1D image array of size %zu x %zu pitch %zu (%s, %s)\n", imageInfo->width, imageInfo->arraySize, - imageInfo->rowPitch, IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create 1D image array of size %zu " + "x %zu pitch %zu (%s, %s)\n", + imageInfo->width, imageInfo->arraySize, + imageInfo->rowPitch, IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } @@ -245,8 +248,11 @@ int test_write_image_1D_array( cl_device_id device, cl_context context, cl_comma imageInfo->format, &image_desc, NULL, &error); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create %d level 1D image array of size %zu x %zu (%s, %s)\n", imageInfo->num_mip_levels, imageInfo->width, imageInfo->arraySize, - IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create %d level 1D image array " + "of size %zu x %zu (%s, %s)\n", + imageInfo->num_mip_levels, imageInfo->width, + imageInfo->arraySize, IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -257,8 +263,11 @@ int test_write_image_1D_array( cl_device_id device, cl_context context, cl_comma imageValues, &error ); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 1D image array of size %zu x %zu pitch %zu (%s, %s)\n", imageInfo->width, imageInfo->arraySize, - imageInfo->rowPitch, IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create 1D image array of size " + "%zu x %zu pitch %zu (%s, %s)\n", + imageInfo->width, imageInfo->arraySize, + imageInfo->rowPitch, IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -388,7 +397,9 @@ int test_write_image_1D_array( cl_device_id device, cl_context context, cl_comma { unsigned int *e = (unsigned int *)resultBuffer; unsigned int *a = (unsigned int *)resultPtr; - log_error( "ERROR: Sample %zu (%zu,%zu) did not validate! (%s)\n", i, x, y, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu) did not " + "validate! (%s)\n", + i, x, y, mem_flag_names[mem_flag_index]); log_error( " Expected: %a %a %a %a\n", expected[ 0 ], expected[ 1 ], expected[ 2 ], expected[ 3 ] ); log_error( " Expected: %08x %08x %08x %08x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: %a %a %a %a\n", actual[ 0 ], actual[ 1 ], actual[ 2 ], actual[ 3 ] ); @@ -405,7 +416,9 @@ int test_write_image_1D_array( cl_device_id device, cl_context context, cl_comma if( !validate_half_write_results( e, a, imageInfo ) ) { totalErrors++; - log_error( "ERROR: Sample %zu (%zu,%zu) did not validate! (%s)\n", i, x, y, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu) did not " + "validate! (%s)\n", + i, x, y, mem_flag_names[mem_flag_index]); log_error( " Expected: 0x%04x 0x%04x 0x%04x 0x%04x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: 0x%04x 0x%04x 0x%04x 0x%04x\n", a[ 0 ], a[ 1 ], a[ 2 ], a[ 3 ] ); if( inputType == kFloat ) @@ -456,7 +469,12 @@ int test_write_image_1D_array( cl_device_id device, cl_context context, cl_comma deviceResults[ 4 ] == 5 && deviceResults[ 5 ] == 5 && deviceResults[ 6 ] == 6 && deviceResults[ 7 ] == 6 ) deviceRounding = "round to even"; - log_error( "ERROR: Rounding mode sample (%zu) did not validate, probably due to the device's rounding mode being wrong (%s)\n", i, mem_flag_names[mem_flag_index] ); + log_error( + "ERROR: Rounding mode sample (%zu) did " + "not validate, probably due to the " + "device's rounding mode being wrong " + "(%s)\n", + i, mem_flag_names[mem_flag_index]); log_error( " Actual values rounded by device: %x %x %x %x %x %x %x %x\n", deviceResults[ 0 ], deviceResults[ 1 ], deviceResults[ 2 ], deviceResults[ 3 ], deviceResults[ 4 ], deviceResults[ 5 ], deviceResults[ 6 ], deviceResults[ 7 ] ); log_error( " Rounding mode of device appears to be %s\n", deviceRounding ); diff --git a/test_conformance/images/kernel_read_write/test_write_2D_array.cpp b/test_conformance/images/kernel_read_write/test_write_2D_array.cpp index ced224999..e049d8b8c 100644 --- a/test_conformance/images/kernel_read_write/test_write_2D_array.cpp +++ b/test_conformance/images/kernel_read_write/test_write_2D_array.cpp @@ -245,7 +245,11 @@ int test_write_image_2D_array( cl_device_id device, cl_context context, cl_comma if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 2D image array of size %zu x %zu x %zu pitch %zu (%s)\n", imageInfo->width, imageInfo->height, imageInfo->arraySize, imageInfo->rowPitch, IGetErrorString( error ) ); + log_error("ERROR: Unable to create 2D image array of size %zu " + "x %zu x %zu pitch %zu (%s)\n", + imageInfo->width, imageInfo->height, + imageInfo->arraySize, imageInfo->rowPitch, + IGetErrorString(error)); return error; } @@ -269,8 +273,12 @@ int test_write_image_2D_array( cl_device_id device, cl_context context, cl_comma imageInfo->format, &image_desc, NULL, &error); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create %d level 2D image array of size %zu x %zu x %zu (%s, %s)\n", imageInfo->num_mip_levels, imageInfo->width, imageInfo->height, imageInfo->arraySize, - IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create %d level 2D image array " + "of size %zu x %zu x %zu (%s, %s)\n", + imageInfo->num_mip_levels, imageInfo->width, + imageInfo->height, imageInfo->arraySize, + IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -280,7 +288,11 @@ int test_write_image_2D_array( cl_device_id device, cl_context context, cl_comma imageInfo->width, imageInfo->height, imageInfo->arraySize, 0, 0, imageValues, &error ); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 2D image array of size %zu x %zu x %zu pitch %zu (%s)\n", imageInfo->width, imageInfo->height, imageInfo->arraySize, imageInfo->rowPitch, IGetErrorString( error ) ); + log_error("ERROR: Unable to create 2D image array of size " + "%zu x %zu x %zu pitch %zu (%s)\n", + imageInfo->width, imageInfo->height, + imageInfo->arraySize, imageInfo->rowPitch, + IGetErrorString(error)); return error; } } @@ -413,7 +425,10 @@ int test_write_image_2D_array( cl_device_id device, cl_context context, cl_comma { unsigned int *e = (unsigned int *)resultBuffer; unsigned int *a = (unsigned int *)resultPtr; - log_error( "ERROR: Sample %zu (%zu,%zu,%zu) did not validate! (%s)\n", i, x, y, z, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu,%zu) did " + "not validate! (%s)\n", + i, x, y, z, + mem_flag_names[mem_flag_index]); log_error( " Expected: %a %a %a %a\n", expected[ 0 ], expected[ 1 ], expected[ 2 ], expected[ 3 ] ); log_error( " Expected: %08x %08x %08x %08x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: %a %a %a %a\n", actual[ 0 ], actual[ 1 ], actual[ 2 ], actual[ 3 ] ); @@ -430,7 +445,10 @@ int test_write_image_2D_array( cl_device_id device, cl_context context, cl_comma if( !validate_half_write_results( e, a, imageInfo ) ) { totalErrors++; - log_error( "ERROR: Sample %zu (%zu,%zu,%zu) did not validate! (%s)\n", i, x, y, z, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu,%zu) did " + "not validate! (%s)\n", + i, x, y, z, + mem_flag_names[mem_flag_index]); unsigned short *e = (unsigned short *)resultBuffer; unsigned short *a = (unsigned short *)resultPtr; log_error( " Expected: 0x%04x 0x%04x 0x%04x 0x%04x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); @@ -484,7 +502,12 @@ int test_write_image_2D_array( cl_device_id device, cl_context context, cl_comma deviceResults[ 4 ] == 5 && deviceResults[ 5 ] == 5 && deviceResults[ 6 ] == 6 && deviceResults[ 7 ] == 6 ) deviceRounding = "round to even"; - log_error( "ERROR: Rounding mode sample (%zu) did not validate, probably due to the device's rounding mode being wrong (%s)\n", i, mem_flag_names[mem_flag_index] ); + log_error( + "ERROR: Rounding mode sample (%zu) " + "did not validate, probably due to " + "the device's rounding mode being " + "wrong (%s)\n", + i, mem_flag_names[mem_flag_index]); log_error( " Actual values rounded by device: %d %d %d %d %d %d %d %d\n", deviceResults[ 0 ], deviceResults[ 1 ], deviceResults[ 2 ], deviceResults[ 3 ], deviceResults[ 4 ], deviceResults[ 5 ], deviceResults[ 6 ], deviceResults[ 7 ] ); log_error( " Rounding mode of device appears to be %s\n", deviceRounding ); @@ -804,8 +827,11 @@ int test_write_image_2D_array_set(cl_device_id device, cl_context context, } while( size > maxAllocSize || buffSize > maxAllocSize || ( size * 3 ) > memSize ); if( gDebugTrace ) - log_info( " at size %zu,%zu,%zu (pitch %zu, slice %zu) out of %zu,%zu,%zu\n", imageInfo.width, imageInfo.height, imageInfo.arraySize, - imageInfo.rowPitch, imageInfo.slicePitch, maxWidth, maxHeight, maxArraySize ); + log_info(" at size %zu,%zu,%zu (pitch %zu, slice %zu) out of " + "%zu,%zu,%zu\n", + imageInfo.width, imageInfo.height, imageInfo.arraySize, + imageInfo.rowPitch, imageInfo.slicePitch, maxWidth, + maxHeight, maxArraySize); int retCode = test_write_image_2D_array( device, context, queue, kernel, &imageInfo, inputType, d ); if( retCode ) diff --git a/test_conformance/images/kernel_read_write/test_write_3D.cpp b/test_conformance/images/kernel_read_write/test_write_3D.cpp index 6fe02c03a..cdfa0f2a0 100644 --- a/test_conformance/images/kernel_read_write/test_write_3D.cpp +++ b/test_conformance/images/kernel_read_write/test_write_3D.cpp @@ -249,7 +249,10 @@ int test_write_image_3D( cl_device_id device, cl_context context, cl_command_que if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 3D image of size %zu x %zu x %zu pitch %zu (%s)\n", imageInfo->width, imageInfo->height, imageInfo->depth, imageInfo->rowPitch, IGetErrorString( error ) ); + log_error("ERROR: Unable to create 3D image of size %zu x %zu " + "x %zu pitch %zu (%s)\n", + imageInfo->width, imageInfo->height, imageInfo->depth, + imageInfo->rowPitch, IGetErrorString(error)); return error; } @@ -273,8 +276,12 @@ int test_write_image_3D( cl_device_id device, cl_context context, cl_command_que imageInfo->format, &image_desc, NULL, &error); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create %d level mipmapped 3D image of size %zu x %zu *%zu (%s, %s)\n", imageInfo->num_mip_levels, imageInfo->width, imageInfo->height, imageInfo->depth, - IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create %d level mipmapped 3D " + "image of size %zu x %zu *%zu (%s, %s)\n", + imageInfo->num_mip_levels, imageInfo->width, + imageInfo->height, imageInfo->depth, + IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -284,7 +291,11 @@ int test_write_image_3D( cl_device_id device, cl_context context, cl_command_que imageInfo->width, imageInfo->height, imageInfo->depth, 0, 0, imageValues, &error ); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create 3D image of size %zu x %zu x %zu pitch %zu (%s)\n", imageInfo->width, imageInfo->height, imageInfo->depth, imageInfo->rowPitch, IGetErrorString( error ) ); + log_error("ERROR: Unable to create 3D image of size %zu x " + "%zu x %zu pitch %zu (%s)\n", + imageInfo->width, imageInfo->height, + imageInfo->depth, imageInfo->rowPitch, + IGetErrorString(error)); return error; } } @@ -420,7 +431,10 @@ int test_write_image_3D( cl_device_id device, cl_context context, cl_command_que { unsigned int *e = (unsigned int *)resultBuffer; unsigned int *a = (unsigned int *)resultPtr; - log_error( "ERROR: Sample %zu (%zu,%zu,%zu) did not validate! (%s)\n", i, x, y, z, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu,%zu) did " + "not validate! (%s)\n", + i, x, y, z, + mem_flag_names[mem_flag_index]); log_error( " Expected: %a %a %a %a\n", expected[ 0 ], expected[ 1 ], expected[ 2 ], expected[ 3 ] ); log_error( " Expected: %08x %08x %08x %08x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: %a %a %a %a\n", actual[ 0 ], actual[ 1 ], actual[ 2 ], actual[ 3 ] ); @@ -437,7 +451,10 @@ int test_write_image_3D( cl_device_id device, cl_context context, cl_command_que if( !validate_half_write_results( e, a, imageInfo ) ) { totalErrors++; - log_error( "ERROR: Sample %zu (%zu,%zu,%zu) did not validate! (%s)\n", i, x, y, z, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu,%zu) did " + "not validate! (%s)\n", + i, x, y, z, + mem_flag_names[mem_flag_index]); unsigned short *e = (unsigned short *)resultBuffer; unsigned short *a = (unsigned short *)resultPtr; log_error( " Expected: 0x%04x 0x%04x 0x%04x 0x%04x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); @@ -491,7 +508,12 @@ int test_write_image_3D( cl_device_id device, cl_context context, cl_command_que deviceResults[ 4 ] == 5 && deviceResults[ 5 ] == 5 && deviceResults[ 6 ] == 6 && deviceResults[ 7 ] == 6 ) deviceRounding = "round to even"; - log_error( "ERROR: Rounding mode sample (%zu) did not validate, probably due to the device's rounding mode being wrong (%s)\n", i, mem_flag_names[mem_flag_index] ); + log_error( + "ERROR: Rounding mode sample (%zu) " + "did not validate, probably due to " + "the device's rounding mode being " + "wrong (%s)\n", + i, mem_flag_names[mem_flag_index]); log_error( " Actual values rounded by device: %d %d %d %d %d %d %d %d\n", deviceResults[ 0 ], deviceResults[ 1 ], deviceResults[ 2 ], deviceResults[ 3 ], deviceResults[ 4 ], deviceResults[ 5 ], deviceResults[ 6 ], deviceResults[ 7 ] ); log_error( " Rounding mode of device appears to be %s\n", deviceRounding ); @@ -798,8 +820,11 @@ int test_write_image_3D_set(cl_device_id device, cl_context context, } while( size > maxAllocSize || ( size * 3 ) > memSize ); if( gDebugTrace ) - log_info( " at size %zu,%zu,%zu (pitch %zu, slice %zu) out of %zu,%zu,%zu\n", imageInfo.width, imageInfo.height, imageInfo.depth, - imageInfo.rowPitch, imageInfo.slicePitch, maxWidth, maxHeight, maxDepth ); + log_info(" at size %zu,%zu,%zu (pitch %zu, slice %zu) out of " + "%zu,%zu,%zu\n", + imageInfo.width, imageInfo.height, imageInfo.depth, + imageInfo.rowPitch, imageInfo.slicePitch, maxWidth, + maxHeight, maxDepth); int retCode = test_write_image_3D( device, context, queue, kernel, &imageInfo, inputType, d ); if( retCode ) diff --git a/test_conformance/images/kernel_read_write/test_write_image.cpp b/test_conformance/images/kernel_read_write/test_write_image.cpp index bd530af2a..32f7c22fe 100644 --- a/test_conformance/images/kernel_read_write/test_write_image.cpp +++ b/test_conformance/images/kernel_read_write/test_write_image.cpp @@ -261,8 +261,11 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue } } - log_error( "ERROR: Unable to create 2D image of size %zu x %zu pitch %zu (%s, %s)\n", imageInfo->width, imageInfo->height, - imageInfo->rowPitch, IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create 2D image of size %zu x %zu " + "pitch %zu (%s, %s)\n", + imageInfo->width, imageInfo->height, + imageInfo->rowPitch, IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } @@ -285,8 +288,11 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue imageInfo->format, &image_desc, NULL, &error); if( error != CL_SUCCESS ) { - log_error( "ERROR: Unable to create %d level 2D image of size %zu x %zu (%s, %s)\n", imageInfo->num_mip_levels, imageInfo->width, imageInfo->height, - IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create %d level 2D image of " + "size %zu x %zu (%s, %s)\n", + imageInfo->num_mip_levels, imageInfo->width, + imageInfo->height, IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } } @@ -320,8 +326,11 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue } } - log_error( "ERROR: Unable to create 2D image of size %zu x %zu pitch %zu (%s, %s)\n", imageInfo->width, imageInfo->height, - imageInfo->rowPitch, IGetErrorString( error ), mem_flag_names[mem_flag_index] ); + log_error("ERROR: Unable to create 2D image of size %zu x %zu " + "pitch %zu (%s, %s)\n", + imageInfo->width, imageInfo->height, + imageInfo->rowPitch, IGetErrorString(error), + mem_flag_names[mem_flag_index]); return error; } image = unprotImage; @@ -450,7 +459,9 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue { unsigned int *e = (unsigned int *)resultBuffer; unsigned int *a = (unsigned int *)resultPtr; - log_error( "ERROR: Sample %zu (%zu,%zu) did not validate! (%s)\n", i, x, y, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu) did not " + "validate! (%s)\n", + i, x, y, mem_flag_names[mem_flag_index]); log_error( " Expected: %a %a %a %a\n", expected[ 0 ], expected[ 1 ], expected[ 2 ], expected[ 3 ] ); log_error( " Expected: %08x %08x %08x %08x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: %a %a %a %a\n", actual[ 0 ], actual[ 1 ], actual[ 2 ], actual[ 3 ] ); @@ -467,7 +478,9 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue if( !validate_half_write_results( e, a, imageInfo ) ) { totalErrors++; - log_error( "ERROR: Sample %zu (%zu,%zu) did not validate! (%s)\n", i, x, y, mem_flag_names[ mem_flag_index ] ); + log_error("ERROR: Sample %zu (%zu,%zu) did not " + "validate! (%s)\n", + i, x, y, mem_flag_names[mem_flag_index]); log_error( " Expected: 0x%04x 0x%04x 0x%04x 0x%04x\n", e[ 0 ], e[ 1 ], e[ 2 ], e[ 3 ] ); log_error( " Actual: 0x%04x 0x%04x 0x%04x 0x%04x\n", a[ 0 ], a[ 1 ], a[ 2 ], a[ 3 ] ); if( inputType == kFloat ) @@ -518,7 +531,12 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue deviceResults[ 4 ] == 5 && deviceResults[ 5 ] == 5 && deviceResults[ 6 ] == 6 && deviceResults[ 7 ] == 6 ) deviceRounding = "round to even"; - log_error( "ERROR: Rounding mode sample (%zu) did not validate, probably due to the device's rounding mode being wrong (%s)\n", i, mem_flag_names[mem_flag_index] ); + log_error( + "ERROR: Rounding mode sample (%zu) did " + "not validate, probably due to the " + "device's rounding mode being wrong " + "(%s)\n", + i, mem_flag_names[mem_flag_index]); log_error( " Actual values rounded by device: %x %x %x %x %x %x %x %x\n", deviceResults[ 0 ], deviceResults[ 1 ], deviceResults[ 2 ], deviceResults[ 3 ], deviceResults[ 4 ], deviceResults[ 5 ], deviceResults[ 6 ], deviceResults[ 7 ] ); log_error( " Rounding mode of device appears to be %s\n", deviceRounding ); diff --git a/test_conformance/multiple_device_context/test_multiple_contexts.cpp b/test_conformance/multiple_device_context/test_multiple_contexts.cpp index 2fc75be95..52ac4682c 100644 --- a/test_conformance/multiple_device_context/test_multiple_contexts.cpp +++ b/test_conformance/multiple_device_context/test_multiple_contexts.cpp @@ -294,7 +294,8 @@ cl_int UseTestItem( const TestItem *item, cl_int *err ) { if( err ) { - log_error( "FAILURE to set arg 0 for kernel # %zu : %d\n", j, error ); + log_error("FAILURE to set arg 0 for kernel # %zu : %d\n", j, + error); *err = error; } return error; @@ -305,7 +306,9 @@ cl_int UseTestItem( const TestItem *item, cl_int *err ) { if( err ) { - log_error( "FAILURE: Unable to set arg 1 for kernel # %zu : %d\n", j, error ); + log_error( + "FAILURE: Unable to set arg 1 for kernel # %zu : %d\n", j, + error); *err = error; } return error; @@ -318,7 +321,8 @@ cl_int UseTestItem( const TestItem *item, cl_int *err ) { if( err ) { - log_error( "FAILURE: Unable to enqueue kernel %zu: %d\n", j, error ); + log_error("FAILURE: Unable to enqueue kernel %zu: %d\n", j, + error); *err = error; } return error; @@ -360,7 +364,9 @@ cl_int UseTestItem( const TestItem *item, cl_int *err ) cl_uint result = mapped[i]; if( expected != result ) { - log_error( "FAILURE: Sample data at position %zu does not match expected result: *0x%8.8x vs. 0x%8.8x\n", i, expected, result ); + log_error("FAILURE: Sample data at position %zu does not " + "match expected result: *0x%8.8x vs. 0x%8.8x\n", + i, expected, result); if( err ) *err = -1; return -1; @@ -441,16 +447,17 @@ int test_context_multiple_contexts_same_device(cl_device_id deviceID, size_t max // Check to make sure we made the minimum amount if( i < minCount ) { - log_error( "FAILURE: only could make %zu of %zu contexts!\n", i, minCount ); + log_error("FAILURE: only could make %zu of %zu contexts!\n", i, + minCount); err = -1; goto exit; } // Report how many contexts we made if( i == maxCount ) - log_info( "Successfully created all %zu contexts.\n", i ); + log_info("Successfully created all %zu contexts.\n", i); else - log_info( "Successfully created %zu contexts out of %zu\n", i, maxCount ); + log_info("Successfully created %zu contexts out of %zu\n", i, maxCount); // Set the count to be the number we succesfully made maxCount = i; diff --git a/test_conformance/multiple_device_context/test_multiple_devices.cpp b/test_conformance/multiple_device_context/test_multiple_devices.cpp index d1a4bd1a0..8e45efd0f 100644 --- a/test_conformance/multiple_device_context/test_multiple_devices.cpp +++ b/test_conformance/multiple_device_context/test_multiple_devices.cpp @@ -53,16 +53,21 @@ int test_device_set(size_t deviceCount, size_t queueCount, cl_device_id *devices RandomSeed seed( gRandomSeed ); if (deviceCount > MAX_DEVICES) { - log_error("Number of devices in set (%zu) is greater than the number for which the test was written (%d).", deviceCount, MAX_DEVICES); - return -1; + log_error("Number of devices in set (%zu) is greater than the number " + "for which the test was written (%d).", + deviceCount, MAX_DEVICES); + return -1; } if (queueCount > MAX_QUEUES) { - log_error("Number of queues (%zu) is greater than the number for which the test was written (%d).", queueCount, MAX_QUEUES); - return -1; + log_error("Number of queues (%zu) is greater than the number for which " + "the test was written (%d).", + queueCount, MAX_QUEUES); + return -1; } - log_info("Testing with %zu queues on %zu devices, %zu kernel executions.\n", queueCount, deviceCount, queueCount*num_elements/TEST_SIZE); + log_info("Testing with %zu queues on %zu devices, %zu kernel executions.\n", + queueCount, deviceCount, queueCount * num_elements / TEST_SIZE); for (i=0; i