nvgraphGetVertexData() private method

private nvgraphGetVertexData ( nvgraphContext handle, nvgraphGraphDescr descrG, ManagedCuda.BasicTypes.CUdeviceptr vertexData, ManagedCuda.BasicTypes.SizeT setnum ) : nvgraphStatus
handle nvgraphContext
descrG nvgraphGraphDescr
vertexData ManagedCuda.BasicTypes.CUdeviceptr
setnum ManagedCuda.BasicTypes.SizeT
return nvgraphStatus
Esempio n. 1
0
 public void GetVertexData <Type>(CudaDeviceVariable <Type> vertexData, SizeT setnum) where Type : struct
 {
     res = NVGraphNativeMathods.nvgraphGetVertexData(_context, _descr, vertexData.DevicePointer, setnum);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphGetVertexData", res));
     if (res != nvgraphStatus.Success)
     {
         throw new NVGraphException(res);
     }
 }
Esempio n. 2
0
        public void GetVertexData(Array vertexData, SizeT setnum)
        {
            GCHandle handle = GCHandle.Alloc(vertexData, GCHandleType.Pinned);

            try
            {
                res = NVGraphNativeMathods.nvgraphGetVertexData(_context, _descr, handle.AddrOfPinnedObject(), setnum);
                Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphGetVertexData", res));
                if (res != nvgraphStatus.Success)
                {
                    throw new NVGraphException(res);
                }
            }
            finally
            {
                handle.Free();
            }
        }