lion03 / thrust

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

.NET support #206

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Originally from Thrust issue 55:

Comment 2 by ade.s.miller, Yesterday (18 hours ago)
With VS 2010 you get the following warning if /doc option is set:

c:\cuda\include\driver_types.h(119): warning C4635: XML document comment 
applied to 'cudaErrorTextureFetchFailed': badly-formed XML: Whitespace is not 
allowed at this location.

If /clr option is set then Thrust fails to compile. "namespace generic" 
conflicts with the "generic" keyword used by C++/CLI. I suspect this is by 
design (PPL etc don't support /CLR either) but it isn't called out in the docs 
anywhere and is an obviousl thing to try it you want to glue .NET into CUDA via 
Thrust.

Original issue reported on code.google.com by jaredhoberock on 4 Sep 2010 at 12:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
A temporary "ugly" work-around is to re-define "generic" before including the 
thrust headers:

#define generic _thrust_generic
#include <thrust\device_ptr.h>
#undef generic

Original comment by Patricio...@gmail.com on 22 Feb 2012 at 4:54

GoogleCodeExporter commented 8 years ago
Another issue is the warning about the use of secure versions of the CRT 
functions: 
warning C4996: 'strerror': This function or variable may be unsafe. Consider 
using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. 
See online help for details.

To prevent this:

#define generic _thrust_generic
#pragma warning(push)
#pragma warning(disable: 4996)
#include <thrust\device_ptr.h>
#pragma warning(pop)
#undef generic

Original comment by Patricio...@gmail.com on 22 Feb 2012 at 5:10

GoogleCodeExporter commented 8 years ago
Forwarded to https://github.com/thrust/thrust/issues/94

Original comment by jaredhoberock on 7 May 2012 at 10:08