MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / getMaxSignedValueForBitwidth

Method getMaxSignedValueForBitwidth

lib/Dialect/CudaTile/IR/CudaTile.cpp:41–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39using namespace mlir::cuda_tile;
40
41int64_t cuda_tile::getMaxSignedValueForBitwidth(int64_t n) {
42 assert(n > 0 && n <= 64 && "invalid bitwidth");
43 if (n == 64)
44 return std::numeric_limits<int64_t>::max();
45 return (static_cast<int64_t>(1) << (n - 1)) - 1;
46}
47
48int64_t cuda_tile::getMinSignedValueForBitwidth(int64_t n) {
49 assert(n > 0 && n <= 64 && "invalid bitwidth");

Callers

nothing calls this directly

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected