nvgraphSetEdgeData() 개인적인 메소드

private nvgraphSetEdgeData ( nvgraphContext handle, nvgraphGraphDescr descrG, ManagedCuda.BasicTypes.CUdeviceptr edgeData, ManagedCuda.BasicTypes.SizeT setnum ) : nvgraphStatus
handle nvgraphContext
descrG nvgraphGraphDescr
edgeData ManagedCuda.BasicTypes.CUdeviceptr
setnum ManagedCuda.BasicTypes.SizeT
리턴 nvgraphStatus
예제 #1
0
 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);
     }
 }
예제 #2
0
        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();
            }
        }