diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-02-19 16:31:04 +0000 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-02-19 16:31:04 +0000 |
commit | f268db1c4bd0510f13f0218205c2e135f2790175 (patch) | |
tree | fb02a30e5e209e6c5ffefc50fd6109828fdb37db /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h | |
parent | a08d2ff0c911f7f27dd8cb0ca14fa5b9419b3488 (diff) |
Added the ability to query the minor version of a cuda device
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h index e684ab8f7..3808eb155 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h @@ -247,6 +247,14 @@ struct GpuDevice { return 0; #endif } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int minorDeviceVersion() const { +#ifndef __CUDA_ARCH__ + return stream_->deviceProperties().minor; +#else + eigen_assert(false && "The default device should be used instead to generate kernel code"); + return 0; +#endif + } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int maxBlocks() const { return max_blocks_; |