fix(ml-dqn): make is_gpu_prioritized() available without cuda feature

Move the cfg gate inside the method body instead of gating the entire
function. Without cuda, the GpuPrioritized variant doesn't exist so
matches! returns false — no need for separate cfg blocks at call sites.

Fixes compile-services CI failure (services build without --features cuda).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-10 17:11:22 +01:00
parent 759ac15383
commit e2fa781cb2

View File

@@ -490,10 +490,13 @@ impl ReplayBufferType {
matches!(self, Self::Prioritized(_))
}
/// Check if using GPU-resident prioritized replay
#[cfg(feature = "cuda")]
/// Check if using GPU-resident prioritized replay.
/// Returns false when compiled without `cuda` feature (variant doesn't exist).
pub const fn is_gpu_prioritized(&self) -> bool {
matches!(self, Self::GpuPrioritized(_))
#[cfg(feature = "cuda")]
{ matches!(self, Self::GpuPrioritized(_)) }
#[cfg(not(feature = "cuda"))]
{ false }
}
/// Adaptive buffer sizing based on epsilon decay