Closed N1vS closed 5 years ago
managedCuda cannot derive the types needed for a kernel and just takes what it gets without any conversion. If you provide an int whereas a double is expected, C# or C++ would convert that for you, but managedCuda can't, hence the wrong result; you always must provide the correct type.
Hello,
I tried launching a really simple kernel:
and used the following lines on the c# project:
So in theory it should return 10 to the host variable but for some reason i get the result 4.94065645841247E-323 .
I tried to change all the double statements to int and it works. Can you help me understand why it does that?
Edit: never mind I found out that I needed to specify a decimal dot for the input and now it returns the right value.
Close this issue please.