parallel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package parallel splits row-oriented pixel work across goroutines. Every split partitions the output into disjoint, fixed row bands so results never depend on goroutine scheduling order, which is what keeps rendering deterministic across runs.

Index

Constants

View Source
const MinRowsPerGoroutine = 16

MinRowsPerGoroutine is the smallest band worth spawning a goroutine for. Below this the coordination overhead outweighs the parallelism

Variables

This section is empty.

Functions

func Rows

func Rows(height int, fn func(lo, hi int))

Rows runs fn over contiguous row bands covering [0,height), in parallel when the work is large enough. fn receives a half-open range [lo,hi) and must only write rows inside that range so the bands stay independent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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