2017 © Pedro Peláez
 

library parallel

Parallel implementation of some higher-order functions.

image

functional-php/parallel

Parallel implementation of some higher-order functions.

  • Saturday, January 27, 2018
  • by krtek
  • Repository
  • 1 Watchers
  • 6 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Parallel

Build Status Scrutinizer Code Quality Code Coverage Average time to resolve an issue Percentage of issues still open Chat on Gitter, (*1)

Parallel implementation of the higher-order functions map, filter and fold using the phtreads library. This way the computation is distributed across multiple threads so that the whole computational power of the computer can be used., (*2)

See the pthreads library requirement. If you are not sure they will be satisfied, install the polyfill., (*3)

Installation

composer require functional-php/parallel

Basic Usage


use FunctionalPHP\Parallel as p; p\map(4, function($i) { return $i + 2; }, [1, 2, 3, 4]); // will return [3, 4, 5, 6] p\filter(4, function($i) { return $i % 2 == 0; }, [1, 2, 3, 4]); // will return [2, 4] p\fold(4, function($a, $b) { return $a + $b; }, [1, 2, 3, 4], 0); // will return 10

Testing

You can run the test suite for the library using:, (*4)

composer test

A test report will be available in the reports directory., (*5)

Contributing

Any contribution welcome :, (*6)

  • Ideas
  • Pull requests
  • Issues

The Versions

27/01 2018

dev-master

9999999-dev

Parallel implementation of some higher-order functions.

  Sources   Download

BSD BSD-3-Clause

The Requires

  • php >=7.0.0

 

The Development Requires

by Gilles Crettenand

filter filtering parallel mapping map threads pthreads folding higher-order functions fold