Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 976 Bytes

amp.md

File metadata and controls

25 lines (19 loc) · 976 Bytes

[source]

Amp

Amp Parallel is a multiprocessing subsystem that requires no extensions. It uses a non-blocking concurrency framework that implements coroutines using PHP generator functions under the hood.

!!! note The optimal number of workers will depend on the system specifications of the computer. Fewer workers than CPU cores may not achieve full processing potential but more workers than cores can cause excess overhead.

Parameters

# Name Default Type Description
1 workers Auto int The maximum number of workers in the worker pool. If null then tries to autodetect CPU core count.

Example

use Rubix\ML\Backends\Amp;

$backend = new Amp(16);

Additional Methods

Return the maximum number of workers in the worker pool:

public workers() : int