P4 to Git Change 1159925 by rayxiao@alit_opencl_rayxiao on 2015/06/10 13:33:10

EPR #396242 - Add T_PAD type for padding to parameters, use struct instead of array for padding. Set name of padding struct as "__paddingFields" when created.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_kernel.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/clc/src/e2lType.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/compiler/clc/src/oclMetallvm.cpp#46 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpumapping.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuprogram.cpp#67 edit
This commit is contained in:
foreman
2015-06-10 13:42:11 -04:00
parent 27a9fcd36f
commit 5b6d359824
2 changed files with 35 additions and 3 deletions
+2 -2
View File
@@ -172,7 +172,7 @@ getParamSizeImpl(bool cpuLayer, const clk_parameter_descriptor_t* desc,
size_t* alignment, unsigned* index_out)
{
size_t size = 0;
if(desc[index].type == T_STRUCT) {
if(desc[index].type == T_STRUCT || desc[index].type == T_PAD) {
size_t maxAlignment = 0;
size_t structSize = 0;
size_t structAlignment = 0;
@@ -237,7 +237,7 @@ getNumTypeDescs(const clk_parameter_descriptor_t* desc)
int numStruct = 0;
unsigned i;
for(i = 0; desc[i].type != T_VOID || numStruct > 0; ++i) {
if (desc[i].type == T_STRUCT)
if (desc[i].type == T_STRUCT || desc[i].type == T_PAD)
numStruct++;
if (desc[i].type == T_VOID)
numStruct--;