Skip to content

Commit bd5c6a9

Browse files
committed
JavaCL Generator: fixed issue #184 : __local arguments were not generated properly
The __local modifier was collected by the AST of target types, so needed to add some modifiers-harvesting mechanism to ModifiableElement
1 parent 8108999 commit bd5c6a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Generator/src/main/java/com/nativelibs4java/opencl/generator/JavaCLGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public void convertFunction(Function function, Signatures signatures, boolean is
173173

174174
try {
175175
tr = result.typeConverter.resolveTypeDef(tr, libraryClassName, true, false);
176-
List<Modifier> mods = tr.getModifiers();
176+
List<Modifier> mods = arg.harvestModifiers();
177177

178178
TypeRef convTr;
179179
String argName = arg.getName() == null ? "arg" + iArg : arg.getName();
@@ -182,9 +182,9 @@ public void convertFunction(Function function, Signatures signatures, boolean is
182182
if (ModifierType.__local.isContainedBy(mods)) {
183183
argName += "LocalByteSize";
184184
//convTr = typeRef(Long.TYPE);
185-
//argExpr = new Expression.New(typeRef(CLKernel.LocalSize.class), varRef(argName));
186-
convTr = typeRef(CLKernel.LocalSize.class);
187-
argExpr = varRef(argName);//new Expression.New(typeRef(CLKernel.LocalSize.class), varRef(argName));
185+
//argExpr = new Expression.New(typeRef(LocalSize.class), varRef(argName));
186+
convTr = typeRef(LocalSize.class);
187+
argExpr = varRef(argName);//new Expression.New(typeRef(LocalSize.class), varRef(argName));
188188
} else {
189189
Conversion conv = convertTypeToJavaCL(result, argName, tr, TypeConversion.TypeConversionMode.PrimitiveOrBufferParameter, null);
190190
convTr = conv.outerJavaTypeRef;

0 commit comments

Comments
 (0)