Destroys and cleans up the asynchronous stream specified by stream.
In the case that the device is still doing work in the stream stream when cudaStreamDestroy() is called, the function will return immediately and the resources associated with stream will be released automatically once the device has completed all work in stream.