Skip to main content

ExecutionPolicy

Trait ExecutionPolicy 

Source
pub trait ExecutionPolicy:
    Send
    + Sync
    + 'static {
    // Required method
    fn parallelize(len: usize) -> bool;

    // Provided method
    fn parallelize_pair() -> bool { ... }
}
Expand description

Compile-time strategy selector for the data-parallel operations in this crate.

Implemented by zero-sized marker types; used purely as a type parameter so each operation monomorphizes to a single concrete path.

Required Methods§

Source

fn parallelize(len: usize) -> bool

Return true if an operation over len elements should run in parallel.

Provided Methods§

Source

fn parallelize_pair() -> bool

Return true if a fixed two-branch operation should run in parallel.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§