jordan30001 / aparapi

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

Struct names wrongly translated if in function paramters #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using this simple class:

public final class Complex{
    public float re;
    public float im;

    public void add(Complex number){
        re += number.re;
        im += number.im;
    }
}

in a kernel works as expected when in a default package, but if we put it in an 
own package, the OpenCL is mistranslated (package named "complex" in this 
example):

typedef struct complex_Complex_s{
   float  re;
   float  im;

} complex_Complex;
typedef struct This_s{
   __global complex_Complex *val$data;
   int passid;
}This;
int get_pass_id(This *this){
   return this->passid;
}
void complex_Complex__sub(__global complex_Complex *this, complex.Complex 
number){
   this->re=this->re - number.re;
   this->im=this->im - number.im;
   return;
}

Function:
complex_Complex__sub(__global complex_Complex *this, complex.Complex number)
should be:
complex_Complex__sub(__global complex_Complex *this, complex_Complex number)

So underscore instead of a dot. This happens in more complex package names too.

Original issue reported on code.google.com by er4...@gmail.com on 28 Feb 2013 at 5:24

GoogleCodeExporter commented 9 years ago

Original comment by ryan.lam...@gmail.com on 20 Apr 2013 at 12:38