//public void SetGraphStructure(nvgraphCSRTopology32I topologyData) //{ // res = NVGraphNativeMathods.nvgraphSetGraphStructure(_context, _descr, ref topologyData, nvgraphTopologyType.CSR32); // Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphSetGraphStructure", res)); // if (res != nvgraphStatus.Success) throw new NVGraphException(res); //} //public void SetGraphStructure(nvgraphCSCTopology32I topologyData) //{ // res = NVGraphNativeMathods.nvgraphSetGraphStructure(_context, _descr, ref topologyData, nvgraphTopologyType.CSC32); // Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphSetGraphStructure", res)); // if (res != nvgraphStatus.Success) throw new NVGraphException(res); // } public void SetGraphStructure(nvgraphTopologyBase topologyData) { nvgraphTopologyType type; if (topologyData is nvgraphCSRTopology32I) { type = nvgraphTopologyType.CSR32; } else { if (topologyData is nvgraphCSCTopology32I) { type = nvgraphTopologyType.CSC32; } else { type = nvgraphTopologyType.COO32; } } res = NVGraphNativeMathods.nvgraphSetGraphStructure(_context, _descr, topologyData, type); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphSetGraphStructure", res)); if (res != nvgraphStatus.Success) { throw new NVGraphException(res); } }
// public void GetGraphStructure(ref nvgraphCSRTopology32I topologyData) //{ // nvgraphTopologyType type = nvgraphTopologyType.CSR32; // res = NVGraphNativeMathods.nvgraphGetGraphStructure(_context, _descr, ref topologyData, ref type); // Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphGetGraphStructure", res)); // if (res != nvgraphStatus.Success) throw new NVGraphException(res); //} //public void GetGraphStructure(ref nvgraphCSCTopology32I topologyData) // { // nvgraphTopologyType type = nvgraphTopologyType.CSC32; // res = NVGraphNativeMathods.nvgraphGetGraphStructure(_context, _descr, ref topologyData, ref type); // Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphGetGraphStructure", res)); // if (res != nvgraphStatus.Success) throw new NVGraphException(res); //} public void GetGraphStructure(nvgraphTopologyBase topologyData, ref nvgraphTopologyType type) { res = NVGraphNativeMathods.nvgraphGetGraphStructure(_context, _descr, topologyData, ref type); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvgraphGetGraphStructure", res)); if (res != nvgraphStatus.Success) { throw new NVGraphException(res); } }
public static extern nvgraphStatus nvgraphSetGraphStructure(nvgraphContext handle, nvgraphGraphDescr descrG, nvgraphTopologyBase topologyData, nvgraphTopologyType TType);
public static extern nvgraphStatus nvgraphConvertTopology(nvgraphContext handle, nvgraphTopologyType srcTType, nvgraphTopologyBase srcTopology, CUdeviceptr srcEdgeData, ref cudaDataType dataType, nvgraphTopologyType dstTType, nvgraphTopologyBase dstTopology, CUdeviceptr dstEdgeData);