Args: callee: Name of the function being called (e.g., "sinf", "my_device_func") args: List of argument expressions passed to the function return_type: Type of the value returned by this function call is_builtin: Whether the function is a CUDA
(self, callee: str, args: List[Expr], return_type: LLType, is_builtin: bool = False)
| 437 | """ |
| 438 | |
| 439 | def __init__(self, callee: str, args: List[Expr], return_type: LLType, is_builtin: bool = False): |
| 440 | """ |
| 441 | Args: |
| 442 | callee: Name of the function being called (e.g., "sinf", "my_device_func") |
| 443 | args: List of argument expressions passed to the function |
| 444 | return_type: Type of the value returned by this function call |
| 445 | is_builtin: Whether the function is a CUDA built-in (e.g., "sqrtf", "atomicAdd") |
| 446 | |
| 447 | Raises: |
| 448 | ValueError: If conflicting qualifiers (e.g., is_kernel and return_type is not void) |
| 449 | """ |
| 450 | super().__init__(expr_type=return_type) # Expr's type is the return type |
| 451 | self.callee = callee |
| 452 | self.args = args |
| 453 | self.is_builtin = is_builtin |
| 454 | |
| 455 | def __repr__(self) -> str: |
| 456 | attrs = [] |