[m-dev.] Proposal for a new parallel conjunction operator.
Paul Bone
pbone at csse.unimelb.edu.au
Thu Apr 23 16:04:59 AEST 2009
On Thu, Apr 23, 2009 at 03:12:47PM +1000, Paul Bone wrote:
>
> I'd like to propose a new conjunction operator. We already have the following:
>
> ',' (default) sequential conjunction.
> '&' parallel conjunction (where available).
>
> I'd like to add another operator that will execute code in parallel if there
> are enough mercury engines available (in low-level C grades) and otherwise fall
> back to sequential conjunction. I havn't thought much about which symbol to
> use, something like '&&' or '&,'. This will provide a granuality control
> method for recursive and in-particular divide and conqure algorithms.
>
> This will also be used internally by the automatic parallelism work I'm doing
> but it will be useful for me to create programs that use it explicity for
> testing and benchmarking. Users may also find it useful.
>
> Does anyone see a problem with this or have any suggestions?
>
> Thanks.
Scratch that. Zoltan provided some strong reasons why this is not worth-while.
Simply the runtime condition that you want to use to decide weather to
parallelize something may be any type of condition, it may also be parametrised.
This does not let you express that. However writing an if-then-else does. For
example
(
runtime_condition,
->
conj_a & conj_b
;
conj_a, conj_b
)
Is easy to write.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/developers/attachments/20090423/117234a5/attachment.sig>
More information about the developers
mailing list