Quantcast
Channel: Parallel Computing in C++ and Native Code forum
Viewing all articles
Browse latest Browse all 856

PPL assigning a Scheduler to a task_group member variable

$
0
0

Hi,

I'm actually having difficulty with this.

class Foo has a private member "task_group _tasks"... how do I properly assign a scheduler to this task_group that is NOT the default scheduler?

My scenario is I would like to set "maxconcurrency" to this task_group depending on what time of the day it is. I have code that gets me the hour of the day, and if the time is less than noon, for instance, I would like to use all but one logical core.

I want to keep the default scheduler for the parallel_for loops I use elsewhere in the class.

Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 856

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>