Reputation: 178
I read some on-line post and papers for removing If-statement, and bit twiddling(bit-manipulation) is one of solution for that.
Can I use bit twiddling with opencl(or cuda) vector?
Upvotes: 0
Views: 921
Reputation: 131
Yes you can. All operators in OpenCL are extended to vector data types. You can read more about it in the specification.
Also, you might be interested in looking at the select
function.
Upvotes: 1