mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Fix preprocessor condition to only generate a warning when calling eigen::GpuDevice::synchronize() from device code, but not when calling from a non-GPU compilation unit.
This commit is contained in:
parent
70d4020ad9
commit
74a9dd1102
@ -283,7 +283,7 @@ struct GpuDevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
|
||||||
#if defined(EIGEN_GPUCC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
#ifndef EIGEN_GPU_COMPILE_PHASE
|
||||||
gpuError_t err = gpuStreamSynchronize(stream_->stream());
|
gpuError_t err = gpuStreamSynchronize(stream_->stream());
|
||||||
if (err != gpuSuccess) {
|
if (err != gpuSuccess) {
|
||||||
std::cerr << "Error detected in GPU stream: "
|
std::cerr << "Error detected in GPU stream: "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user