reversebits¶
Description¶
Reverse order of bits.
Signature¶
T reversebits<T>(T value) where T : __BuiltinIntegerType; vector<T, N> reversebits<T, int N>(vector<T, N> value) where T : __BuiltinIntegerType;
Generic Parameters¶
T: __BuiltinIntegerType¶
N : int¶
Parameters¶
value : T¶
The value to reverse bits of.
value : vector<T, N>¶
The value to reverse bits of.
Return value¶
The bits of value, reversed such that bit n of the result is equal to bit (width - 1 - n) of value.
Remarks¶
For SPIR-V, this function maps to OpBitReverse.
Availability and Requirements¶
Defined for the following targets:
hlsl¶
Available in all stages.
glsl¶
Available in all stages.
cpp¶
Available in all stages.
cuda¶
Available in all stages.
metal¶
Available in all stages.
wgsl¶
Available in all stages.
spirv¶
Available in all stages.
llvm¶
Available in all stages.