Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

How do I use TBB eliminate competition

Frank_F
Beginner
1,963 Views

    Hello everyone!     

When i use paralle_for parallel the program,then i use inspector detected there has data race(read and write race).But i cannot find a detailed methods that can used eliminate data race.Who can give me a suggestion.Thank you very much!

0 Kudos
21 Replies
jimdempseyatthecove
Honored Contributor III
152 Views

Raf Schietekat wrote:

And my interpretation is that "number" means "cell number", with possibly multiple part belonging to the same cell. The iteration starts at part_n, which seems to be a random-access iterator, not an index.

Code showed:

cell[part->number]....
not
cell...
or
cell[itr]...

Jim Dempsey

 

0 Kudos
Reply