[boost-users][proto] Using proto with nvcc
I noticed that fix for ticket #3919 has been checked-in. Thanks JoelF.
I checked out boost trunk, and am trying to compile the following
simple program using nvcc.
#include
Manjunath Kudlur wrote:
I noticed that fix for ticket #3919 has been checked-in. Thanks JoelF. I checked out boost trunk, and am trying to compile the following simple program using nvcc. #include
namespace proto=boost::proto; int main() { return 0; }
I was getting "ISO C++ forbids declaration of ‘expr_param’ with no type" error in couple of places in proto/traits.hpp and proto/transform/pass_through.hpp. The code used to look like
typename pass_through_impl::expr_param e
I added a typedef as follows
transform_impl
base_type; and changed the code to
typename base_type::expr_param e
Now the compiler error goes away. I have 2 questions : 1) Is what I am doing the right fix for the problem, or is the nvcc compiler really broken when handling this? 2) If my fix is OK, how do I make it permanent?
The other error I am seeing is probably not proto's problem, but I will mention it here anyway :
boost/boost-trunk/boost/mpl/size_t_fwd.hpp:23: error: expected unqualified-id before ‘[’ token boost/boost-trunk/boost/mpl/size_t_fwd.hpp:26: error: ‘mpl_::size_t’ has not been declared boost/boost-trunk/boost/mpl/aux_/integral_wrapper.hpp:42: error: expected unqualified-id before ‘[’ token
Any ideas on this?
i'm still fiddlign with this fix. Any report will be appreciated. Can you make a small reproducable test case so i can test it. Also can you rpovide me with your nvcc version ? -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Joel,
The code I am trying is very simple :
#include
Manjunath Kudlur wrote:
I noticed that fix for ticket #3919 has been checked-in. Thanks JoelF. I checked out boost trunk, and am trying to compile the following simple program using nvcc. #include
namespace proto=boost::proto; int main() { return 0; }
I was getting "ISO C++ forbids declaration of ‘expr_param’ with no type" error in couple of places in proto/traits.hpp and proto/transform/pass_through.hpp. The code used to look like
typename pass_through_impl::expr_param e
I added a typedef as follows
transform_impl
base_type; and changed the code to
typename base_type::expr_param e
Now the compiler error goes away. I have 2 questions : 1) Is what I am doing the right fix for the problem, or is the nvcc compiler really broken when handling this? 2) If my fix is OK, how do I make it permanent?
The other error I am seeing is probably not proto's problem, but I will mention it here anyway :
boost/boost-trunk/boost/mpl/size_t_fwd.hpp:23: error: expected unqualified-id before ‘[’ token boost/boost-trunk/boost/mpl/size_t_fwd.hpp:26: error: ‘mpl_::size_t’ has not been declared boost/boost-trunk/boost/mpl/aux_/integral_wrapper.hpp:42: error: expected unqualified-id before ‘[’ token
Any ideas on this?
i'm still fiddlign with this fix. Any report will be appreciated. Can you make a small reproducable test case so i can test it. Also can you rpovide me with your nvcc version ?
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ok, found the joke. I'll try to get a patch up during next week. -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
On Mon, 2010-04-26 at 12:34 -0700, Manjunath Kudlur wrote:
Joel,
The code I am trying is very simple :
#include
namespace proto=boost::proto; int main() { return 0; }
nvcc version is 3.0. I am trying on a 32-bit Linux (Fedora-10) platform.
Manjunath
Manjunath, I was able to compile your code without errors. I'm using Ubuntu linux2.6.28-16-generic x86_64 GNU/Linux + boost-trunk rev. 61489 + nvcc 3.0. Are you sure that you are compiling against the trunk version? Maybe the include path is pointing to the wrong boost version? Regards, Denis
On Mon, Apr 26, 2010 at 12:24 PM, joel falcou
wrote: Manjunath Kudlur wrote:
I noticed that fix for ticket #3919 has been checked-in. Thanks JoelF. I checked out boost trunk, and am trying to compile the following simple program using nvcc. #include
namespace proto=boost::proto; int main() { return 0; }
I was getting "ISO C++ forbids declaration of ‘expr_param’ with no type" error in couple of places in proto/traits.hpp and proto/transform/pass_through.hpp. The code used to look like
typename pass_through_impl::expr_param e
I added a typedef as follows
transform_impl
base_type; and changed the code to
typename base_type::expr_param e
Now the compiler error goes away. I have 2 questions : 1) Is what I am doing the right fix for the problem, or is the nvcc compiler really broken when handling this? 2) If my fix is OK, how do I make it permanent?
The other error I am seeing is probably not proto's problem, but I will mention it here anyway :
boost/boost-trunk/boost/mpl/size_t_fwd.hpp:23: error: expected unqualified-id before ‘[’ token boost/boost-trunk/boost/mpl/size_t_fwd.hpp:26: error: ‘mpl_::size_t’ has not been declared boost/boost-trunk/boost/mpl/aux_/integral_wrapper.hpp:42: error: expected unqualified-id before ‘[’ token
Any ideas on this?
i'm still fiddlign with this fix. Any report will be appreciated. Can you make a small reproducable test case so i can test it. Also can you rpovide me with your nvcc version ?
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Manjunath,
I was able to compile your code without errors. I'm using Ubuntu linux2.6.28-16-generic x86_64 GNU/Linux + boost-trunk rev. 61489 + nvcc 3.0. Are you sure that you are compiling against the trunk version? Maybe the include path is pointing to the wrong boost version? Regards,
Hmm, interesting. I did make sure I am compiling against boost trunk. What version of gcc does your Ubuntu have? Manjunath
On Tue, 2010-04-27 at 13:22 -0700, Manjunath Kudlur wrote:
Manjunath,
I was able to compile your code without errors. I'm using Ubuntu linux2.6.28-16-generic x86_64 GNU/Linux + boost-trunk rev. 61489 + nvcc 3.0. Are you sure that you are compiling against the trunk version? Maybe the include path is pointing to the wrong boost version? Regards,
Hmm, interesting. I did make sure I am compiling against boost trunk. What version of gcc does your Ubuntu have?
Manjunath
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3 But it would not use gcc right? Doesn't nvcc check the file type, so that if my file is named main.cu it will be compiled with nvcc?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Tue, Apr 27, 2010 at 1:34 PM, Denis Taniguchi
On Tue, 2010-04-27 at 13:22 -0700, Manjunath Kudlur wrote:
Manjunath,
I was able to compile your code without errors. I'm using Ubuntu linux2.6.28-16-generic x86_64 GNU/Linux + boost-trunk rev. 61489 + nvcc 3.0. Are you sure that you are compiling against the trunk version? Maybe the include path is pointing to the wrong boost version? Regards,
Hmm, interesting. I did make sure I am compiling against boost trunk. What version of gcc does your Ubuntu have?
Manjunath
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3 But it would not use gcc right? Doesn't nvcc check the file type, so that if my file is named main.cu it will be compiled with nvcc?
Sorry, I should have been more clear. nvcc splits the code into "host" and "device" code and uses the platform provided gcc to compile the host code. That's why I asked about the gcc version. In any case, my linux also has gcc 4.3. So it is a mystery as to how it is working for you. I will try to grab a Ubuntu machine and reproduce your result. Manjunath
participants (3)
-
Denis Taniguchi
-
joel falcou
-
Manjunath Kudlur