Miscellaneous operations, including assertions, console printing, and exception throwing.
def __ifThenElse(x: Rep[Boolean], y: => Rep[T], z: => Rep[T]): Rep[T]
def __whileDo(x: => Rep[Boolean], y: => Rep[Unit]): Rep[Unit]
def exit(x: Rep[Int]): Rep[Nothing]
If the condition is true, does nothing. If it is false, terminates the program with the specified exception message. Assertions are only evaluated in the library backend and during compiler debugging. Otherwise, they are ignored to enable more fusion and code motion opportunities.
- cond - condition to be checked
- message - exception message to be shown to the user if the assertion fails
def fatal(x: Rep[String]): Rep[Nothing]
def getMaxHeapSize(): Rep[Long]
Returns the maximum heap size from the JVM
def print(x: Rep[Any]): Rep[Unit]
def println(value: Rep[Any]): Rep[Unit]
Prints the specified value to the console with a newline. At runtime, this will attempt to use the toString method to cast the value to string if one exists
def println(): Rep[Unit]
Prints a newline to the console