cachescale

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Identity = Ratio{1, 1}

Identity doesn't alter the cache sizes

Functions

This section is empty.

Types

type Func

type Func interface {
	I(int) int
	I32(int32) int32
	I64(int64) int64
	U(uint) uint
	U32(uint32) uint32
	U64(uint64) uint64
	F32(float32) float32
	F64(float64) float64
	Events(v idx.Event) idx.Event
	Blocks(v idx.Block) idx.Block
	Frames(v idx.Frame) idx.Frame
}

type Ratio

type Ratio struct {
	Base   uint64
	Target uint64
}

Ratio alters the cache sizes proportionally to a ratio

func (Ratio) Blocks

func (r Ratio) Blocks(v idx.Block) idx.Block

func (Ratio) Events

func (r Ratio) Events(v idx.Event) idx.Event

func (Ratio) F32

func (r Ratio) F32(v float32) float32

func (Ratio) F64

func (r Ratio) F64(v float64) float64

func (Ratio) Frames

func (r Ratio) Frames(v idx.Frame) idx.Frame

func (Ratio) I

func (r Ratio) I(v int) int

func (Ratio) I32

func (r Ratio) I32(v int32) int32

func (Ratio) I64

func (r Ratio) I64(v int64) int64

func (Ratio) U

func (r Ratio) U(v uint) uint

func (Ratio) U32

func (r Ratio) U32(v uint32) uint32

func (Ratio) U64

func (r Ratio) U64(v uint64) uint64

Jump to

Keyboard shortcuts

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