On 13/12/2012, at 1:43 PM, srean wrote:

> Anyway I digress, I think one important issue to keep in mind is when  that 
> dsl allows random_access, sequential access, reversible access etc. They in 
> turn would dictate what kind of loops/traversals one could express with 
> those, whether one could parallelize those loops or not ?

Developing suitable parallel idioms is important.
General parallelism is quite hard to automate.

For example, consider

        map f d

for some data structure d. For an array and an assignable type,
you can make a target array (uninitialised) then the element-wise 
assignments are, but definition, unordered. With reasonable 
constraints on the native of the function f, we can easily split
the mapping up between N threads.

A non-automatic way to do this would be simply

        pa-map 4 f d

where "pa-" means parallel array and 4 is the number
of threads. This routine could be written NOW in Felix.
The only tricky bit is re-joining the threads (Felix pthreads
are detached so you have to write your own code to
join them).

These kinds of building blocks would be useful even
if they require manual application, manual calculation
of he number of threads, etc. With a few of these 
in place we can play trying to combine them.

This approach doesn't require any high level theory.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to