Struct counting_networks::counters::BitonicCountingNetwork
[−]
[src]
pub struct BitonicCountingNetwork(_);
Concrete counter based on BitonicNetwork.
Methods
impl BitonicCountingNetwork
[src]
pub fn new(width: usize) -> Self
[src]
Create a new counter with specified width.
Choice of width will not effect output of the counter, but higher values will ensure less contention among threads while accessing the counter at the cost of more memory.
Examples
use counting_networks::counters::{Counter, BitonicCountingNetwork}; let counter = BitonicCountingNetwork::new(8); assert_eq!(counter.next(), 0);
pub fn width(&self) -> usize
[src]
Returns the output width of the internal bitonic network.
Examples
use counting_networks::counters::BitonicCountingNetwork; let counter = BitonicCountingNetwork::new(8); assert_eq!(counter.width(), 8);