lzcnt

package
v0.0.0-...-3878f85 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

THESE PACKAGES ARE FOR DEMONSTRATION PURPOSES ONLY!

THEY DO NOT NOT CONTAIN WORKING INTRINSICS!

See https://github.com/klauspost/intrinsics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LzcntU32

func LzcntU32(a uint32) uint32

LzcntU32: Count the number of leading zero bits in unsigned 32-bit integer 'a', and return that count in 'dst'.

tmp := 31
dst := 0
DO WHILE (tmp >= 0 AND a[tmp] = 0)
	tmp := tmp - 1
	dst := dst + 1
OD

Instruction: 'LZCNT'. Intrinsic: '_lzcnt_u32'. Requires LZCNT.

func LzcntU64

func LzcntU64(a uint64) uint64

LzcntU64: Count the number of leading zero bits in unsigned 64-bit integer 'a', and return that count in 'dst'.

tmp := 63
dst := 0
DO WHILE (tmp >= 0 AND a[tmp] = 0)
	tmp := tmp - 1
	dst := dst + 1
OD

Instruction: 'LZCNT'. Intrinsic: '_lzcnt_u64'. Requires LZCNT.

Types

This section is empty.

Jump to

Keyboard shortcuts

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