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

Investigate Bits instance on Array CBool #34

Open
dmjio opened this issue Nov 7, 2019 · 1 comment
Open

Investigate Bits instance on Array CBool #34

dmjio opened this issue Nov 7, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@dmjio
Copy link
Member

dmjio commented Nov 7, 2019

Theoretically, there's no reason this can't be supported.

instance Bits (ArrayFire CBool) where
  (.&.) = A.and
  (.|.) = A.or
  xor = A.bitXor
  shiftL x n = A.shiftL x (scalar n)
  shiftR x n = A.shiftR x (scalar n)

Still need to look into implementing the following:

(rotate | rotateL, rotateR), bitSize, bitSizeMaybe, isSigned, testBit, bit, popCount
@dmjio dmjio added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Nov 9, 2019
@dmjio
Copy link
Member Author

dmjio commented Nov 9, 2019

Regarding popCount, af_count (i.e. count) can be used on CBool to act like a pop count. But the dimension must be specified as well... so we might need to use countAll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants