Table of Contents

Class FenceCostModel

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Per-stage cost coefficients used by the fence work-planner to size chunks. Each value scales the corresponding work-hint (migration count, dirty-cluster count, shadow-entry count, spatial-entry count) into a unitless cost figure that the planner bin-packs across workers.

Unit: 1 cost unit ≈ 1 µs of single-worker wall time. Default is calibrated against AntHill traces (migration ≈ 33 µs/entity, AABB recompute ≈ 2.4 µs/cluster). Shadow / Spatial coefficients are placeholders pending measurement. Other workload profiles (shadow-heavy SV writes, sparse spatial) should override these via FenceCostModel; the defaults will load-balance against ratios that don't match your workload, leading to less optimal chunk packing.

public sealed record FenceCostModel : IEquatable<FenceCostModel>
Inheritance
FenceCostModel
Implements
Inherited Members

Constructors

FenceCostModel(float, float, float, float)

Per-stage cost coefficients used by the fence work-planner to size chunks. Each value scales the corresponding work-hint (migration count, dirty-cluster count, shadow-entry count, spatial-entry count) into a unitless cost figure that the planner bin-packs across workers.

Unit: 1 cost unit ≈ 1 µs of single-worker wall time. Default is calibrated against AntHill traces (migration ≈ 33 µs/entity, AABB recompute ≈ 2.4 µs/cluster). Shadow / Spatial coefficients are placeholders pending measurement. Other workload profiles (shadow-heavy SV writes, sparse spatial) should override these via FenceCostModel; the defaults will load-balance against ratios that don't match your workload, leading to less optimal chunk packing.

public FenceCostModel(float MigrationCost, float AabbCost, float ShadowCost, float SpatialCost)

Parameters

MigrationCost float
AabbCost float
ShadowCost float
SpatialCost float

Fields

Default

Default coefficients, calibrated against AntHill traces: migration ≈ 33.3 µs/entity, AABB recompute ≈ 2.4 µs/cluster. Shadow and Spatial coefficients are placeholders (1.0) pending measurement — override them for shadow-heavy or spatial workloads.

public static readonly FenceCostModel Default

Field Value

FenceCostModel

Properties

AabbCost

public float AabbCost { get; init; }

Property Value

float

MigrationCost

public float MigrationCost { get; init; }

Property Value

float

ShadowCost

public float ShadowCost { get; init; }

Property Value

float

SpatialCost

public float SpatialCost { get; init; }

Property Value

float

Methods

Deconstruct(out float, out float, out float, out float)

public void Deconstruct(out float MigrationCost, out float AabbCost, out float ShadowCost, out float SpatialCost)

Parameters

MigrationCost float
AabbCost float
ShadowCost float
SpatialCost float

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(FenceCostModel?)

public bool Equals(FenceCostModel? other)

Parameters

other FenceCostModel

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(FenceCostModel?, FenceCostModel?)

public static bool operator ==(FenceCostModel? left, FenceCostModel? right)

Parameters

left FenceCostModel
right FenceCostModel

Returns

bool

operator !=(FenceCostModel?, FenceCostModel?)

public static bool operator !=(FenceCostModel? left, FenceCostModel? right)

Parameters

left FenceCostModel
right FenceCostModel

Returns

bool