| 46 | } |
| 47 | |
| 48 | int64_t cuda_tile::getMinSignedValueForBitwidth(int64_t n) { |
| 49 | assert(n > 0 && n <= 64 && "invalid bitwidth"); |
| 50 | if (n == 64) |
| 51 | return std::numeric_limits<int64_t>::min(); |
| 52 | return -(static_cast<int64_t>(1) << (n - 1)); |
| 53 | } |
| 54 | |
| 55 | uint64_t cuda_tile::getMaxUnsignedValueForBitwidth(int64_t n) { |
| 56 | assert(n > 0 && n <= 64 && "invalid bitwidth"); |