Exemplo n.º 1
0
        //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);
            }
        }
Exemplo n.º 2
0
        //      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);
            }
        }
Exemplo n.º 3
0
 public static extern nvgraphStatus nvgraphSetGraphStructure(nvgraphContext handle, nvgraphGraphDescr descrG, nvgraphTopologyBase topologyData, nvgraphTopologyType TType);
Exemplo n.º 4
0
 public static extern nvgraphStatus nvgraphConvertTopology(nvgraphContext handle,
                                                           nvgraphTopologyType srcTType, nvgraphTopologyBase srcTopology, CUdeviceptr srcEdgeData, ref cudaDataType dataType,
                                                           nvgraphTopologyType dstTType, nvgraphTopologyBase dstTopology, CUdeviceptr dstEdgeData);
Exemplo n.º 5
0
 public static extern nvgraphStatus nvgraphSetGraphStructure(nvgraphContext handle, nvgraphGraphDescr descrG, nvgraphTopologyBase topologyData, nvgraphTopologyType TType);
Exemplo n.º 6
0
 public static extern nvgraphStatus nvgraphConvertTopology(nvgraphContext handle,
                                 nvgraphTopologyType srcTType, nvgraphTopologyBase srcTopology, CUdeviceptr srcEdgeData, ref cudaDataType dataType,
                                 nvgraphTopologyType dstTType, nvgraphTopologyBase dstTopology, CUdeviceptr dstEdgeData);