2 ms·
OpenMP vs GCD? That’s apples and oranges. They’re not even in the same ballpark. I can’t fathom how GCD fills the same needs OpenMP targets, nor can I see how G
by cornstalks 3y ago
OpenMP vs GCD? That’s apples and oranges. They’re not even in the same ballpark. I can’t fathom how GCD fills the same needs OpenMP targets, nor can I see how GCD is Apple’s “no” response to OpenMP.
And GCD is open source (not sure when the source was first made available, though). It even supports Linux (thanks to Swift) though that’s recent.
- cpgxiii 3y agoOpenMP and GCD are very different in some ways, yet very similar in others. Both provide threadpool-based parallelism, and both provided "managed" parallelism well before C and C++ gained standardized parallelism via std::async/std::future/std::thread. If you want vendor-supported threadpool parallelism on MacOS, GCD was the singular answer for years. They aren't exactly compatible, but neither are Cilk or TBB to OpenMP, yet all of these approaches can be used to perform a similar subset of parallelized operations. libdispatch is open source, and available on Linux, but I can't see any reason to use it versus the alternatives of TBB and OpenMP, unless you were trying to port an application/library originally written for MacOS/iOS.