conformance

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: GPL-3.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const WideThreads = 65535*64 + 4096

WideThreads is the Wide entry's thread count: past the thread groups an API lets one dispatch issue per dimension (65535 of the index form's 64), so a backend with that limit issues it in two pieces.

Variables

View Source
var Source embed.FS

Source is this package's Go source for the GPU renderer's compile stage.

The files are named one by one: the compile stage takes everything Source holds, so this file and the package's tests must stay out of it. TestEmbeddedSource holds the list against the directory.

Functions

func AddWords

func AddWords(rs *compute.RoundState, p *Probe, t, n, g uint32)

AddWords checks Add on the fragment pool, a group entry: every thread reserves a range of the group's stream, four words from the group's counter, and marks each word of its range, so a device returning a prior twice or losing an add leaves a word unmarked or the counter short. The ranges land in any order, marked with the same value, so the Go execution as one thread is the reference for a device group of many. The prior is used for addressing only. Thread 0 records the group's size n beside the counter, so a test holds the counter and the ranges to the threads the device ran.

func Bytes

func Bytes(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Bytes checks the byte helpers: big-endian reads that straddle the end of the buffer and wrap, and writes in the thread's private region read back through the same helpers.

func Control

func Control(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Control checks the loop forms, range over an integer with and without a key, break and continue, switch, method calls, multiple results, and named results.

func Convert

func Convert(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Convert checks narrowing and widening conversions: truncation, sign extension, and zero extension between every width.

func DivRem

func DivRem(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

DivRem checks truncating division and remainder with negative operands at 8, 16, 32, and 64 bits, signed and unsigned. The overflowing signed case (minimum divided by minus one) is excluded, as the subset requires of authors.

func DoubleSegments

func DoubleSegments(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, x0, x1 int32)

DoubleSegments is Segments dispatched at twice its segment, the record a backend giving each thread two units sends, so the dots record the doubled segment length.

func Group

func Group(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, t, n, g uint32)

Group is a group entry and checks the wrapper contract for a group and the group barrier: each thread receives its index t in the group, the group's size n, and the group's index g, with the group's params. The threads fill the group's region of mem by stride, the barrier orders the fill ahead of the read, and thread 0 sums the region into the group's output with the group's G. The result is the same for any group size, so the Go execution as one thread per group is the reference for a device group of many.

func Int64

func Int64(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Int64 checks 64-bit arithmetic and comparisons on values assembled from two words.

func Layout

func Layout(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Layout checks that the params struct read on the GPU has the fields where the Go side put them, the bools included.

func RaiseWords

func RaiseWords(rs *compute.RoundState, p *Probe, t, n, g uint32)

RaiseWords checks Raise on the order stamps, a group entry: the group's threads raise the group's eight words by stride with values that peak in the middle of the range, so no word's greatest value is its last offer, and each word must end at the greatest value any thread offered it, which is the Go execution's result as one thread. A device applying a lesser value after a greater one, or losing a raise under contention, leaves a word short.

func Segments

func Segments(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, x0, x1 int32)

Segments is a span entry and checks the wrapper contract: each thread receives a segment [x0, x1) clamped at the bound, and the row's params, whose G field is the row. Each dot records its address, the row's A, and the segment length it was part of.

func Shifts

func Shifts(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Shifts checks arithmetic and logical shifts at every width with counts below the width.

func ShortCircuit

func ShortCircuit(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

ShortCircuit checks that a right operand with a call runs only when the left operand leaves the result undecided.

func SwapChain

func SwapChain(rs *compute.RoundState, p *Probe, t, n, g uint32)

SwapChain checks Swap on the fragment list heads, a group entry: every thread swaps its own number into the group's head word and stores the prior in its slot, so the head and the slots chain every thread of the group exactly once, in the order the device ran the swaps. A test walks the chain; a device swapping non-atomically loses threads from it. Thread 0 records the group's size n beside the head, so a test walks the chain against the threads the device ran.

func Tables

func Tables(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Tables checks lookup table indexing.

func VariableArray

func VariableArray(v *Views, out compute.LineRecords, p *Probe, i uint32)

VariableArray checks the variable-index read from an array of variable-length buffers, the form the composite's layer read takes: even threads read the first buffer and odd threads the second, each at its half index masked with its own length. The two buffers hold different data and lengths, and the value carries both lengths, so a backend that reads the wrong buffer for an index or binds one buffer's length for the other cannot match the Go execution.

func VariableBytes

func VariableBytes(in, out compute.LineColor, p *Probe, i uint32)

VariableBytes checks the byte accessors on two independent variable-length byte bindings, one thread per output byte: the output is twice the input's length, so the threads past the input's end read it at the address masked with its own length, and every thread writes its byte at its address plus the output's length, which lands on its own byte only through a mask of the output's length. The value carries both lengths, so a backend that binds one buffer's length for another, a fixed size, or a word count where the bytes belong cannot match the Go execution. Neighboring threads write neighboring bytes of one word, which holds a backend whose byte store is a word update to storing its lane alone.

func VariableHalfwords

func VariableHalfwords(in, out compute.VDP1FB, p *Probe, i uint32)

VariableHalfwords checks the 16-bit accessors on two independent variable-length byte bindings, one thread per output halfword: the output is twice the input's length, every access is at an odd address, so its two bytes straddle a halfword and every other one a word, and thread i reads the input at 2i+1, past its end for the upper half of the threads, and writes the output's bytes 2i+1 and 2i+2 through the address plus the output's length, the last thread straddling the output's end onto byte zero. No two threads write one byte. The value carries both lengths, so a backend that binds one buffer's length for another, a fixed size, or a word count where the bytes belong cannot match the Go execution.

func VariableWords

func VariableWords(in, out compute.LineRecords, p *Probe, i uint32)

VariableWords checks two independent variable-length bindings: the output carries both lengths, so a backend that binds one buffer's length for another cannot match Go execution. The output is twice the input's length, so the threads past the input's end read it at the index masked with its own length, which a backend supplying the wrong length or a fixed size fails. The last statement reads and writes back the thread's own word.

func Wide

func Wide(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Wide is an index entry dispatched wider than an API's thread group limit, and checks that a backend issuing it in pieces gives every thread its index across the whole grid: a thread of the last 4096 writes its index at its place in the tail, so a piece whose base were lost or wrong leaves the tail unwritten or misplaced.

func Words

func Words(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Words checks word reads and writes by index: an int32 index, a compound assignment and an increment on a buffer word, and the min and max builtins over the words read.

func Wrap8

func Wrap8(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Wrap8 checks 8-bit wrap on add, subtract, and multiply, signed and unsigned, at stores, comparisons, division, remainder, shifts, and conversions of unmasked intermediates.

func Wrap16

func Wrap16(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Wrap16 is Wrap8 at 16 bits.

func Wrap32

func Wrap32(in compute.Layer, mem *compute.VDP2VRAM, out compute.Layer, p *Probe, i uint32)

Wrap32 checks that signed arithmetic past the 32-bit range wraps as Go defines it: the sums, differences, products, negations, and left shifts of int32 extremes, a 64-bit product past the long range, a narrow product chain that leaves the register's range before it is masked, and the comparisons a compiler may fold when it assumes signed arithmetic never overflows.

Types

type Inner

type Inner struct {
	E int32
	F uint64
}

Inner is the probe's nested struct.

type Probe

type Probe struct {
	A uint32
	B int64
	C [3]uint32
	D Inner
	G uint32
	H bool
	K bool
	L uint32
}

Probe is the struct layout probe's params: mixed widths, an array, a nested struct, and bools between words, laid out by the compile stage's rule and by the Go compiler, which must agree.

type Views

type Views struct {
	In [2]compute.LineRecords
}

Views is a buffer group of two variable-length word buffers, the array VariableArray reads by a variable index.

Jump to

Keyboard shortcuts

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