mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Made it possible to refer t oa GPUDevice from code compile with a regular C++ compiler
This commit is contained in:
parent
1e04059012
commit
df31ca3b9e
@ -8,8 +8,8 @@
|
|||||||
// Public License v. 2.0. If a copy of the MPL was not distributed
|
// Public License v. 2.0. If a copy of the MPL was not distributed
|
||||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
#ifndef EIGEN_CXX11_TENSOR_MODULE
|
//#ifndef EIGEN_CXX11_TENSOR_MODULE
|
||||||
#define EIGEN_CXX11_TENSOR_MODULE
|
//#define EIGEN_CXX11_TENSOR_MODULE
|
||||||
|
|
||||||
#include "Core"
|
#include "Core"
|
||||||
|
|
||||||
@ -117,4 +117,4 @@
|
|||||||
|
|
||||||
#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
|
#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
|
||||||
|
|
||||||
#endif // EIGEN_CXX11_TENSOR_MODULE
|
//#endif // EIGEN_CXX11_TENSOR_MODULE
|
||||||
|
@ -27,7 +27,6 @@ class StreamInterface {
|
|||||||
virtual void deallocate(void* buffer) const = 0;
|
virtual void deallocate(void* buffer) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__CUDACC__)
|
|
||||||
static cudaDeviceProp* m_deviceProperties;
|
static cudaDeviceProp* m_deviceProperties;
|
||||||
static bool m_devicePropInitialized = false;
|
static bool m_devicePropInitialized = false;
|
||||||
|
|
||||||
@ -107,7 +106,6 @@ class CudaStreamDevice : public StreamInterface {
|
|||||||
const cudaStream_t* stream_;
|
const cudaStream_t* stream_;
|
||||||
int device_;
|
int device_;
|
||||||
};
|
};
|
||||||
#endif // __CUDACC__
|
|
||||||
|
|
||||||
struct GpuDevice {
|
struct GpuDevice {
|
||||||
// The StreamInterface is not owned: the caller is
|
// The StreamInterface is not owned: the caller is
|
||||||
|
Loading…
Reference in New Issue
Block a user