Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate user-library types created in operations' user code to C types #28

Open
wcmjunior opened this issue Aug 14, 2016 · 0 comments

Comments

@wcmjunior
Copy link
Member

The compiler still does not translate to C those user-library types created inside the body of operations. An example of code is the following:

Array<Float32> arrayRetMap = array.par().map(Float32.class, new Map<Float32, Int32>() {
    @Override
    public Float32 function(Int32 element) {
        Float32 ret = new Float32();
        ret.value = element.value * 1.5f + valor;
        return ret;
    }
});

This code will be translated to the following C user function:

static float map1(int element) {
    Float32 ret = new Float32();
    ret.value = element * 1.5f + valor;
    return ret;
}

But should be translated to:

static float map1(int element) {
    float ret;
    ret = element * 1.5f + valor;
    return ret;
}
@wcmjunior wcmjunior added this to the version 0.4 milestone Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant