Context and stream manager that will be able to take over the responsibility and ownership of all streams and context. Currently, streams are created and managed in the respective modules, which requires passing them over from one module to another (e.g. when H2D and D2H copies are issued). All the management should be taken over by a new object, simplifying the logic inside the respective modules.
Make a separate object that will be handling the creation,
management and destruction of the GPU context and streams.
It is detached from the rest of the code in this patch,
but will be attached in the follow-up.
Make use of the DeviceStreamManager
Use the DeviceStreamManager throughout the code. The manager is
owned by the runner and created when GPU is active. The consumers
get the context and streams if needed.
1. Make builders and move the selection on whether the stream should
be created there. The builders should take the manager and pass
the context and the stream to the consumer. Builders should have
the option to create a stream.
2. Makefile in ewald tests uses old infrastructure. Also, the device
context management should be lifted from there and utilized in
all the tests that can run on GPU hardware.