Panther Search Documentation Tutorials Devlogs Downloads Source Code

Documentation > Panther Documentation > Intrinsics > @add

@add

Panther
Documentation


1: func @add = <{T: Type, MAY_WRAP: Bool}> (lhs: T, rhs: T) -> T;

  Integer addition.

Template Parameters

  T: type of arguments and output - must be integral or a vector of integral

  MAY_WRAP: If true, addition is alowed to wrap

Parameters

  lhs: left-hand-side value of operation

  rhs: right-hand-side value of operation

Return Value

  Result value of the addition

Notes

  If MAY_WRAP is false, wrapping is undefined behavior. However, setting MAY_WRAP to false may allow the compiler to optimize better.

Example

(TODO)

See Also

@addWrap Integer addition that returns if operation wrapped
@addWrap Integer addition that returns if operation wrapped
@fadd Floating-point addition