Bitwise shift of buffer in CUDA
Is there any way to memmove a buffer in CUDA in a bitwise manner? Eg, for a buffer with two bytes and a pointer
buf -> 00000000 11111111
I would like to shift bit portions left or right given their bit offset. Something like
void memmove(void* buf, int from, int bits, int delta)
For the buffer above I would expect then:
00000111 11111111
after calling
memmove(buf,8,3,-3)
I could not find a proper function for this in CUDA's documentation or Google.
Please notice: I am not interested in cudaMemcpy
or the normal memmove
. A bitwise memmove is what I need!
I am also aware on how to do this with normal CPU, I need a more efficient alternative and therefore I am considering CUDA.
上一篇: 为什么memmove比memcpy更快?
下一篇: CUDA中缓冲区的按位移动