Open fbordignon opened 3 years ago
Hi,
I was fighting a lot with ManagedCuda.BasicTypes.CudaExternalMemoryHandleDesc
to get the fields aligned as in the original C struct (C# and C-unions don't go well together), and NVidia also changed it for the newer versions...
I'm not totally sure if the current layout actually works for all cases, so far no one seems to have ever used it (it is only used for the new graphics API interop replacing the older OpenGL/DirectX interfaces). And your DLL-loader mechanism seems to check stronger than the actual compiler. So just delete the two struct members that are aligned to FieldOffset 4
and it should run smoothly.
Cheers Michael
Hey Michael, removing the two fields with offset 4 does the trick! Me and a teammate were battling this one for the good part of the last week thinking it was something with the vendor's software because we had issues before. Anyways, I own you a beer or a beverage of choice 🤣
Hi guys, I am using managedCuda as part of a dll that is loaded as plugin for another C# software. To package the plugin, an application provided by the software vendor runs the following piece of code:
From what I gather it is listing all types inside the .dll that I've built and its dependencies to search for plugins. But when it gets to the managedCuda.dll it crashes with the following exception:
Do you happen to know why this is happennig and if I can compile managedCuda in such a way to prevent this?
I've tried to compile managedCuda in 64bit only with no success. Aligning the fields to 8 bits offsets can solve this?