| 39 | using namespace mlir::cuda_tile; |
| 40 | |
| 41 | int64_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 | |
| 48 | int64_t cuda_tile::getMinSignedValueForBitwidth(int64_t n) { |
| 49 | assert(n > 0 && n <= 64 && "invalid bitwidth"); |