mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Added a default value for the cuda stream in the GpuDevice constructor
This commit is contained in:
parent
1e911b276c
commit
8f1d547c92
@ -291,9 +291,12 @@ static inline void setCudaSharedMemConfig(cudaSharedMemConfig config) {
|
||||
assert(status == cudaSuccess);
|
||||
}
|
||||
|
||||
// Cuda stream to use when no stream is specified explicitely.
|
||||
static const cudaStream_t default_stream = cudaStreamDefault;
|
||||
|
||||
struct GpuDevice {
|
||||
// The cudastream is not owned: the caller is responsible for its initialization and eventual destruction.
|
||||
GpuDevice(const cudaStream_t* stream) : stream_(stream) { eigen_assert(stream); }
|
||||
GpuDevice(const cudaStream_t* stream = &default_stream) : stream_(stream) { eigen_assert(stream); }
|
||||
|
||||
EIGEN_STRONG_INLINE const cudaStream_t& stream() const { return *stream_; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user