Implicitly threaded parallelism in Manticore

MATTHEW FLUET, MIKE RAINEY, JOHN REPPY, ADAM SHAW
<span title="">2010</span> <i title="Cambridge University Press (CUP)"> <a target="_blank" rel="noopener" href="https://fatcat.wiki/container/uxwkeespobabbhdznzmxrfucny" style="color: black;">Journal of functional programming</a> </i> &nbsp;
The increasing availability of commodity multicore processors is making parallel computing available to the masses. Traditional parallel languages are largely intended for large-scale scientific computing and tend not to be well-suited to programming the applications one typically finds on a desktop system. Thus we need new parallel-language designs that address a broader spectrum of applications. In this paper, we present Manticore, a language for building parallel applications on commodity
more &raquo; ... ticore hardware including a diverse collection of parallel constructs for different granularities of work. We focus on the implicitly-threaded parallel constructs in our high-level functional language. We concentrate on those elements that distinguish our design from related ones, namely, a novel parallel binding form, a nondeterministic parallel case form, and exceptions in the presence of data parallelism. These features differentiate the present work from related work on functional data parallel language designs, which has focused largely on parallel problems with regular structure and the compiler transformations -most notably, flattening -that make such designs feasible. We describe our implementation strategies and present some detailed examples utilizing various mechanisms of our language. [| if x<0 then raise A else 0, if y>0 then raise A else 0 |] val f1 = future (fn () => ...) val f2 = future (fn () => ...) fun go() = (case (poll(f1), poll(f2)) of (NONE, NONE) => state00() | (NONE, SOME t) => state01(t) | (SOME t, NONE) => state10(t) | (SOME t1, SOME t2) => state11(t1,t2)) and state00() = go() and state01(t) = (case t of Val false => (cancel f2; false) | _ => go()) and state10(t) = (case t of Val false => (cancel f1; false) | _ => go()) and state11(t1,t2) = (case (t1,t2) of (Val false, _) => false | (_, Val false) => false | (Val true, Val true) => true | _ => raise Match)
<span class="external-identifiers"> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1017/s0956796810000201">doi:10.1017/s0956796810000201</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/oec6ymxzczdxlalsnvntxlnp7q">fatcat:oec6ymxzczdxlalsnvntxlnp7q</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20100714102104/http://people.cs.uchicago.edu:80/~mrainey/papers/icfp08-datapar.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/34/74/3474822a5102a197cae430d72ffa63883c6b8185.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1017/s0956796810000201"> <button class="ui left aligned compact blue labeled icon button serp-button"> <i class="external alternate icon"></i> cambridge.org </button> </a>