...

Package teak

import "teak"
Overview
Index
Subdirectories

Overview ▾

package teak provides optimized low-level functions specific to the Reconfigure.io compiler

func SmashI16

func SmashI16(v int16) [16]bool

SmashI16 takes an int16 and returns a boolean array where the 0 index represents the least significant bit.

SmashI16(1)[0] == 1

func SmashI32

func SmashI32(v int32) [32]bool

SmashI32 takes an int32 and returns a boolean array where the 0 index represents the least significant bit.

SmashI32(1)[0] == 1

func SmashI64

func SmashI64(v int64) [64]bool

SmashI64 takes an int64 and returns a boolean array where the 0 index represents the least significant bit.

SmashI64(1)[0] == 1

func SmashI8

func SmashI8(v int8) [8]bool

SmashI8 takes an int8 and returns a boolean array where the 0 index represents the least significant bit.

SmashI8(1)[0] == 1

func SmashU16

func SmashU16(v uint16) [16]bool

SmashU16 takes a uint16 and returns a boolean array where the 0 index represents the least significant bit.

SmashU16(1)[0] == 1

func SmashU32

func SmashU32(v uint32) [32]bool

SmashU32 takes a uint32 and returns a boolean array where the 0 index represents the least significant bit.

SmashU32(1)[0] == 1

func SmashU64

func SmashU64(v uint64) [64]bool

SmashU64 takes a uint64 and returns a boolean array where the 0 index represents the least significant bit.

SmashU64(1)[0] == 1

func SmashU8

func SmashU8(v byte) [8]bool

SmashU8 takes a byte and returns a boolean array where the 0 index represents the least significant bit.

SmashU8(1)[0] == 1

func UnsmashI16

func UnsmashI16(bits [16]bool) int16

UnsmashI16 takes a boolean array where the 0 index represents the least significant bit and returns an int16

var arr [16]bool
arr[0] = 1
UnsmashI16(arr) == 1

func UnsmashI32

func UnsmashI32(bits [32]bool) int32

UnsmashI32 takes a boolean array where the 0 index represents the least significant bit and returns an int32

var arr [32]bool
arr[0] = 1
UnsmashI32(arr) == 1

func UnsmashI64

func UnsmashI64(bits [64]bool) int64

UnsmashI64 takes a boolean array where the 0 index represents the least significant bit and returns an int64

var arr [64]bool
arr[0] = 1
UnsmashI64(arr) == 1

func UnsmashI8

func UnsmashI8(bits [8]bool) int8

UnsmashI8 takes a boolean array where the 0 index represents the least significant bit and returns an int8

var arr [8]bool
arr[0] = 1
UnsmashI8(arr) == 1

func UnsmashU16

func UnsmashU16(bits [16]bool) uint16

UnsmashU16 takes a boolean array where the 0 index represents the least significant bit and returns an uint16

var arr [16]bool
arr[0] = 1
UnsmashU16(arr) == 1

func UnsmashU32

func UnsmashU32(bits [32]bool) uint32

UnsmashU32 takes a boolean array where the 0 index represents the least significant bit and returns a uint32

var arr [32]bool
arr[0] = 1
UnsmashU32(arr) == 1

func UnsmashU64

func UnsmashU64(bits [64]bool) uint64

UnsmashU64 takes a boolean array where the 0 index represents the least significant bit and returns a uint64

var arr [64]bool
arr[0] = 1
UnsmashU64(arr) == 1

func UnsmashU8

func UnsmashU8(bits [8]bool) uint8

UnsmashU8 takes a boolean array where the 0 index represents the least significant bit and returns a uint8

var arr [8]bool
arr[0] = 1
UnsmashU8(arr) == 1

Subdirectories

Name Synopsis
..
generate