Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:44

0001 #pragma once
0002 
0003 
0004 template<typename T>
0005 struct SPM_future
0006 {
0007     T* ptr = nullptr;
0008     size_t       count = 0;
0009     cudaEvent_t  ready = nullptr;   // caller must destroy
0010 
0011     void wait( cudaStream_t stream ) const ;
0012 };
0013 
0014 template<typename T>
0015 inline void SPM_future<T>::wait(cudaStream_t stream ) const
0016 {
0017     if (ready && stream) {
0018         cudaStreamWaitEvent(stream, ready, 0);
0019     }
0020 }
0021