pub struct PersistentFdtdConfig {
pub name: String,
pub tile_size: (usize, usize, usize),
pub use_cooperative: bool,
pub progress_interval: u64,
pub track_energy: bool,
pub idle_sleep_ns: u32,
pub use_libcupp_atomics: bool,
}Expand description
Configuration for persistent FDTD kernel generation.
Fields§
§name: StringKernel function name.
tile_size: (usize, usize, usize)Tile size per dimension (cells per block).
use_cooperative: boolWhether to use cooperative groups for grid sync.
progress_interval: u64Progress report interval (steps).
track_energy: boolEnable energy calculation.
idle_sleep_ns: u32Nanosleep duration for idle spin-wait (nanoseconds). Used when the kernel has no work to do, reducing power consumption.
use_libcupp_atomics: boolUse libcu++ ordered atomics (cuda::atomic_ref) for queue operations. Requires CUDA 11.0+ toolkit. When false (default), uses legacy __threadfence_system() pairs.
Implementations§
Source§impl PersistentFdtdConfig
impl PersistentFdtdConfig
Sourcepub fn with_tile_size(self, tx: usize, ty: usize, tz: usize) -> Self
pub fn with_tile_size(self, tx: usize, ty: usize, tz: usize) -> Self
Set tile size.
Sourcepub fn with_cooperative(self, use_coop: bool) -> Self
pub fn with_cooperative(self, use_coop: bool) -> Self
Set cooperative groups usage.
Sourcepub fn with_progress_interval(self, interval: u64) -> Self
pub fn with_progress_interval(self, interval: u64) -> Self
Set progress reporting interval.
Sourcepub fn with_idle_sleep(self, ns: u32) -> Self
pub fn with_idle_sleep(self, ns: u32) -> Self
Set idle sleep duration in nanoseconds. Controls power consumption during spin-wait when no work is available.
Sourcepub fn with_libcupp_atomics(self, enabled: bool) -> Self
pub fn with_libcupp_atomics(self, enabled: bool) -> Self
Enable libcu++ ordered atomics for queue operations. Requires CUDA 11.0+ toolkit.
Sourcepub fn threads_per_block(&self) -> usize
pub fn threads_per_block(&self) -> usize
Calculate threads per block.
Calculate shared memory size per block (tile + halo).
Trait Implementations§
Source§impl Clone for PersistentFdtdConfig
impl Clone for PersistentFdtdConfig
Source§fn clone(&self) -> PersistentFdtdConfig
fn clone(&self) -> PersistentFdtdConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more