Algorithms

package
v0.0.0-...-01e772a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2021 License: MulanPSL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Align

func Align(bytes int64) int64

Align 根据内存页面大小进行对齐

func AlignOfMemory

func AlignOfMemory(bytes int64, align int16) int64

AlignOfMemory 根据指定长度进行对齐计算

func SetBitWrapper

func SetBitWrapper(flag BitFlag, bitValue bool) func(valueType ValueType) ValueType

SetBitWrapper SetBit包装器

Types

type BitFlag

type BitFlag uint8
const (
	First    BitFlag = iota //第1位
	Second                  //第2位
	Third                   //第3位
	Fourth                  //第4位
	Fifth                   //第5位
	Sixth                   //第6位
	Seventh                 //第7位
	Eighth                  //第8位
	MaxValue                //
)

type ValueType

type ValueType uint8

func ClrBit

func ClrBit(value ValueType, flag BitFlag) ValueType

ClrBit 清理Bit值

func SetBit

func SetBit(value ValueType, flag BitFlag, bitValue bool) ValueType

SetBit 设置位值

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL