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

Export the special span value for not-indexing an array dimension. #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leftaroundabout
Copy link
Contributor

The special value span is quite important for effective array slicing in ArrayFire, but it was not previously exposed in the Haskell bindings. Indeed, as this is a constant rather than a function it cannot be imported (?) using the FFI, but the same value can simply be hardcoded as a Haskell constant.

Without this export, users could also hard-code it at each use site. But that would result in cryptic code, not to mention unsafe if the definition of af_span should ever change. It's certainly better to have it available in the library.

This is quite important for effective array slicing, but not previously exposed.

(The value could easily be hard-coded at each use site, but that would make for cryptic
code, not to mention unsafe if the definition of af_span should ever change.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant