package core:math/bits

Index

Types (0)

This section is empty.

Variables (0)

This section is empty.

Procedures (88)

Types

This section is empty.

Constants

I16_MAX ¶

I16_MAX :: 1 << 15 - 1

I16_MIN ¶

I16_MIN :: -1 << 15

I32_MAX ¶

I32_MAX :: 1 << 31 - 1

I32_MIN ¶

I32_MIN :: -1 << 31

I64_MAX ¶

I64_MAX :: 1 << 63 - 1

I64_MIN ¶

I64_MIN :: -1 << 63

I8_MAX ¶

I8_MAX :: 1 << 7 - 1

I8_MIN ¶

I8_MIN :: -1 << 7

U16_MAX ¶

U16_MAX :: 1 << 16 - 1

U16_MIN ¶

U16_MIN :: 0

U32_MAX ¶

U32_MAX :: 1 << 32 - 1

U32_MIN ¶

U32_MIN :: 0

U64_MAX ¶

U64_MAX :: 1 << 64 - 1

U64_MIN ¶

U64_MIN :: 0

U8_MAX ¶

U8_MAX :: 1 << 8 - 1

U8_MIN ¶

U8_MIN :: 0

Variables

This section is empty.

Procedures

add_u32 ¶

add_u32 :: proc "odin" (x, y, carry: u32) -> (sum, carry_out: u32) {…}

add_u64 ¶

add_u64 :: proc "odin" (x, y, carry: u64) -> (sum, carry_out: u64) {…}

add_uint ¶

add_uint :: proc "odin" (x, y, carry: uint) -> (sum, carry_out: uint) {…}

bitfield_extract_i128 ¶

bitfield_extract_i128 :: proc "odin" (value: i128, offset, bits: uint) -> i128 {…}

bitfield_extract_i16 ¶

bitfield_extract_i16 :: proc "odin" (value: i16, offset, bits: uint) -> i16 {…}

bitfield_extract_i32 ¶

bitfield_extract_i32 :: proc "odin" (value: i32, offset, bits: uint) -> i32 {…}

bitfield_extract_i64 ¶

bitfield_extract_i64 :: proc "odin" (value: i64, offset, bits: uint) -> i64 {…}

bitfield_extract_i8 ¶

bitfield_extract_i8 :: proc "odin" (value: i8, offset, bits: uint) -> i8 {…}

bitfield_extract_int ¶

bitfield_extract_int :: proc "odin" (value: int, offset, bits: uint) -> int {…}

bitfield_extract_u128 ¶

bitfield_extract_u128 :: proc "odin" (value: u128, offset, bits: uint) -> u128 {…}

bitfield_extract_u16 ¶

bitfield_extract_u16 :: proc "odin" (value: u16, offset, bits: uint) -> u16 {…}

bitfield_extract_u32 ¶

bitfield_extract_u32 :: proc "odin" (value: u32, offset, bits: uint) -> u32 {…}

bitfield_extract_u64 ¶

bitfield_extract_u64 :: proc "odin" (value: u64, offset, bits: uint) -> u64 {…}

bitfield_extract_u8 ¶

bitfield_extract_u8 :: proc "odin" (value: u8, offset, bits: uint) -> u8 {…}

bitfield_extract_uint ¶

bitfield_extract_uint :: proc "odin" (value: uint, offset, bits: uint) -> uint {…}

bitfield_insert_i128 ¶

bitfield_insert_i128 :: proc "odin" (base, insert: i128, offset, bits: uint) -> i128 {…}

bitfield_insert_i16 ¶

bitfield_insert_i16 :: proc "odin" (base, insert: i16, offset, bits: uint) -> i16 {…}

bitfield_insert_i32 ¶

bitfield_insert_i32 :: proc "odin" (base, insert: i32, offset, bits: uint) -> i32 {…}

bitfield_insert_i64 ¶

bitfield_insert_i64 :: proc "odin" (base, insert: i64, offset, bits: uint) -> i64 {…}

