aten/src/ATen/cuda/CUDAStream.cpp
// Memory management
// Note: only destructible (non-default) streams are ref counted
Memory management
Note: only destructible (non-default) streams are ref counted
Memory management Note : only destructible ( non - default ) streams are ref counted
bool CUDAStream_retain(CUDAStreamInternals* ptr) {
    AT_ASSERT(ptr);
    if (ptr->is_destructible) return(++ptr->refcount > 1);
    return true;
  }
bool CUDAStream_retain ( CUDAStreamInternals * ptr ) { AT_ASSERT ( ptr ) ; if ( ptr -> is_destructible ) return ( ++ ptr -> refcount > 1 ) ; return true ; }
Memory management
Note: only destructible (non-default) streams are ref counted
Memory management Note : only destructible ( non - default ) streams are ref counted