MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / reverse_char

Function reverse_char

examples/common/idxio.h:24–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22};
23
24unsigned char reverse_char(unsigned char b) {
25 b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
26 b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
27 b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
28 return b;
29}
30
31// http://stackoverflow.com/a/9144870/2192361
32unsigned reverse(unsigned x) {

Callers 1

read_idxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected