I would love to be able to provide an easy-to-use API for implementing custom worksharing parallel-for schedulers into DotMP. There is research precedent for this, such as:
I would like to incorporate an interface named IScheduler which incorporates the InitLoop and CoreLoop methods. The InitLoop method should be void and take an int start, int end, and a params dynamic[] tuning_params. The CoreLoop method should be of type (int, int), take an int thread_id as a parameter, and return the start and end of the current chunk to execute.
The only alternative to this solution would be to clone the DotMP repo and implement custom schedulers that way, which would be harder on anyone who wants to implement a custom scheduler due to the necessity to understand DotMP internals.
This will be yet another full rewrite of the internal scheduler code. I am self-assigning this issue. This will involve breaking API changes.
I would love to be able to provide an easy-to-use API for implementing custom worksharing parallel-for schedulers into DotMP. There is research precedent for this, such as:
libgomp
OpenMP runtime.I would like to incorporate an interface named
IScheduler
which incorporates theInitLoop
andCoreLoop
methods. TheInitLoop
method should bevoid
and take anint start
,int end
, and aparams dynamic[] tuning_params
. TheCoreLoop
method should be of type(int, int)
, take anint thread_id
as a parameter, and return the start and end of the current chunk to execute.The only alternative to this solution would be to clone the DotMP repo and implement custom schedulers that way, which would be harder on anyone who wants to implement a custom scheduler due to the necessity to understand DotMP internals.
This will be yet another full rewrite of the internal scheduler code. I am self-assigning this issue. This will involve breaking API changes.