private nvgraphSetEdgeData ( |
||
handle | ||
descrG | ||
edgeData | ManagedCuda.BasicTypes.CUdeviceptr | |
setnum | ManagedCuda.BasicTypes.SizeT | |
Résultat | nvgraphStatus |
public void SetEdgeData <Type>(CudaDeviceVariable <Type> edgeData, SizeT setnum) where Type : struct { res = NVGraphNativeMathods.nvgraphSetEdgeData(_context, _descr, edgeData.DevicePointer, setnum); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphSetEdgeData", res)); if (res != nvgraphStatus.Success) { throw new NVGraphException(res); } }
public void SetEdgeData(Array edgeData, SizeT setnum) { GCHandle handle = GCHandle.Alloc(edgeData, GCHandleType.Pinned); try { res = NVGraphNativeMathods.nvgraphSetEdgeData(_context, _descr, handle.AddrOfPinnedObject(), setnum); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphSetEdgeData", res)); if (res != nvgraphStatus.Success) { throw new NVGraphException(res); } } finally { handle.Free(); } }