Package-Level Type Names (only one, which is unexported)
/* sort exporteds by: | */
Type Parameters:
T: any unsafeBuf allows for appending to a buffer without bounds-checks or branches.base*Tnint addIf appends a value to the buffer if the predicate is true.
addIf speculatively writes to the next index of the buffer, so the caller
must be certain that such a write will still be in-bounds with respect
to the buffer's true capacity. check performs a bounds check on speculative writes into the buffer.
Calling this shortly after a series of addIf calls is important to
catch any misuse as fast as possible. Separating the bounds check from
the append is more efficient, but one check to cover several appends is
still efficient and much more memory safe.
func newUnsafeBuf[T](base *T) unsafeBuf[T]
Package-Level Functions (total 13, in which 10 are exported)
ExpandAVX512 expands each bit in packed into f consecutive bits in unpacked,
where f is the word size of objects in sizeClass.
This is a testing entrypoint to the expanders used by scanSpanPacked*.
ExpandReference is a reference implementation of an expander function
that translates object mark bits into a bitmap of one bit per word of
marked object, assuming the object is of the provided size class.
FilterNil packs non-nil (non-zero) values in bufp together
at the beginning of bufp, returning the length of the
packed buffer. It treats bufp as an array of size n.
FilterNilAVX512 is the simd version of FilterNil,
it is implemented in assembly.
ScanSpanPackedGo is an optimized pure Go implementation of ScanSpanPacked.
ScanSpanPackedReference is the reference implementation of ScanScanPacked. It prioritizes clarity over performance.
Concretely, ScanScanPacked functions read pointers from mem, assumed to be gc.PageSize-aligned and gc.PageSize in size,
and writes them to bufp, which is large enough to guarantee that even if pointer-word of mem is a pointer, it will fit.
Therefore bufp, is always at least gc.PageSize in size.
ScanSpanPacked is supposed to identify pointers by first filtering words by objMarks, where each bit of the mask
represents gc.SizeClassToSize[sizeClass] bytes of memory, and then filtering again by the bits in ptrMask.
gcExpandersAVX512 is the PCs of expander functions. These cannot be called directly
as they don't follow the Go ABI, but you can use this to check if a given
expander PC is 0.
It is defined in assembly.
The pages are generated with Goldsv0.8.4. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.