Categories
Does the Nvidia CUDA libraries have a bitwise shift function, like in C++ _lrotl and _lrotr from stdlib.h?
If there are none, maybe there is an implementation (source) of such functions in C\C++?
Answer the question
In order to leave comments, you need to log in
What is the difficulty?
uint32_t lrotl(uint32_t v, unsigned s) { s &= sizeof(v) * 8 - 1; if (s) return (v << s) | (v >> (sizeof(v) * 8 - s)); else return v; }
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question