Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

device_function's constructors are executed on host code and as such …

…need to be flagged as __host__.

This might be a bug in the thrust headers that doesn't show up on other CUDA compilers.
  • Loading branch information...
commit e0e8ee6f6b8e154f202565a8bff937d16153cdbc 1 parent 85b2391
Francois Pichet authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 thrust/detail/function.h
View
4 thrust/detail/function.h 100644 → 100755
@@ -95,11 +95,11 @@ template<typename Function, typename Result>
// mutable because Function::operator() might be const
mutable Function m_f;
- inline __device__ device_function()
+ inline __host__ __device__ device_function()
: m_f()
{}
- inline __device__ device_function(const Function &f)
+ inline __host__ __device__ device_function(const Function &f)
: m_f(f)
{}
Please sign in to comment.
Something went wrong with that request. Please try again.