-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP013: Allow constructing an execution context from a range of execution resources #51
Comments
Need to be able to query the context for a (single) resource object. Leading to having a resource object that is a specified subset of another resource. Leading to a constructor or member function that takes a selection-specification (e.g., array of ints) and gives back a resource handle. Leads to multiple resource objects referencing the same resource, which is OK because ownership is not implied. I'd go with constructor taking an existing resource and a selection-spec. |
That's a good point, if we allow constructing an If I understand correctly you're proposing that the execution_context partitionedContext(execRes, {0, 1, 2, 3}); We could make the default set be all member resources. This would mean that you couldn't have an |
Seems like a reasonable restriction to me.
|
Yes, I think this would have to be an optional feature as not all resources will be able to support this. The way I'd imagine this working is that an |
It was raised that the current design limits the creation of an
execution_context
to a singleexecution_resource
therefore enforcing that theexecution_context
represent all memberexecution_resource
s. This excludes the case where you may want to, for example, create anexecution_context
from half the threads of a core. In this case, you would want to list theexecution_resource
s you want theexecution_context
to represent.For this we need to add an additional constructor to the
execution_context
or alter the existing constructor to allow it to take a set ofexecution_resource
s. Perhaps we could do this by providing partitioning algorithms which can partition anexecution_resource
in a particular way and return a new iterable which could then be passed to theexecution_context
constructor.The text was updated successfully, but these errors were encountered: