package mem
import "github.com/segmentio/asm/mem"
Index ¶
- func Blend(dst []byte, src []byte) int
- func ContainsByte(haystack []byte, needle byte) bool
- func Copy(dst []byte, src []byte) int
- func CountPair(b []byte, n int) int
- func IndexPair(b []byte, n int) int
- func Mask(dst []byte, src []byte) int
Functions ¶
func Blend ¶
Blend copies the one-bits of src to dst, returning the number of bytes written.
func ContainsByte ¶
func Copy ¶
Copy copies src to dst, returning the number of bytes written.
func CountPair ¶
CountPair returns the byte index of the first pair of two equal elements of size n.
If no pairs of equal elements were found, len(b) is returned.
func IndexPair ¶
IndexPair returns the byte index of the first pair of two equal elements of size n.
If no pairs of equal elements were found, -1 is returned.
func Mask ¶
Mask set bits of dst to zero and copies the one-bits of src to dst, returning the number of bytes written.
Source Files ¶
blend.go blend_amd64.go contains.go contains_amd64.go copy.go copy_amd64.go count_pair.go count_pair_amd64.go index_pair.go index_pair_amd64.go mask.go mask_amd64.go mem.go
- Version
- v1.2.0 (latest)
- Published
- Apr 27, 2022
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 10 hours ago –
Tools for package owners.