diff --git a/test_conformance/gl/test_buffers.cpp b/test_conformance/gl/test_buffers.cpp index 2730d2f300..c66428526d 100644 --- a/test_conformance/gl/test_buffers.cpp +++ b/test_conformance/gl/test_buffers.cpp @@ -126,7 +126,7 @@ int test_buffer_kernel(cl_context context, cl_command_queue queue, clProgramWrapper program; clKernelWrapper kernel; clMemWrapper streams[3]; - size_t dataSize = numElements * 16 * sizeof(cl_long); + size_t dataSize = numElements * 16; std::vector inData(dataSize), outDataCL(dataSize), outDataGL(dataSize); @@ -164,8 +164,8 @@ int test_buffer_kernel(cl_context context, cl_command_queue queue, /* Generate some almost-random input data */ gen_input_data(vecType, vecSize * numElements, d, inData.data()); - outDataCL.clear(); - outDataGL.clear(); + std::fill(outDataCL.begin(), outDataCL.end(), 0); + std::fill(outDataGL.begin(), outDataGL.end(), 0); /* Generate some GL buffers to go against */ glGenBuffers(1, &inGLBuffer); diff --git a/test_conformance/relationals/test_shuffles.cpp b/test_conformance/relationals/test_shuffles.cpp index 95e127a9a7..6efa9d8d20 100644 --- a/test_conformance/relationals/test_shuffles.cpp +++ b/test_conformance/relationals/test_shuffles.cpp @@ -618,10 +618,10 @@ int test_shuffle_dual_kernel(cl_context context, cl_command_queue queue, if( error != 0 ) return error; - typeSize = get_explicit_type_size( vecType ); - std::vector inData(inVecSize * numOrders * sizeof(cl_long)); - std::vector inSecondData(inVecSize * numOrders * sizeof(cl_long)); - std::vector outData(outRealVecSize * numOrders * sizeof(cl_long)); + typeSize = get_explicit_type_size(vecType); + std::vector inData(inVecSize * numOrders); + std::vector inSecondData(inVecSize * numOrders); + std::vector outData(outRealVecSize * numOrders); outData.clear(); generate_random_data(vecType, (unsigned int)(numOrders * inVecSize), d,