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

Static initialization of complex/struct array #28

Closed
bradunov opened this issue Sep 20, 2014 · 2 comments
Closed

Static initialization of complex/struct array #28

bradunov opened this issue Sep 20, 2014 · 2 comments

Comments

@bradunov
Copy link
Collaborator

The following code does not parse:

let f(a:arr int) =
var c : arr[2] complex16 := {complex16{re=0; im=0}, complex16{re=0; im=0}};
return 0
in
read[int] >>> emit f({1,2}) >>> write[int]

since static initialization of complex array seems not allowed at the moment.

@edsko
Copy link
Collaborator

edsko commented Dec 15, 2014

This is more than just a parser change; the AST cannot represent this either, and hence codegen would have to be modified too. @dimitriv ?

@edsko
Copy link
Collaborator

edsko commented Dec 31, 2014

Partly implemented. See #85.

@edsko edsko closed this as completed Dec 31, 2014
edsko added a commit that referenced this issue Dec 31, 2014
This partly implements #28 and #37, but I not updated codegen (#85). However,
this may also be useful in the optimizer.
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

2 participants