/// <summary> see CUDA doc; </summary> public static void CtxCreate(out CUcontext pctx, CUdevice dev, params CUctx_flags_enum[] flags) { uint _flags = 0; foreach (CUctx_flags_enum x in flags) { _flags |= (uint)x; } testResult(my.cuCtxCreate(out pctx, _flags, dev)); }
/// <summary> /// frees the CUDA context /// </summary> public void Dispose() { if (disposed) { return; } disposed = true; cu.ModuleUnload(CudaMatrixKernelDP); CudaMatrixKernelDP = default(CUmodule); CudaMatrixKernelDP_Functions = null; cu.ModuleUnload(CudaVectorKernelDP); CudaVectorKernelDP = default(CUmodule); CudaVectorKernelDP_Functions = null; cu.CtxDestroy(m_context); m_context = default(CUcontext); }
/// <summary> see CUDA doc; </summary> public static void CtxDestroy(CUcontext ctx) { testResult(my.cuCtxDestroy(ctx)); }