NAME
MCE::Stream - Multiple maps and greps using Many-Core Engine.
VERSION
This document describes MCE::Stream version 1.499_001
SYNOPSIS
use MCE::Stream;
my (@a, $b);
@a = mce_stream sub { $_ * 3 }, sub { $_ * 2 }, 1..10000;
mce_stream \@b, sub { $_ * 3 }, sub { $_ * 2 }, 1..10000;
## Native Perl
my @s = mce_map { $_ * $_ } mce_grep { $_ % 5 == 0 } 1..10000;
## Multiple maps and greps running in parallel (right-to-left)
mce_stream \@s,
{ mode => 'map', code => sub { $_ * $_ } },
{ mode => 'grep', code => sub { $_ % 5 == 0 } }, 1..10000;
DESCRIPTION
TODO ...
API
- mce_stream
-
## mce_stream is imported into the calling script. my @a = mce_stream sub { ... }, sub { ... }, 1..100;
- init
-
MCE::Stream::init { ## This form is available for configuring MCE options ## before running. user_begin => sub { print "## ", MCE->wid, "\n"; } user_end => sub { ... } };
- finish
-
MCE::Stream::finish(); ## This is called automatically.
SEE ALSO
MCE::Flow, MCE::Grep, MCE::Loop, MCE::Map, MCE::Queue, MCE
AUTHOR
Mario E. Roy, <marioeroy AT gmail DOT com>
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.