bitfield_insert_i8 ¶

bitfield_insert_i8 :: proc "odin" (base, insert: i8, offset, bits: uint) -> i8 {…}

bitfield_insert_int ¶

bitfield_insert_int :: proc "odin" (base, insert: int, offset, bits: uint) -> int {…}

bitfield_insert_u128 ¶

bitfield_insert_u128 :: proc "odin" (base, insert: u128, offset, bits: uint) -> u128 {…}

bitfield_insert_u16 ¶

bitfield_insert_u16 :: proc "odin" (base, insert: u16, offset, bits: uint) -> u16 {…}

bitfield_insert_u32 ¶

bitfield_insert_u32 :: proc "odin" (base, insert: u32, offset, bits: uint) -> u32 {…}

bitfield_insert_u64 ¶

bitfield_insert_u64 :: proc "odin" (base, insert: u64, offset, bits: uint) -> u64 {…}

bitfield_insert_u8 ¶

bitfield_insert_u8 :: proc "odin" (base, insert: u8, offset, bits: uint) -> u8 {…}

bitfield_insert_uint ¶

bitfield_insert_uint :: proc "odin" (base, insert: uint, offset, bits: uint) -> uint {…}

byte_swap ¶

byte_swap :: intrinsics.byte_swap

count_leading_zeros ¶

count_leading_zeros :: intrinsics.count_leading_zeros

count_ones ¶

count_ones :: intrinsics.count_ones

count_trailing_zeros ¶

count_trailing_zeros :: intrinsics.count_trailing_zeros

count_zeros ¶

count_zeros :: intrinsics.count_zeros

div_u32 ¶

div_u32 :: proc "odin" (x, y, carry: u32) -> (sum, carry_out: u32) {…}

div_u64 ¶

div_u64 :: proc "odin" (x, y, carry: u64) -> (sum, carry_out: u64) {…}

div_uint ¶

div_uint :: proc "odin" (x, y, carry: uint) -> (sum, carry_out: uint) {…}

from_be_u16 ¶

from_be_u16 :: proc "odin" (value: u16) -> u16 {…}

from_be_u32 ¶

from_be_u32 :: proc "odin" (value: u32) -> u32 {…}

from_be_u64 ¶

from_be_u64 :: proc "odin" (i: u64) -> u64 {…}

from_be_u8 ¶

from_be_u8 :: proc "odin" (x: u8) -> u8 {…}

from_be_uint ¶

from_be_uint :: proc "odin" (i: uint) -> uint {…}

from_le_u16 ¶

from_le_u16 :: proc "odin" (value: u16) -> u16 {…}

from_le_u32 ¶

from_le_u32 :: proc "odin" (value: u32) -> u32 {…}

from_le_u64 ¶

from_le_u64 :: proc "odin" (i: u64) -> u64 {…}

from_le_u8 ¶

from_le_u8 :: proc "odin" (x: u8) -> u8 {…}

from_le_uint ¶

from_le_uint :: proc "odin" (i: uint) -> uint {…}

is_power_of_two_i16 ¶

is_power_of_two_i16 :: proc "odin" (i: i16) -> bool {…}

is_power_of_two_i32 ¶

is_power_of_two_i32 :: proc "odin" (i: i32) -> bool {…}

is_power_of_two_i64 ¶

is_power_of_two_i64 :: proc "odin" (i: i64) -> bool {…}

is_power_of_two_i8 ¶

is_power_of_two_i8 :: proc "odin" (i: i8) -> bool {…}

is_power_of_two_int ¶

is_power_of_two_int :: proc "odin" (a: int) -> bool {…}

is_power_of_two_u16 ¶

is_power_of_two_u16 :: proc "odin" (i: u16) -> bool {…}

is_power_of_two_u32 ¶

is_power_of_two_u32 :: proc "odin" (i: u32) -> bool {…}

is_power_of_two_u64 ¶

is_power_of_two_u64 :: proc "odin" (i: u64) -> bool {…}

