You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/ch_conceptual_design/resources.rst
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,38 +10,42 @@ As mentioned in :numref:`ch_conceptual_design/algorithms:Algorithms`, the typica
10
10
where the types :cpp:`P1, Pn...` represent data products, and the types :cpp:`Rm...` represent resources.
11
11
12
12
Resources are used by algorithms that require access to a shared entity that is not semantically related to the data-product set hierarchy.
13
+
An example registration of an algorithm that requires both a data product and a resource is found in :numref:`ch_conceptual_design/hofs/observers:Observers`.
14
+
The details of the registration code express to the framework which arguments correspond to data products and which correspond to resources :need:`DUNE 52`.
15
+
They may be stateless objects (e.g. a resource that denotes that an algorithm requires the use of a specific thread-unsafe library) or stateful objects (e.g. a resource that denotes access to a GPU, when the platform on which the framework program is running contains several GPUs).
16
+
Neither of these examples contain mutable state.
17
+
Resources (unlike data products) may have mutable state accessible to the algorithm (e.g. a histogram instance that could be shared across multiple algorithms).
18
+
For resources that are mutable, the framework ensures that two algorithms are not interacting with the resource at the same time.
19
+
The framework is responsible for efficiently scheduling algorithms based, in part, upon the availability of resources :need:`DUNE 50`.
0 commit comments