| 53 | } |
| 54 | |
| 55 | uint64_t cuda_tile::getMaxUnsignedValueForBitwidth(int64_t n) { |
| 56 | assert(n > 0 && n <= 64 && "invalid bitwidth"); |
| 57 | if (n == 64) |
| 58 | return std::numeric_limits<uint64_t>::max(); |
| 59 | return (static_cast<int64_t>(1) << n) - 1; |
| 60 | } |
| 61 | |
| 62 | cuda_tile::ModuleOp cuda_tile::extractCudaTileModuleOp(Operation *op) { |
| 63 | // Try direct cast first |