is_power_of_two_u8 ¶

is_power_of_two_u8 :: proc "odin" (x: u8) -> bool {…}

is_power_of_two_uint ¶

is_power_of_two_uint :: proc "odin" (i: uint) -> bool {…}

leading_zeros ¶

leading_zeros :: intrinsics.count_leading_zeros

len_u16 ¶

len_u16 :: proc "odin" (x: u16) -> (n: int) {…}

len_u32 ¶

len_u32 :: proc "odin" (x: u32) -> (n: int) {…}

len_u64 ¶

len_u64 :: proc "odin" (x: u64) -> (n: int) {…}

len_u8 ¶

len_u8 :: proc "odin" (x: u8) -> int {…}

len_uint ¶

len_uint :: proc "odin" (x: uint) -> (n: int) {…}

log2 ¶

log2 :: proc "odin" (value: $) -> $ {…}

mul_u32 ¶

mul_u32 :: proc "odin" (x, y: u32) -> (hi, lo: u32) {…}

mul_u64 ¶

mul_u64 :: proc "odin" (x, y: u64) -> (hi, lo: u64) {…}

mul_uint ¶

mul_uint :: proc "odin" (x, y: uint) -> (hi, lo: uint) {…}

overflowing_add ¶

overflowing_add :: intrinsics.overflow_add

overflowing_mul ¶

overflowing_mul :: intrinsics.overflow_mul

overflowing_sub ¶

overflowing_sub :: intrinsics.overflow_sub

reverse_bits ¶

reverse_bits :: intrinsics.reverse_bits

rotate_left ¶

rotate_left :: proc "odin" (x: uint, k: int) -> uint {…}

rotate_left16 ¶

rotate_left16 :: proc "odin" (x: u16, k: int) -> u16 {…}

rotate_left32 ¶

rotate_left32 :: proc "odin" (x: u32, k: int) -> u32 {…}

rotate_left64 ¶

rotate_left64 :: proc "odin" (x: u64, k: int) -> u64 {…}

rotate_left8 ¶

rotate_left8 :: proc "odin" (x: u8, k: int) -> u8 {…}

sub_u32 ¶

sub_u32 :: proc "odin" (x, y, carry: u32) -> (sum, carry_out: u32) {…}

sub_u64 ¶

sub_u64 :: proc "odin" (x, y, carry: u64) -> (sum, carry_out: u64) {…}

sub_uint ¶

sub_uint :: proc "odin" (x, y, carry: uint) -> (sum, carry_out: uint) {…}

to_be_u16 ¶

to_be_u16 :: proc "odin" (value: u16) -> u16 {…}

to_be_u32 ¶

to_be_u32 :: proc "odin" (value: u32) -> u32 {…}

to_be_u64 ¶

to_be_u64 :: proc "odin" (i: u64) -> u64 {…}

to_be_u8 ¶

to_be_u8 :: proc "odin" (x: u8) -> u8 {…}

to_be_uint ¶

to_be_uint :: proc "odin" (i: uint) -> uint {…}

to_le_u16 ¶

to_le_u16 :: proc "odin" (value: u16) -> u16 {…}

to_le_u32 ¶

to_le_u32 :: proc "odin" (value: u32) -> u32 {…}

to_le_u64 ¶

to_le_u64 :: proc "odin" (i: u64) -> u64 {…}

to_le_u8 ¶

to_le_u8 :: proc "odin" (x: u8) -> u8 {…}

to_le_uint ¶

to_le_uint :: proc "odin" (i: uint) -> uint {…}

trailing_zeros ¶

trailing_zeros :: intrinsics.count_trailing_zeros

Procedure Groups

len ¶

len :: proc{
	len_u8,
	len_u16,
	len_u32,
	len_u64,
	len_uint,
}
 

returns the minimum number of bits required to represent x

Source Files

Generation Information

Generated with odin version dev-2022-12 (vendor "odin") Windows_amd64 @ 2022-12-06 21:08:55.075897700 +0000 UTC