Fix the routine that synchronize all streams.
Description
Fix the routine that synchronize all streams. This was done in an non-elegant and inefficient way.
News snippet
GPU improvement.
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.