From: "Marc A. Criley" <mcNOSPAM@mckae.com>
Subject: Re: ANNOUNCE: Magpie 0.10 Utilities for multi-core execution
Date: Wed, 02 Feb 2011 20:02:12 -0600
Date: 2011-02-02T20:02:12-06:00 [thread overview]
Message-ID: <95fca$4d4a0cae$433a4eec$25475@API-DIGITAL.COM> (raw)
In-Reply-To: <42787132-70a9-4629-b5dc-af580896e3b1@q40g2000prh.googlegroups.com>
On 01/28/2011 08:25 PM, Shark8 wrote:
> Brad, Marc,
> What is the difference between Magpie and Paraffin?
Magpie provides two generic functions and a generic procedure. They're
designed to operate on a container of data that is indexed or keyed by
values of a discrete type. E.g. an integer indexed array, or a vector.
The generic functions retrieve a value from the container, apply an
application-supplied function to it, then combine ("reduce") each result
with a running total, until all values have been processed, and the
final value of the running total is returned as the generic function's
value.
The generic procedure repeatedly invokes an application-supplied
procedure, accompanying each invocation with an index value. There is
no value returned, the supplied procedure is simply repeatedly invoked,
presumably progressing through each element of the container, and it is
responsible for managing its results.
The technique I got from Brad's article had to do with partitioning the
range of index/keys amongst application-designated CPU cores.
One of the functions simply evenly splits the range across the number of
cores and kicks off the execution of each task associated with a core.
The other function, and the procedure, initially split the range evenly,
but if one of the core tasks finishes early, it advertises that it is
available to take on more work. When one of the other tasks notices
this, it stops, splits its remaining work, and both resume execution.
There's more detail about all this in the README, along with a couple
examples, including a Magpie version of Jakob Sparre Andersen's
Mandelbrot set generator.
Marc
next prev parent reply other threads:[~2011-02-03 2:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 1:12 ANNOUNCE: Magpie 0.10 Utilities for multi-core execution Marc A. Criley
2011-01-29 0:49 ` Brad Moore
2011-01-29 2:25 ` Shark8
2011-02-03 2:02 ` Marc A. Criley [this message]
2011-02-24 14:46 ` Brad Moore
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox