aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Memory.h
diff options
context:
space:
mode:
authorGravatar Jonas Adler <jonasadl@kth.se>2015-07-22 12:29:18 +0200
committerGravatar Jonas Adler <jonasadl@kth.se>2015-07-22 12:29:18 +0200
commit815fa0dbf63f112f98fe3ac38483e0248caf9eec (patch)
tree45cff143ff8ffc55edde6caff72d667af6251b8f /Eigen/src/Core/util/Memory.h
parentd259b719d1703e9271612d944e432edd72be1051 (diff)
Fixed some compiler bugs in NVCC, now compiles with CUDA.
(chtz: Manually joined sevaral commits to keep the history clean)
Diffstat (limited to 'Eigen/src/Core/util/Memory.h')
-rw-r--r--Eigen/src/Core/util/Memory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h
index 62f329984..73287d6ca 100644
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -559,18 +559,18 @@ inline Index first_multiple(Index size, Index base)
// use memcpy on trivial types, i.e., on types that does not require an initialization ctor.
template<typename T, bool UseMemcpy> struct smart_copy_helper;
-template<typename T> void smart_copy(const T* start, const T* end, T* target)
+template<typename T> EIGEN_DEVICE_FUNC void smart_copy(const T* start, const T* end, T* target)
{
smart_copy_helper<T,!NumTraits<T>::RequireInitialization>::run(start, end, target);
}
template<typename T> struct smart_copy_helper<T,true> {
- static inline void run(const T* start, const T* end, T* target)
+ EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target)
{ memcpy(target, start, std::ptrdiff_t(end)-std::ptrdiff_t(start)); }
};
template<typename T> struct smart_copy_helper<T,false> {
- static inline void run(const T* start, const T* end, T* target)
+ EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target)
{ std::copy(start, end, target); }
};