[parsec-users] Question about a barrier in Black-Scholes with pThreads

Alin Jula alin.jula at sap.com
Wed Apr 29 12:21:09 EDT 2009


Hi all,

I noticed a barrier (pthread_barrier_wait) in the pThreads version on
Black-Scholes: 
	file:  blackscholes.c, line 243: BARRIER(barrier);

which seems to wait for all the threads that have just been
created (executing "bs_thread" function) to declare their *private*
variables. I was wondering if this barrier can be safely removed, since
the initialization of these private variables seems to use only
read-only global variables, e.g. "numOptions" and "nThreads"?

Thanks,
Alin Jula


-  
SAP Research Labs
T: 1-(650)-461-1845
F: 1-(650)-847-2646
3412 Hillview, 
Palo Alto, Ca, 94304




More information about the parsec-users mailing list