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

Records of variable length arrays do not generate valid code #227

Open
Bastacyclop opened this issue Feb 17, 2022 · 0 comments
Open

Records of variable length arrays do not generate valid code #227

Bastacyclop opened this issue Feb 17, 2022 · 0 comments
Labels
bug Something isn't working generated code Changes to the code that our compiler generates

Comments

@Bastacyclop
Copy link
Member

Example from #220 (other tests are ignored in this PR for the same reason):

    val e = depFun((n: Nat, m: Nat) => fun(n`.`n`.`m`.`m`.`f32)(in =>
      in |> mapWorkGroup(0)(mapWorkGroup(1)(fun(x =>
        zip(x)(x) |> mapLocal(1)(fun(p =>
          zip(fst(p))(snd(p)) |> mapLocal(0)(fun(p =>
            makePair(fst(p))(snd(p))
          )) |> unzip
        )) |> toLocal |> unzip |> fst |>
        mapLocal(0)(mapLocal(1)(id))
      )))
    ))

Invalid code:

/tmp/code-4209632813176923104.cl:4:14: error: use of undeclared identifier 'n5'
  float _fst[n5];
             ^
/tmp/code-4209632813176923104.cl:5:14: error: use of undeclared identifier 'n5'
  float _snd[n5];
             ^
2 errors generated.
==========
SyntaxChecker failed for code:

struct Record_n5_float_n5_float {
  float _fst[n5];
  float _snd[n5];
};

[...]
@Bastacyclop Bastacyclop added bug Something isn't working generated code Changes to the code that our compiler generates labels Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working generated code Changes to the code that our compiler generates
Projects
None yet
Development

No branches or pull requests

1 participant