Skip to main content

KernelScope

Trait KernelScope 

Source
pub trait KernelScope {
    type Scoped;

    // Required method
    fn scope(&self, coords: &Tuple) -> Self::Scoped;
}
Expand description

A parent value that can be scoped to a coordinate tuple, producing an instance of Self::Scoped. Spec §9.5.3 names this the “one-shot scope function.”

For polydat’s Polydat Kernels this is bind_outer_scope + per-tuple set_input followed by evaluate_inits. For tests it can be any type that derives a scoped value from a tuple.

Required Associated Types§

Source

type Scoped

The scoped value produced by scope.

Required Methods§

Source

fn scope(&self, coords: &Tuple) -> Self::Scoped

Apply coords to this parent and produce a scoped instance. Pure function — same (parent, coords) always produces equivalent output.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§