Files
ThreadPilot/Models/CpuPreset.cs
T
Prime Build 57676aede3 CPU topology v2 phase 5: add topology-aware preset generator foundation (#11)
Add topology-aware CPU preset generator foundation

Introduce a topology-derived preset generator for safe default CPU affinity suggestions without relying on CPU SKU hardcoding.

- Add CpuPreset, ICpuPresetGenerator and CpuPresetGenerationOptions
- Generate deterministic presets for all cores, physical/no-SMT, all except CPU0, P/E cores, L3 group physical cores, best gaming and safe compatibility
- Add SourcePresetId for best-gaming while keeping Reason user-facing
- Use CpuTopologySnapshot metadata such as CoreIndex, EfficiencyClass, L3/cache groups and SMT siblings
- Avoid X3D/3D V-Cache preset generation until reliable detection is available
- Register the generator for future UI/profile phases
- Add tests for SMT, hybrid P/E cores, dual CCD, >64 logical processors, deleted presets and missing CoreIndex

No UI, profile migration, runtime affinity apply, ProcessService, registry/IFEO, version or tag changes.
2026-05-20 00:11:32 +02:00

47 lines
1.5 KiB
C#

/*
* ThreadPilot - Advanced Windows Process and Power Plan Manager
* Copyright (C) 2025 Prime Build
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, version 3 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace ThreadPilot.Models
{
/// <summary>
/// Topology-aware CPU affinity preset generated from a CPU topology snapshot.
/// </summary>
public sealed record CpuPreset
{
public string PresetId { get; init; } = string.Empty;
public string Name { get; init; } = string.Empty;
public string Description { get; init; } = string.Empty;
public CpuSelection Selection { get; init; } = new();
public string Reason { get; init; } = string.Empty;
public string? SourcePresetId { get; init; }
public string? Warning { get; init; }
public CpuTopologySignature? GeneratedByTopologySignature { get; init; }
public bool IsUserEditable { get; init; } = true;
public bool IsGenerated { get; init; } = true;
public bool ReviewRequired { get; init; }
}
}