Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Abstracting over arrays #70

Open
MaikKlein opened this issue Sep 27, 2018 · 0 comments
Open

Abstracting over arrays #70

MaikKlein opened this issue Sep 27, 2018 · 0 comments

Comments

@MaikKlein
Copy link
Owner

  • spir-v differentiates between runtime arrays and static arrays

  • Slices can't be supported in rlsl at the moment

  • Things like len on a static array currently maps to Slice::len() in Rust, which can't be expressed.

  • Const generics aren't a thing yet.

Because slices are not supported, we need to abstract over arrays with generics

fn foo(arr: &impl Array<f32>) { .. }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant