|
|
|
|
|
OpenMP, automatic threading
Tired of creating threes and writing code to manage deadlocks and work queues? Search is cpu intensive, and we uses a lot of threads. For example indexes are sorted in parallel, and the pages that go on the result page is fetched from the disk and processed in parallel. We started out creating threads manually, but that i slow going in C. We have now almost entirely changed to OpenMP, and haven’t looked back since. Initializing a large array in parallel is as easy as this. int main(int argc, char *argv[]) { OpenMP will decide how many threads to use.
CommentsLeave a Comment |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||