MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IsPowerOfTwo

Function IsPowerOfTwo

tensorflow/compiler/xla/util.h:476–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474
475template <typename T>
476inline bool IsPowerOfTwo(T x) {
477 static_assert(!std::numeric_limits<T>::is_signed, "unsigned types only");
478 return x != 0 && (x & (x - 1)) == 0;
479}
480
481// Returns a mask with "bits" number of least significant bits set.
482inline uint32 LsbMaskU32(int bits) {

Callers 9

TryDivideToShiftFunction · 0.50
TryRemainderToAndFunction · 0.50
Fft1DFunction · 0.50
Dft1DFunction · 0.50
HandleFftMethod · 0.50
TiledSmallGemmEmitterMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected