measure(step2c): setup once per chunk, still 1.6 us/sample -- exact per-sample density misses 600 ms

Editor-only, default off. 259^3 ring split into 1,000 aligned 32^3 chunks; cache/index builds
bounded by chunks (948 room/SDF caches, 800 active-op lists, 8,532 index tables); 800 block setups
+ 201,243 scalar fallback points (1.16%); no per-point GetDensityAt on supported routes.
Six workers: live 7.07 s wall / 1.678 us per sample; prepared 7.92 s / 1.595 us.
Candidate visits 21.2 -> 15.8 per sample, evaluations 6.31 -> 5.75; room / tunnel / tunnel-core
evaluations unchanged (48.1 M / 5.0 M / 38.4 M for 17.4 M samples). Passage evals 18.1 M -> 8.4 M.
Exact: 0 Q16/sign disagreements, five seeds, same hash on 1 and 6 workers, reach shrink caught.
Luna's verdict: 600 ms is not reachable while every lattice point evaluates the exact current
density; 27.7 worker-CPU seconds need >= 7.7x less work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-09-30 04:18:44 +02:00
1 parent fd9f809c1c
commit 43c11ccaa8
9 files changed
+484 -143

No files matched your search

@@ -18,33 +18,79 @@ namespace VoxelForgeRegionEval
int32 ObservedWorkerThreads = 0;
int64 SampleCount = 0;
int64 EvaluatedSamples = 0;
int64 BrickCount = 0;
int64 RegionCount = 0;
int64 FallbackSamples = 0;
uint64 GeneralPathEntries = 0;
uint64 SupportedBlockSetupEntries = 0;
double FallbackShare = 0.0;
double GeneralPathEntriesPerSample = 0.0;
double WallSeconds = 0.0;
double WorkerCpuSeconds = 0.0;
double NanosecondsPerSample = 0.0;
bool bWorkerCpuFromOsThreadTimes = false;
bool bBrickProgram = false;
bool bRegionProgram = false;
bool bHasWholeRunCounters = false;
uint64 QuantizedHash = 0;
uint64 RawFloatHash = 0;
uint64 SaturatedSamples = 0;
uint64 NonFiniteSamples = 0;
uint64 SdfCacheBuilds = 0;
uint64 ActiveOpListBuilds = 0;
uint64 BroadPhaseIndexBuilds = 0;
uint64 SdfSpatialIndexBuilds = 0;
uint64 SdfBrickIndexBuilds = 0;
uint64 RoomCandidateVisits = 0;
uint64 RoomEvaluations = 0;
uint64 TunnelCandidateVisits = 0;
uint64 TunnelEvaluations = 0;
uint64 TunnelCoreCandidateVisits = 0;
uint64 TunnelCoreEvaluations = 0;
uint64 PassageCandidateVisits = 0;
uint64 PassageEvaluations = 0;
uint64 TotalCandidateVisits = 0;
uint64 TotalCandidateEvaluations = 0;
double CandidateVisitsPerSample = 0.0;
double CandidateEvaluationsPerSample = 0.0;
double GetDensityAtNsPerSample = 0.0;
double OperatorBlockNsPerSample = 0.0;
double RoomGraphSourceNsPerSample = 0.0;
double RoomGraphBuildNsPerSample = 0.0;
double RoomGraphSdfNsPerSample = 0.0;
double FusedEvaluatorNsPerSample = 0.0;
double TunnelCoreSdfNsPerSample = 0.0;
double TunnelCoreWorldNsPerSample = 0.0;
double TunnelCorePostsNsPerSample = 0.0;
double PassageModifierNsPerSample = 0.0;
double PassageStructuralPostsNsPerSample = 0.0;
double PassageFloorNsPerSample = 0.0;
double StructuralPostsNsPerSample = 0.0;
double DensityPrologueNsPerSample = 0.0;
double DensityCoreNsPerSample = 0.0;
double DisturbancesNsPerSample = 0.0;
double DensityBoundarySealNsPerSample = 0.0;
double DiffLayerNsPerSample = 0.0;
double DensityTailNsPerSample = 0.0;
};
struct FCandidateVisits
{
int64 SampleCount = 0;
uint64 Room = 0;
uint64 RoomEvaluated = 0;
uint64 Tunnel = 0;
uint64 TunnelEvaluated = 0;
uint64 TunnelCore = 0;
uint64 TunnelCoreEvaluated = 0;
uint64 Passage = 0;
uint64 PassageEvaluated = 0;
uint64 TunnelCacheLookups = 0;
uint64 TunnelCacheHits = 0;
uint64 TunnelCacheMisses = 0;
uint64 SdfCacheBuilds = 0;
uint64 Total = 0;
uint64 TotalEvaluated = 0;
double PerSample = 0.0;
double EvaluatedPerSample = 0.0;
uint32 AttributionSampleInterval = 0;
double GetDensityAtAttributedNsPerSample = 0.0;
double DensityPrologueAttributedNsPerSample = 0.0;
@@ -57,11 +103,10 @@ namespace VoxelForgeRegionEval
};
/**
* Evaluate a deterministic lattice through the live final-field API. The prepared mode only
* enables the commandlet-only 8^3 SDF candidate bins; all field writers and their order remain
* the live GetDensityAt implementation. FullRing uses brick-grouped output ownership and
* writes every lattice density exactly once. SampleIndices are sorted lattice offsets for the
* statistical correctness / candidate-counter sweeps.
* Evaluate a deterministic lattice through the live final-field API. The prepared mode uses
* the commandlet-only 8^3 SDF candidate bins and chunk-sized operator blocks. FullRing assigns
* each chunk to one worker and writes every lattice density exactly once. SampleIndices are
* sorted lattice offsets for the statistical correctness / candidate-counter sweeps.
*/
bool Evaluate(
const UVoxelGenerator& Generator,
@@ -73,8 +118,9 @@ namespace VoxelForgeRegionEval
float ReachScale,
TArray<float>* OutDensities,
FTiming& OutTiming,
bool bBrickProgram = false,
int32 RequestedWorkerCount = WorkerCount);
bool bRegionProgram = false,
int32 RequestedWorkerCount = WorkerCount,
bool bCollectWholeRunCounters = false);
/** Count exact room/tunnel/core/passage candidate visits with instrumentation enabled. */
FCandidateVisits CountCandidates(