Quantcast

Parallel processing...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Parallel processing...

Mike Houghton
Hi,

I have a list of lists - a grid [[ ]]  of complex numbers and I map a function over each number in the grid. Each computation on a value at (r, c) is independent of any and all other calculations. This strikes me as being something that can be done in parallel by  creating , say 4 quadrants and mapping over each and combining when done, or doing each row in parallel etc. etc.

So I'm really just asking for advice or pointers on the Haskell libraries etc that I should start with but I'm not really looking to import an  uber-package that will do most of it for me. I want to learn a little  more Haskell by working from a few concurrency primitives.

Thanks

Mike


_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parallel processing...

David McBride
It's hard to say what level you'll want your libraries to be.
Theoretically all the functionality you need is in base.
Control.Parallel and Control.Concurrent have functions for that,
although you'll have to learn how to use them from various tutorials
around.

If the function you are mapping is pure, you might try the parallel
package.  If it is monadic you might try the monad-par package.  There
are parMap and parFor functions in monad-par-extras package which do
exactly what you are looking for.

If you search for parallel on hackage you'll find a plethora of well
maintained packages in this domain as it is one of those things
haskell is best at.

On Mon, Mar 27, 2017 at 7:04 AM, mike h <[hidden email]> wrote:

> Hi,
>
> I have a list of lists - a grid [[ ]]  of complex numbers and I map a
> function over each number in the grid. Each computation on a value at (r, c)
> is independent of any and all other calculations. This strikes me as being
> something that can be done in parallel by  creating , say 4 quadrants and
> mapping over each and combining when done, or doing each row in parallel
> etc. etc.
>
> So I'm really just asking for advice or pointers on the Haskell libraries
> etc that I should start with but I'm not really looking to import an
> uber-package that will do most of it for me. I want to learn a little  more
> Haskell by working from a few concurrency primitives.
>
> Thanks
>
> Mike
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parallel processing...

Mike Houghton
Thanks David, I’ll look in to the links.

Mike

> On 27 Mar 2017, at 13:21, David McBride <[hidden email]> wrote:
>
> It's hard to say what level you'll want your libraries to be.
> Theoretically all the functionality you need is in base.
> Control.Parallel and Control.Concurrent have functions for that,
> although you'll have to learn how to use them from various tutorials
> around.
>
> If the function you are mapping is pure, you might try the parallel
> package.  If it is monadic you might try the monad-par package.  There
> are parMap and parFor functions in monad-par-extras package which do
> exactly what you are looking for.
>
> If you search for parallel on hackage you'll find a plethora of well
> maintained packages in this domain as it is one of those things
> haskell is best at.
>
> On Mon, Mar 27, 2017 at 7:04 AM, mike h <[hidden email]> wrote:
>> Hi,
>>
>> I have a list of lists - a grid [[ ]]  of complex numbers and I map a
>> function over each number in the grid. Each computation on a value at (r, c)
>> is independent of any and all other calculations. This strikes me as being
>> something that can be done in parallel by  creating , say 4 quadrants and
>> mapping over each and combining when done, or doing each row in parallel
>> etc. etc.
>>
>> So I'm really just asking for advice or pointers on the Haskell libraries
>> etc that I should start with but I'm not really looking to import an
>> uber-package that will do most of it for me. I want to learn a little  more
>> Haskell by working from a few concurrency primitives.
>>
>> Thanks
>>
>> Mike
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Loading...