package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Sep 9, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Size returns T's alignment in bytes.
Size returns T's size in bits.
PadSlice appends zeros to buf until its length is a multiple of align.
func Padding[T Int](v, align T) T
Padding returns RoundUp(v, align) - v.
func RoundDown[T Int](v, align T) T
RoundDown rounds v down to a power of two.
func RoundUp[T Int](v, align T) T
RoundDown rounds v up to a power of two.
Size returns T's size in bytes.
type Layout struct {
Size, Align int
}
Layout is the layout of some type.
Of returns the size and alignment of a given type.
Max returns a layout whose size and alignment are both as large as the
largest among l and that.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.