Skip to main content

internal.types.int

Standard library module View source
class Int
@extend
class Int[N]
Constructors 5
__new__
__new__()
__new__
@overload
__new__(what: Int[M], M: Literal[int])
__new__
@overload
__new__(what: UInt[M], M: Literal[int])
__new__
@overload
__new__(what: str, base: int)
__new__
@overload
__new__(what)
Properties 2
real
@property
real(self: Self, Self: type)
imag
@property
imag(self: Self, Self: type)
Methods 4
cdiv
cdiv(self: Self, other: Int[N], Self: type)
cmod
cmod(self: Self, other: Int[N], Self: type)
popcnt
popcnt(self: Self, Self: type)
bit_length
bit_length(self: Self, Self: type)
Special methods 42
__int__
__int__(self: Self, Self: type)
__index__
__index__(self: Self, Self: type)
__copy__
__copy__(self: Self, Self: type)
__deepcopy__
__deepcopy__(self: Self, Self: type)
__hash__
__hash__(self: Self, Self: type)
__float__
@pure @llvm
__float__(self: Self, Self: type)
%0 = sitofp i{=N} %self to double
ret double %0
__bool__
@pure @llvm
__bool__(self: Self, Self: type)
%0 = icmp ne i{=N} %self, 0
%1 = zext i1 %0 to i8
ret i8 %1
__pos__
__pos__(self: Self, Self: type)
__neg__
@pure @llvm
__neg__(self: Self, Self: type)
%0 = sub i{=N} 0, %self
ret i{=N} %0
__invert__
@pure @llvm
__invert__(self: Self, Self: type)
%0 = xor i{=N} %self, -1
ret i{=N} %0
__abs__
@pure @llvm
__abs__(self: Self, Self: type)
declare i{=N} @llvm.abs.i{=N}(i{=N}, i1)
%0 = call i{=N} @llvm.abs.i{=N}(i{=N} %self, i1 false)
ret i{=N} %0
__add__
@pure @commutative @associative @llvm
__add__(self: Self, other: Int[N], Self: type)
%0 = add i{=N} %self, %other
ret i{=N} %0
__sub__
@pure @llvm
__sub__(self: Self, other: Int[N], Self: type)
%0 = sub i{=N} %self, %other
ret i{=N} %0
__mul__
@pure @commutative @associative @distributive @llvm
__mul__(self: Self, other: Int[N], Self: type)
%0 = mul i{=N} %self, %other
ret i{=N} %0
__floordiv__
__floordiv__(self: Self, other: Int[N], Self: type)
__truediv__
__truediv__(self: Self, other: Int[N], Self: type)
__mod__
__mod__(self: Self, other: Int[N], Self: type)
__divmod__
__divmod__(self: Self, other: Int[N], Self: type)
__lshift__
__lshift__(self: Self, other: Int[N], Self: type)
__lshift__(self: Self, other: int, Self: type)
__rshift__
__rshift__(self: Self, other: Int[N], Self: type)
__rshift__(self: Self, other: int, Self: type)
__eq__
@pure @llvm
__eq__(self: Self, other: Int[N], Self: type)
%0 = icmp eq i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ne__
@pure @llvm
__ne__(self: Self, other: Int[N], Self: type)
%0 = icmp ne i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__lt__
@pure @llvm
__lt__(self: Self, other: Int[N], Self: type)
%0 = icmp slt i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__gt__
@pure @llvm
__gt__(self: Self, other: Int[N], Self: type)
%0 = icmp sgt i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__le__
@pure @llvm
__le__(self: Self, other: Int[N], Self: type)
%0 = icmp sle i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ge__
@pure @llvm
__ge__(self: Self, other: Int[N], Self: type)
%0 = icmp sge i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__and__
@pure @commutative @associative @llvm
__and__(self: Self, other: Int[N], Self: type)
%0 = and i{=N} %self, %other
ret i{=N} %0
__or__
@pure @commutative @associative @llvm
__or__(self: Self, other: Int[N], Self: type)
%0 = or i{=N} %self, %other
ret i{=N} %0
__xor__
@pure @commutative @associative @llvm
__xor__(self: Self, other: Int[N], Self: type)
%0 = xor i{=N} %self, %other
ret i{=N} %0
__pow__
__pow__(self: Self, exp: Int[N], Self: type)
__pow__(self: Self, exp: Literal[int], Self: type)
__repr__
__repr__(self: Self, Self: type)
__match__
__match__(self: Self, obj: Int[N], Self: type)
__round__
__round__(self: Self, ndigits = None, Self: type)
__atomic_xchg__
@nocapture @llvm
__atomic_xchg__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw xchg ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_add__
@nocapture @llvm
__atomic_add__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw add ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_sub__
@nocapture @llvm
__atomic_sub__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw sub ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_and__
@nocapture @llvm
__atomic_and__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw and ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_nand__
@nocapture @llvm
__atomic_nand__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw nand ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_or__
@nocapture @llvm
__atomic_or__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw or ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_xor__
@nocapture @llvm
__atomic_xor__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw xor ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_min__
@nocapture @llvm
__atomic_min__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw min ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_max__
@nocapture @llvm
__atomic_max__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw max ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
class UInt
@extend
class UInt[N]
Constructors 4
__new__
__new__()
__new__
@overload
__new__(what: UInt[M], M: Literal[int])
__new__
@overload
__new__(what: Int[M], M: Literal[int])
__new__
__new__(what: str, base: int = 10)
Properties 2
real
@property
real(self: Self, Self: type)
imag
@property
imag(self: Self, Self: type)
Methods 4
cdiv
cdiv(self: Self, other: UInt[N], Self: type)
cmod
cmod(self: Self, other: UInt[N], Self: type)
popcnt
popcnt(self: Self, Self: type)
bit_length
bit_length(self: Self, Self: type)
Special methods 42
__int__
__int__(self: Self, Self: type)
__index__
__index__(self: Self, Self: type)
__copy__
__copy__(self: Self, Self: type)
__deepcopy__
__deepcopy__(self: Self, Self: type)
__hash__
__hash__(self: Self, Self: type)
__float__
@pure @llvm
__float__(self: Self, Self: type)
%0 = uitofp i{=N} %self to double
ret double %0
__bool__
@pure @llvm
__bool__(self: Self, Self: type)
%0 = icmp ne i{=N} %self, 0
%1 = zext i1 %0 to i8
ret i8 %1
__pos__
__pos__(self: Self, Self: type)
__neg__
@pure @llvm
__neg__(self: Self, Self: type)
%0 = sub i{=N} 0, %self
ret i{=N} %0
__invert__
@pure @llvm
__invert__(self: Self, Self: type)
%0 = xor i{=N} %self, -1
ret i{=N} %0
__abs__
__abs__(self: Self, Self: type)
__add__
@pure @commutative @associative @llvm
__add__(self: Self, other: UInt[N], Self: type)
%0 = add i{=N} %self, %other
ret i{=N} %0
__sub__
@pure @llvm
__sub__(self: Self, other: UInt[N], Self: type)
%0 = sub i{=N} %self, %other
ret i{=N} %0
__mul__
@pure @commutative @associative @distributive @llvm
__mul__(self: Self, other: UInt[N], Self: type)
%0 = mul i{=N} %self, %other
ret i{=N} %0
__floordiv__
__floordiv__(self: Self, other: UInt[N], Self: type)
__truediv__
__truediv__(self: Self, other: UInt[N], Self: type)
__mod__
__mod__(self: Self, other: UInt[N], Self: type)
__divmod__
__divmod__(self: Self, other: UInt[N], Self: type)
__lshift__
__lshift__(self: Self, other: UInt[N], Self: type)
__lshift__(self: Self, other: int, Self: type)
__rshift__
__rshift__(self: Self, other: UInt[N], Self: type)
__rshift__(self: Self, other: int, Self: type)
__eq__
@pure @llvm
__eq__(self: Self, other: UInt[N], Self: type)
%0 = icmp eq i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ne__
@pure @llvm
__ne__(self: Self, other: UInt[N], Self: type)
%0 = icmp ne i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__lt__
@pure @llvm
__lt__(self: Self, other: UInt[N], Self: type)
%0 = icmp ult i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__gt__
@pure @llvm
__gt__(self: Self, other: UInt[N], Self: type)
%0 = icmp ugt i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__le__
@pure @llvm
__le__(self: Self, other: UInt[N], Self: type)
%0 = icmp ule i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ge__
@pure @llvm
__ge__(self: Self, other: UInt[N], Self: type)
%0 = icmp uge i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__and__
@pure @commutative @associative @llvm
__and__(self: Self, other: UInt[N], Self: type)
%0 = and i{=N} %self, %other
ret i{=N} %0
__or__
@pure @commutative @associative @llvm
__or__(self: Self, other: UInt[N], Self: type)
%0 = or i{=N} %self, %other
ret i{=N} %0
__xor__
@pure @commutative @associative @llvm
__xor__(self: Self, other: UInt[N], Self: type)
%0 = xor i{=N} %self, %other
ret i{=N} %0
__pow__
__pow__(self: Self, exp: UInt[N], Self: type)
__pow__(self: Self, exp: Literal[int], Self: type)
__repr__
__repr__(self: Self, Self: type)
__match__
__match__(self: Self, obj: UInt[N], Self: type)
__round__
__round__(self: Self, ndigits = None, Self: type)
__atomic_xchg__
@nocapture @llvm
__atomic_xchg__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw xchg ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_add__
@nocapture @llvm
__atomic_add__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw add ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_sub__
@nocapture @llvm
__atomic_sub__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw sub ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_and__
@nocapture @llvm
__atomic_and__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw and ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_nand__
@nocapture @llvm
__atomic_nand__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw nand ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_or__
@nocapture @llvm
__atomic_or__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw or ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_xor__
@nocapture @llvm
__atomic_xor__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw xor ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_min__
@nocapture @llvm
__atomic_min__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw umin ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_max__
@nocapture @llvm
__atomic_max__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw umax ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp