[Omp] How to private an array ?
Kang Su Gatlin
kanggatl at microsoft.com
Fri Jun 17 23:07:01 PDT 2005
Could you give a snippet of the code that you're trying to parallelize
with some description of what you'd like private/shared?
Thanks,
Kang Su Gatlin
Visual C++ Program Manager
-----Original Message-----
From: Omp-bounces at openmp.org [mailto:Omp-bounces at openmp.org] On Behalf
Of ThanhVu Nguyen
Sent: Friday, June 17, 2005 10:39 PM
To: omp at openmp.org
Subject: [Omp] How to private an array ?
Hi, I asked this question before but perhaps not clear enough so no
reply. Here it is again: I need to share an array of data, I need to
make sure that no thread can access this data at the same time
otherwise will have race condition, so probably have to make it in
critical section? Or I may be can create scalar values representing
values of the array data and private them ... each threads will work on
these values indepdently and at the end will synchronize, reduction etc
on them. But I don't know the proper way to do that. If the array data
has size n, then how to create n scalar values ?? What is the
appropriate way to achieve my intention? Thanks in advance
tvn,
ThanhVu H. Nguyen
_______________________________________________
Omp mailing list
Omp at openmp.org
http://openmp.org/mailman/listinfo/omp_openmp.org
More information about the Omp
mailing list