Skip to content

Commit

Permalink
Fix build errors related with variable defined array length and gl te…
Browse files Browse the repository at this point in the history
…sts logged error
  • Loading branch information
jujiang-del committed Jun 24, 2024
1 parent 6c5b38a commit ed4272f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test_conformance/gl/test_buffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<cl_long> inData(dataSize), outDataCL(dataSize),
outDataGL(dataSize);

Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions test_conformance/relationals/test_shuffles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<cl_long> inData(inVecSize * numOrders * sizeof(cl_long));
std::vector<cl_long> inSecondData(inVecSize * numOrders * sizeof(cl_long));
std::vector<cl_long> outData(outRealVecSize * numOrders * sizeof(cl_long));
typeSize = get_explicit_type_size(vecType);
std::vector<cl_long> inData(inVecSize * numOrders);
std::vector<cl_long> inSecondData(inVecSize * numOrders);
std::vector<cl_long> outData(outRealVecSize * numOrders);

outData.clear();
generate_random_data(vecType, (unsigned int)(numOrders * inVecSize), d,
Expand Down

0 comments on commit ed4272f

Please sign in to comment.