downres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Overview

Package downres provides a system for computing multi-scale 3d arrays given mutations. Two workflows are provided: (1) mutation-based with on-the-fly downres operations activated by the end of a mutation, and (2) larger ingestions where it is not possible to retain all changed data in memory. #2 is TODO.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockOnUpdating

func BlockOnUpdating(uuid dvid.UUID, name dvid.InstanceName) error

BlockOnUpdating blocks until the given data is not updating from any normal updates or also downres operations. Primarily used during testing.

Types

type BlockMap

type BlockMap map[dvid.IZYXString]interface{}

type Downreser

type Downreser interface {
	Updater

	DataName() dvid.InstanceName
	GetMaxDownresLevel() uint8

	// StoreDownres computes and stores the down-res for the given blocks, returning
	// the computed down-res blocks at 1/2 resolution.
	StoreDownres(v dvid.VersionID, hiresScale uint8, hires BlockMap) (BlockMap, error)
}

type Mutation

type Mutation struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Mutation is a stash of changes that will be handled in down-resolution scaling.

func NewMutation

func NewMutation(d Downreser, v dvid.VersionID, mutID uint64) *Mutation

NewMutation returns a new Mutation for stashing changes.

func (*Mutation) BlockMutated

func (m *Mutation) BlockMutated(bcoord dvid.IZYXString, block interface{}) error

BlockMutated caches mutations at the highest resolution (scale 0)

func (*Mutation) Execute

func (m *Mutation) Execute() error

Execute computes lower-res scales for all altered blocks in a mutation.

func (*Mutation) MutationID

func (m *Mutation) MutationID() uint64

MutationID returns the mutation ID associated with this mutation.

type Updater

type Updater interface {
	StartScaleUpdate(scale uint8)
	StopScaleUpdate(scale uint8)
	ScaleUpdating(scale uint8) bool
	AnyScaleUpdating() bool
}

Jump to

Keyboard shortcuts

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