[Boost-bugs] [Boost C++ Libraries] #11391: nvcc 7.0 unable to compile with boost/atomic/detail/gcc-atomic.hpp included

Subject: [Boost-bugs] [Boost C++ Libraries] #11391: nvcc 7.0 unable to compile with boost/atomic/detail/gcc-atomic.hpp included
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-06-11 07:50:39


#11391: nvcc 7.0 unable to compile with boost/atomic/detail/gcc-atomic.hpp included
------------------------------+----------------------
 Reporter: steinbac@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 including boost/thread.hpp produces
 /usr/include/boost/atomic/detail/gcc-atomic.hpp(248): error: argument of
 type "const volatile uint8_t *" is incompatible with parameter of type
 "volatile void *"

 $ nvcc -lboost_thread boost_thread.cu
 #include <boost/thread.hpp>

 __global__ void add_2(float a, float b, float *c){

   *c = a+b;

 }

 int main(int argc, char *argv[])
 {

   float res = 0;
   float a = boost::thread::hardware_concurrency();
   add_2<<<1,1>>>(a,52.,&res);

   std::cout << boost::thread::hardware_concurrency() << "]" << res <<
 "\n";
   return 0;
 }

 system details:

 fedora 21, 4.0.4-202.fc21.x86_64
 gcc: gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
 boost: 1.55.0 Release 8.fc21 from system repos
 cuda 7.0.28

 I already filed a bug report with nvidia

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11391>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC