From e1406e9ed4c95e5a54cc4ae8bb465f8e91827784 Mon Sep 17 00:00:00 2001 From: routersys Date: Fri, 2 Oct 2026 13:07:07 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B5=8C=E8=B7=AF=E3=81=AE=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E3=81=A8=E4=BD=9C=E6=A5=AD=E9=87=8F=E3=81=AE=E5=9E=8B=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComputeGuard/ComputeDecision.cs | 18 ++++++++++++++++++ ComputeGuard/ComputeWorkload.cs | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 ComputeGuard/ComputeDecision.cs create mode 100644 ComputeGuard/ComputeWorkload.cs diff --git a/ComputeGuard/ComputeDecision.cs b/ComputeGuard/ComputeDecision.cs new file mode 100644 index 0000000..19af286 --- /dev/null +++ b/ComputeGuard/ComputeDecision.cs @@ -0,0 +1,18 @@ +namespace ComputeGuard; + +internal enum ComputeRoute +{ + Cpu, + Gpu, +} + +internal enum ComputeRouteReason +{ + Trusted, + NoDevice, + Pinned, + SoftwareAdapter, + MemoryLimit, +} + +internal readonly record struct ComputeDecision(ComputeRoute Route, ComputeRouteReason Reason); diff --git a/ComputeGuard/ComputeWorkload.cs b/ComputeGuard/ComputeWorkload.cs new file mode 100644 index 0000000..cf6426e --- /dev/null +++ b/ComputeGuard/ComputeWorkload.cs @@ -0,0 +1,3 @@ +namespace ComputeGuard; + +internal readonly record struct ComputeWorkload(int Width, int Height, long GpuMemoryBytes, ulong SamplingKey);