Module executor

Module executor 

Source
Available on crate feature std only.
Expand description

Executor backends for task execution.

This module provides the executor abstraction and implementations for different compute backends (CPU, GPU, Remote).

§Architecture

┌─────────────────────────────────────────────────────────┐
│                    Executor Trait                       │
├─────────────────────────────────────────────────────────┤
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  │
│  │ CpuExecutor  │  │ GpuExecutor  │  │RemoteExecutor│  │
│  │  (threads)   │  │   (wgpu)     │  │   (TCP)      │  │
│  └──────────────┘  └──────────────┘  └──────────────┘  │
└─────────────────────────────────────────────────────────┘

§Example

use pepita::executor::{CpuExecutor, Executor};
use pepita::task::Task;

let executor = CpuExecutor::new(4);
let task = Task::binary("./worker").build();
let result = executor.execute(task).await?;

Structs§

CpuExecutor
CPU executor for running binary tasks locally.
ExecutorRegistry
Registry of available executors.
GpuExecutor
GPU executor for running compute shaders.
RemoteExecutor
Remote executor for running tasks on remote workers.

Traits§

Executor
Trait for task executors.