I'm new to this forum and TBB. I have a dll that gets loaded by my main application. I then have a customized container class that is used througout this dll. It currently uses std::sort to sort data in the container. Since there are many sorts in this dll some of which can be sorting over 10,000 entries, I was wondering how efficient it would be to change the sort blindly to parallel_sort as parallel_sort calls std::sort for < 500 entries.
My next question involves using task_scheduler_init. If I only use task_scheduler init once either in my main or when my dll gets loaded, my program crashes inside parallel_sort. If add an extra task_scheduler_init right before the sort, my program runs very, very slowly. I saw another post that said that having 1 task_scheuler_init in main and many elsewhere would not be problematic b/c of reference counting.
Does anyone have any ideas? p.s. I would hope to massivley parallelize my code with paralle_for and parallel_... as well, so any tips in advance wr.t. task_scheuduler_init would be greatly appreciated.
abstracted parallalel sort, when to use task_scheduler_init