pub struct BandwidthBenchmarkConfig {
pub sizes: Vec<usize>,
pub directions: Vec<TransferDirection>,
pub warmup_iterations: u32,
pub benchmark_iterations: u32,
pub use_pinned_memory: bool,
}Expand description
Configuration for a bandwidth benchmark sweep.
Specifies which transfer sizes, directions, and iteration counts to use
when running a benchmark. The Default implementation provides a
standard set of sizes from 1 KB to 256 MB across all four directions.
Fields§
§sizes: Vec<usize>Transfer sizes to benchmark (in bytes).
directions: Vec<TransferDirection>Transfer directions to benchmark.
warmup_iterations: u32Number of warmup iterations before timing begins.
benchmark_iterations: u32Number of timed benchmark iterations per size/direction pair.
use_pinned_memory: boolWhether to use pinned (page-locked) host memory for transfers.
Implementations§
Source§impl BandwidthBenchmarkConfig
impl BandwidthBenchmarkConfig
Sourcepub fn with_sizes(sizes: Vec<usize>) -> Self
pub fn with_sizes(sizes: Vec<usize>) -> Self
Creates a new config with custom sizes and default settings.
Sourcepub fn for_direction(direction: TransferDirection) -> Self
pub fn for_direction(direction: TransferDirection) -> Self
Creates a new config for a single direction.
Sourcepub fn set_iterations(&mut self, warmup: u32, benchmark: u32)
pub fn set_iterations(&mut self, warmup: u32, benchmark: u32)
Sets the number of warmup and benchmark iterations.
Sourcepub fn total_transfers(&self) -> usize
pub fn total_transfers(&self) -> usize
Total number of individual transfers this config would produce.
Equal to sizes.len() * directions.len() * benchmark_iterations.
Trait Implementations§
Source§impl Clone for BandwidthBenchmarkConfig
impl Clone for BandwidthBenchmarkConfig
Source§fn clone(&self) -> BandwidthBenchmarkConfig
fn clone(&self) -> BandwidthBenchmarkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more