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

[question] Bit operations for Expr #5

Open
npatsakula opened this issue Jun 13, 2023 · 3 comments
Open

[question] Bit operations for Expr #5

npatsakula opened this issue Jun 13, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@npatsakula
Copy link

npatsakula commented Jun 13, 2023

Hello there!

Is it possible to use bit operations (or, and, left/right shift) with halide-haskell?

@twesterhout
Copy link
Owner

Hello @npatsakula ! Bitwise operations are indeed missing (there are boolean or and and though). I'm a bit conflicted about the interface... For instance, in halide-haskell the type of shift would be Expr a -> Expr Int32 -> Expr a whereas in base it is a -> Int -> a. I need to think a bit how to best expose the bitwise operations with the syntax that is familiar to Haskellers, but without clashing with Prelude too much.

@twesterhout twesterhout self-assigned this Jun 14, 2023
@twesterhout twesterhout added the enhancement New feature or request label Jun 14, 2023
@npatsakula
Copy link
Author

Personally I don't have any prejudgement about overlapping with Prelude: you can use qualified import and use functions with familiar names. I'd be glad if you tell me more about problem here.

@npatsakula
Copy link
Author

Also I need to mention that Accelerate using shift function name as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants