- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hej
I am new to intel TBB. I am trying to parallelize a looping structure with parallel_for. Structure of code is like:
for i=0:size
{
for j=i+1:size
------do something------
for j=i+1:size
for k=i+1:size
---do something---
}
>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<
for i=0:size
{
parallel_for(i+1:size) with looping
parallel_for(i+1:size) with nested looping
}
But this has drastically slowed down my speedup even much below than serial execution:( I rather need a parallelized structure of the form:
parallel_for(i,size)
{
for j=i+1:size
------do something------
/*------SYNCHRONIZATION-BARRIER------------*/
for j=i+1:size
for k=i+1:size
---do something---
}
i-e synchronization barrier of MPI kind that the second looping structure only begins when first looping has finished, so I guess i will get some speedup.... I have no idea if intel tbb has this kind of barrier, I looked through synchronization structures but they only talk about mutexes for shared variable accesses... Need urgent help with this, and thanks so much in advance....
I am new to intel TBB. I am trying to parallelize a looping structure with parallel_for. Structure of code is like:
for i=0:size
{
for j=i+1:size
------do something------
for j=i+1:size
for k=i+1:size
---do something---
}
>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<
for i=0:size
{
parallel_for(i+1:size) with looping
parallel_for(i+1:size) with nested looping
}
But this has drastically slowed down my speedup even much below than serial execution:( I rather need a parallelized structure of the form:
parallel_for(i,size)
{
for j=i+1:size
------do something------
/*------SYNCHRONIZATION-BARRIER------------*/
for j=i+1:size
for k=i+1:size
---do something---
}
i-e synchronization barrier of MPI kind that the second looping structure only begins when first looping has finished, so I guess i will get some speedup.... I have no idea if intel tbb has this kind of barrier, I looked through synchronization structures but they only talk about mutexes for shared variable accesses... Need urgent help with this, and thanks so much in advance....
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page