Previous | Next --- Slide 49 of 64
Back to Lecture Thumbnails
haiyuem

Is cilk_sync acting like a barrier here?

jle

@haiyuem It seems slightly similar! I’m comparing the usage of “barrier” from previous slides and the cilk_sync here. I’ll try my best to explain the difference given what I’m seeing. There seems to be a slight difference in that cilk_sync is used kind of like a “join” call, where threads can all come back after work is finished. On the other hand, it seems like “barriers” don’t necessarily imply threads are “joining” but rather they’re waiting because they’re dependent on certain tasks in threads finishing. This leads me to believing there are slight implementation differences in how you’d implement cilk_sync vs a barrier.

Please log in to leave a comment.