Unhandled Exception: ManagedCuda.CudaException: ErrorContextIsDestroyed: This error indicates that the context current to the calling thread has been destroyed using ::cuCtxDestroy, or is a primary context which has not yet been initialized.
at ManagedCuda.CudaRegisteredHostMemory`1.Unregister()
at ArrayNDNS.CudaRegMemTypes.f@1-15(CudaRegMemHnd this, Unit unitVar0)
at ArrayNDNS.CudaRegMemTypes.CudaRegMemHnd.System-IDisposable-Dispose()