xiaotaiye / cusp-library

Automatically exported from code.google.com/p/cusp-library
Apache License 2.0
0 stars 0 forks source link

cusp 0.2 not compatible to windows #78

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Trying to use the cusp library by following the QuickStartGuide
2. including header "#include <cusp/hyb_matrix.h>" produces the error

What is the expected output? What do you see instead?
I expect not to see errors by just including the cusp header files.
I see: 
Error   8   error C2039: 'hypotf' : is not a member of '`global 
namespace'' c:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v4.0\include\cusp\complex.h    742

What version of the product are you using? On what operating system?
Cusp 0.2, Windows 7

Please provide any additional information below.
Ok so it looks like that this is a POSIX problem. By going to line 742 and 
replacing "hypotf" with "_hypotf" lets the library be included. This doesnt fix 
the problem, that cusp is not compatible to windows, since several more calls 
to hypotf are being made through out the code. There might be a related error 
which appears by including "#include <cusp/krylov/cg.h>" which produces 
"Error  10  error C2061: syntax error : identifier 'BLOCK_SIZE' c:\Program 
Files\NVIDIA GPU Computing 
Toolkit\CUDA\v4.0\include\cusp\detail\device\spmv\coo_flat.h    162" but i am not 
sure about that.

Original issue reported on code.google.com by inf.ig...@gmail.com on 20 Oct 2011 at 7:25

GoogleCodeExporter commented 8 years ago
This only happens in host code right?

Original comment by filipe.c...@gmail.com on 20 Oct 2011 at 4:01

GoogleCodeExporter commented 8 years ago
Right, just by including the headers. 

Original comment by inf.ig...@gmail.com on 20 Oct 2011 at 5:26

GoogleCodeExporter commented 8 years ago
Somebody know how to solve the issue? 

Original comment by inf.ig...@gmail.com on 24 Oct 2011 at 9:02

GoogleCodeExporter commented 8 years ago
Can you check if the complex.h attached solves the problem?

Original comment by filipe.c...@gmail.com on 24 Oct 2011 at 3:45

Attachments:

GoogleCodeExporter commented 8 years ago
This solves this current problem, but the other, described in "additional 
information" still remains. BLOCK_SIZE seems not to be known. Or should i start 
for this problem a new issue?

Original comment by inf.ig...@gmail.com on 25 Oct 2011 at 8:26

GoogleCodeExporter commented 8 years ago
It might be better to start a new issue and post an example.
Also does the fix i sent also work when you use device code that uses hypotf?

Original comment by filipe.c...@gmail.com on 25 Oct 2011 at 9:56

GoogleCodeExporter commented 8 years ago
Just got the same problem and searching everywhere. I mean the BLOCK_SIZE 
problem. It turns out that after I set the item type from visual c++ to CUDA 
c++, the problem solved. right click and choose property you will see.

Original comment by cupid...@gmail.com on 24 May 2012 at 8:16