tigerneil / aparapi

Automatically exported from code.google.com/p/aparapi
Other
1 stars 0 forks source link

Code gen not correct for assignment to static array element #103

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In the kernel use a static field like:

   static int[] target = new int[size];

   @Override
   public void run() {
      int id = getGlobalId();
      target[id] = source[id];
   }

2. the codegen does not emit "this->" for the target ref, so the results are 
incorrect compared to regular java.

      int id = get_global_id(0);
      target[id]  = source[id];
      return;

3.

What is the expected output? What do you see instead?
The assigned values in the kernel code are not there when you return to java

Please use labels and text to provide additional information.

Original issue reported on code.google.com by ecasp...@gmail.com on 26 Mar 2013 at 3:46

GoogleCodeExporter commented 8 years ago
I added a test case as 
test/runtime/src/java/com/amd/aparapi/test/runtime/Issue103.java.

Original comment by ecasp...@gmail.com on 26 Mar 2013 at 3:48

GoogleCodeExporter commented 8 years ago

Original comment by ecasp...@gmail.com on 26 Mar 2013 at 3:52