Struct counting_networks::counters::BitonicCountingNetwork [] [src]

pub struct BitonicCountingNetwork(_);

Concrete counter based on BitonicNetwork.

Methods

impl BitonicCountingNetwork
[src]

[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);

[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);

Trait Implementations

impl Counter for BitonicCountingNetwork
[src]

[src]

Retrieve value from counter and update internal state.

Auto Trait Implementations