You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0 is a perfectly valid device value, they are more or less equal to the device ID.
(In very old Cuda versions, the value used to be a 32-bit pointer, hence the name in the structure, but in current versions, the value mostly corresponds to the device ID)
CUdevice.Pointer is just an int, not an IntPtr. CUdevice is also a Cuda specific type and is not supposed to be used outside of the Cuda API. Your example with MarshalInterface<IDirect3DDevice>.FromAbi(device.Pointer) can't work with a Cuda-API provided value, it will only work with adapter.NativePointer.
In the orginal C++ header CUdevice is defined as following:
typedefint CUdevice_v1; /**< CUDA device */typedef CUdevice_v1 CUdevice; /**< CUDA device */
As C# does not have something like a typedef in C++, I use structs to define the custom type. At the end it is just an int. Hope that clarifies things.
The text was updated successfully, but these errors were encountered: