Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed code generation for map on PA objects with rank > 1

  • Loading branch information...
commit cfe8831280a897897b3808aec7532c1b9f0bd5d1 1 parent 0d8dd20
@sherhut sherhut authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 jslib/jit/compiler/genOCL.js
View
7 jslib/jit/compiler/genOCL.js
@@ -262,8 +262,11 @@ RiverTrail.compiler.codeGen = (function() {
// The relative argumment is a value found in the ParallelArray.
indexName = funDecl.params[0];
indexType = funDecl.typeInfo.parameters[1];
- s = s + " const "+indexType.OpenCLType+" "+ indexName+" = tempThis[_readoffset];"
-
+ if (indexType.isScalarType()) {
+ s = s + "const " + indexType.OpenCLType+" "+ indexName+" = tempThis[_readoffset];"
+ } else {
+ s = s + indexType.getOpenCLAddressSpace() + " " + indexType.OpenCLType+" "+ indexName+" = &(tempThis[_readoffset]);"
+ }
}
return s;
};
Please sign in to comment.
Something went wrong with that request. Please try again.