#[cfg(all(target_os = "linux", not(feature = "sbc")))]
pub mod linux;
#[cfg(target_os = "windows")]
pub mod windows;
#[cfg(target_os = "macos")]
pub mod macos;
#[cfg(all(target_os = "linux", feature = "sbc"))]
pub mod sbc;
#[cfg(any(target_os = "windows", all(target_os = "linux", not(feature = "sbc"))))]
pub mod nvidia;
#[cfg(any(target_os = "windows", all(target_os = "linux", not(feature = "sbc"))))]
pub mod amdgpu;
use crate::energy::PlatformEnergy;
#[cfg(all(target_os = "linux", feature = "sbc"))]
pub fn current(_allow_elevation: bool) -> Box<dyn PlatformEnergy> {
Box::new(sbc::SBCPlatform::new())
}
#[cfg(all(target_os = "linux", not(feature = "sbc")))]
pub fn current(_allow_elevation: bool) -> Box<dyn PlatformEnergy> {
Box::new(linux::LinuxPlatform::new())
}
#[cfg(target_os = "windows")]
pub fn current(_allow_elevation: bool) -> Box<dyn PlatformEnergy> {
Box::new(windows::WindowsPlatform::new())
}
#[cfg(target_os = "macos")]
pub fn current(allow_elevation: bool) -> Box<dyn PlatformEnergy> {
Box::new(macos::MacOSPlatform::new(allow_elevation))
}