Closed guoxx closed 1 year ago
I reviewed the cudaExternalMemoryHandleDesc structure and there is actually no bug in the code:
cudaExternalMemoryHandleDesc
typedef struct cudaExternalMemoryHandleDesc_st { cudaExternalMemoryHandleType type; union { int fd; struct { void *handle; const void *name; } win32; const void *nvSciBufObject; } handle; unsigned long long size; unsigned int flags; } cudaExternalMemoryHandleDesc];
There is indeed a union but not for handle and name, which are in a struct. So initializing both values is correct and nothing is overwritten.
union
handle
name
struct
I reviewed the
cudaExternalMemoryHandleDesc
structure and there is actually no bug in the code:There is indeed a
union
but not forhandle
andname
, which are in astruct
. So initializing both values is correct and nothing is overwritten.