[gambit-list] Computing pi with parallel gambit

Marc Feeley feeley at iro.umontreal.ca
Sun Dec 11 16:07:11 EST 2016


It’s a simple modification of your code:

       (let* ((mid (quotient (+ a b) 2))
              (gpq1-thread (thread-start! (make-thread (lambda () (ch-split a mid))))) ;; modified
              (gpq2 (ch-split mid b))
              (gpq1 (thread-join! gpq1-thread)) ;; added
              (g1 (car gpq1)) (p1 (cadr gpq1)) (q1 (caddr gpq1))
              (g2 (car gpq2)) (p2 (cadr gpq2)) (q2 (caddr gpq2)))

Marc

> On Dec 11, 2016, at 3:59 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
> 
> On 12/11/2016 01:59 PM, Bradley Lucier wrote:
>> 
>> More seriously, I just looked through the thread section of the Gambit
>> manual and I do not yet understand the thread model that you've built
>> into Gambit.  So I don't know how to do what you want.
> 
> Perhaps someone on the list can hack up something.
> 
> Brad
> 




More information about the Gambit-list mailing list