Sophie

Sophie

distrib > Mageia > 7 > x86_64 > media > nonfree-updates > by-pkgid > b86a85131cc739c1c53d0b55840a4328 > files > 3622

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.nonfree.x86_64.rpm

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
      <meta name="copyright" content="(C) Copyright 2005"></meta>
      <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
      <meta name="DC.Type" content="concept"></meta>
      <meta name="DC.Title" content="nvGRAPH"></meta>
      <meta name="abstract" content="The API reference guide for nvGRAPH."></meta>
      <meta name="description" content="The API reference guide for nvGRAPH."></meta>
      <meta name="DC.Coverage" content="CUDA API References"></meta>
      <meta name="DC.subject" content="CUDA nvGRAPH, CUDA nvGRAPH features, CUDA nvGRAPH data, CUDA nvGRAPH layout, CUDA nvGRAPH performance, CUDA nvGRAPH API, CUDA nvGRAPH library, CUDA nvGRAPH example"></meta>
      <meta name="keywords" content="CUDA nvGRAPH, CUDA nvGRAPH features, CUDA nvGRAPH data, CUDA nvGRAPH layout, CUDA nvGRAPH performance, CUDA nvGRAPH API, CUDA nvGRAPH library, CUDA nvGRAPH example"></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="abstract"></meta>
      <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
      <title>nvGRAPH :: CUDA Toolkit Documentation</title>
      <!--[if lt IE 9]>
      <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
      <![endif]-->
      <script type="text/javascript" charset="utf-8" src="//assets.adobedtm.com/b92787824f2e0e9b68dc2e993f9bd995339fe417/satelliteLib-7ba51e58dc61bcb0e9311aadd02a0108ab24cc6c.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script>
      <script type="text/javascript" src="../search/htmlFileList.js"></script>
      <script type="text/javascript" src="../search/htmlFileInfoList.js"></script>
      <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script>
      <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script>
      <script type="text/javascript" src="../search/index-1.js"></script>
      <script type="text/javascript" src="../search/index-2.js"></script>
      <script type="text/javascript" src="../search/index-3.js"></script>
      <link rel="canonical" href="http://docs.nvidia.com/cuda/nvgraph/index.html"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
   </head>
   <body>
      
      <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
            <input type="text" name="search-text"></input><fieldset id="search-location">
               <legend>Search In:</legend>
               <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
               <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
            <button type="reset">clear search</button>
            <button id="submit" type="submit">search</button></form>
      </header>
      <div id="site-content">
         <nav id="site-nav">
            <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit 
                  
                  
                  v10.1.168</a></div>
            <div class="category"><a href="index.html" title="nvGRAPH">nvGRAPH</a></div>
            <ul>
               <li>
                  <div class="section-link"><a href="#introduction">1.&nbsp;Introduction</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="#nvgraph-api-reference">2.&nbsp;nvGRAPH API Reference</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="#nvgraphstatus">2.1.&nbsp;Return value nvgraphStatus_t</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph_topology">2.2.&nbsp;nvGRAPH graph topology types</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph_topology_structures">2.3.&nbsp;nvGRAPH topology structure types</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="#nvgraph_topology_csc">2.3.1.&nbsp;nvgraphCSCTopology32I_t</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#nvgraph_topology_csr">2.3.2.&nbsp;nvgraphCSRTopology32I_t</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#nvgraph_topology_el">2.3.3.&nbsp;nvgraphCOOTopology32I_t</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphgetproperty">2.4.&nbsp;Function nvgraphGetProperty()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphcreate">2.5.&nbsp;Function nvgraphCreate()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphdestroy">2.6.&nbsp;Function nvgraphDestroy()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphcreategraphdescr">2.7.&nbsp;Function nvgraphCreateGraphDescr()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphdestroygraphdescr">2.8.&nbsp;Function nvgraphDestroyGraphDescr()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphsetgraphstructure">2.9.&nbsp;Function nvgraphSetGraphStructure()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphgetgraphstructure">2.10.&nbsp;Function nvgraphGetGraphStructure()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphconverttopology">2.11.&nbsp;Function nvgraphConvertTopology()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphconvertgraph">2.12.&nbsp;Function nvgraphConvertGraph()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphallocateedgedata">2.13.&nbsp;Function nvgraphAllocateEdgeData()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphsetedgedata">2.14.&nbsp;Function nvgraphSetEdgeData()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphgetedgedata">2.15.&nbsp;Function nvgraphGetEdgeData()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphallocatevertexdata">2.16.&nbsp;Function nvgraphAllocateVertexData()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphsetvertexdata">2.17.&nbsp;Function nvgraphSetVertexData()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphgetvertexdata">2.18.&nbsp;Function nvgraphGetVertexData()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphextractsubgraphbyvertex">2.19.&nbsp;Function nvgraphExtractSubgraphByVertex()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphextractsubgraphbyedge">2.20.&nbsp;Function nvgraphExtractSubgraphByEdge()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphwidestpath">2.21.&nbsp;Function nvgraphWidestPath()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphsssp">2.22.&nbsp;Function nvgraphSssp()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphsrspmv">2.23.&nbsp;Function nvgraphSrSpmv()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphpagerank">2.24.&nbsp;Function nvgraphPagerank()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphtricount">2.25.&nbsp;Function nvgraphTriangleCount()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#function-nvgraphstatusgetstring">2.26.&nbsp;Function nvgraphStatusGetString()</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#unique_157222822">2.27.&nbsp;nvGRAPH Spectral Clustering API</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="#unique_381131945">2.27.1.&nbsp;Structure SpectralClusteringParameter</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#unique_291163896">2.27.2.&nbsp;Function nvgraphSpectralClustering()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#unique_503059101">2.27.3.&nbsp;Function nvgraphAnalyzeClustering()</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="#unique_781623932">2.28.&nbsp;nvGRAPH Traversal API</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="#param-nvgraphtraversalalgo">2.28.1.&nbsp;nvGRAPH traversal algorithms</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#struct-nvgraphtraversalparameter">2.28.2.&nbsp;nvgraphTraversalParameter_t parameter struct</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalparameterinit">2.28.3.&nbsp;nvgraphTraversalParameterInit()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalsetdistancesindex">2.28.4.&nbsp;nvgraphTraversalSetDistancesIndex()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalgetdistancesindex">2.28.5.&nbsp;nvgraphTraversalGetDistancesIndex()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalsetpredecessorsindex">2.28.6.&nbsp;nvgraphTraversalSetPredecessorsIndex()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalgetpredecessorsindex">2.28.7.&nbsp;nvgraphTraversalGetPredecessorsIndex()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalsetedgemaskindex">2.28.8.&nbsp;nvgraphTraversalSetEdgeMaskIndex()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalgetedgemaskindex">2.28.9.&nbsp;nvgraphTraversalGetEdgeMaskIndex()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalsetundirectedflag">2.28.10.&nbsp;nvgraphTraversalSetUndirectedFlag()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalgetundirectedflag">2.28.11.&nbsp;nvgraphTraversalGetUndirectedFlag()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalsetalpha">2.28.12.&nbsp;nvgraphTraversalSetAlpha()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalgetalpha">2.28.13.&nbsp;nvgraphTraversalGetAlpha()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalsetbeta">2.28.14.&nbsp;nvgraphTraversalSetBeta()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversalgetbeta">2.28.15.&nbsp;nvgraphTraversalGetBeta()</a></div>
                           </li>
                           <li>
                              <div class="section-link"><a href="#function-nvgraphtraversal">2.28.16.&nbsp;nvgraphTraversal()</a></div>
                           </li>
                        </ul>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="#nvgraph-code-examples">3.&nbsp;nvGRAPH Code Examples</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="#nvgraph-converttopology-example">3.1.&nbsp;nvGRAPH convert topology example</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph-convertgraph-example">3.2.&nbsp;nvGRAPH convert graph example</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph-pagerank-example">3.3.&nbsp;nvGRAPH pagerank example</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph-sssp-example">3.4.&nbsp;nvGRAPH SSSP example</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph-semiringspmv-example">3.5.&nbsp;nvGRAPH Semi-Ring SPMV example</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph-trianglescounting-example">3.6.&nbsp;nvGRAPH Triangles Counting example</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#nvgraph-traversal-example">3.7.&nbsp;nvGRAPH Traversal example</a></div>
                     </li>
                  </ul>
               </li>
            </ul>
         </nav>
         <div id="resize-nav"></div>
         <nav id="search-results">
            <h2>Search Results</h2>
            <ol></ol>
         </nav>
         
         <div id="contents-container">
            <div id="breadcrumbs-container">
               <div id="release-info">nvGRAPH
                  (<a href="../../pdf/nvGRAPH_Library.pdf">PDF</a>)
                  -
                   
                  
                  
                  v10.1.168
                  (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
                  -
                  Last updated April 24, 2019
                  -
                  <a href="mailto:CUDAIssues@nvidia.com?subject=CUDA Toolkit Documentation Feedback: nvGRAPH">Send Feedback</a></div>
            </div>
            <article id="contents">
               <div class="topic nested0" id="abstract"><a name="abstract" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#abstract" name="abstract" shape="rect">nvGRAPH</a></h2>
                  <div class="body conbody">
                     <p class="shortdesc">The API reference guide for nvGRAPH.</p>
                  </div>
               </div>
               <div class="topic concept nested0" xml:lang="en-us" id="introduction"><a name="introduction" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#introduction" name="introduction" shape="rect">1.&nbsp;Introduction</a></h2>
                  <div class="body conbody">
                     <p class="p">Data analytics is a growing application of high-performance computing. Many advanced data analytics problems can be couched
                        as graph problems.  In turn, many of the common graph problems today can be couched as sparse linear algebra. This is the
                        motivation for nvGRAPH, new in  NVIDIA® CUDA™ 8.0, which harnesses the power of GPUs for linear algebra to handle the largest
                        graph analytics and big data analytics problems.
                        
                     </p>
                     <p class="p">
                        This release provides graph construction and manipulation primitives, and a set of useful graph algorithms optimized for the
                        GPU. The core functionality is a SPMV (sparse matrix vector product) using a semi-ring model with automatic load balancing
                        for any sparsity pattern. For more information on semi-rings and their uses, we recommend the book "Graph Algorithms in the
                        Language of Linear Algebra", by Jeremy Kepner and John Gilbert.  
                        
                     </p>
                     <p class="p">To use nvGRAPH you should be sure the nvGRAPH library is in the environment (PATH on Windows, LD_LIBRARY_PATH on Linux), "#include
                        nvgraph.h" to your source files referencing the nvGRAPH API, and link your code using -lnvgraph on the command line, or add
                        libnvgraph to your library dependencies. We have tested nvGRAPH using GCC 4.8 and higher on Linux, Visual Studio 2012 and
                        Visual Studio 2014 on Windows.  
                        
                     </p>
                     <p class="p">A typical workflow for using nvGRAPH is to begin by calling nvgraphCreate() to initialize the library. Next the user can proceed
                        to upload graph data to the library through nvGRAPH's API; if there is already a graph loaded in device memory then you just
                        need a pointer to the data arrays for the graph.  Graphs may be uploaded using the CSR (compressed sparse row) format and
                        the CSC(compressed column storage) format, using nvgraphCreateGraphDescr().  This creates an opaque handle to the graph object,
                        called the "graph descriptor", which represents the graph topology and its data. Graph data can be attached to vertices and/or
                        edges of the graph, using nvgraphSetVertexData() and nvgraphSetEdgeData() respectively. Multiple values for data can co-exist
                        on each edge or vertex at the same time, each is accessed by an index into the array of data sets. Then the user can execute
                        graph algorithms on the data, extract a subgraph from the data, or reformat the data using the nvGRAPH API. The user can download
                        the results back to host, or copy them to another location on the device, and once all calculations are done the user should
                        call nvgraphDestroy() to free resources used by nvGRAPH.  
                        
                     </p>
                     <p class="p"> nvGRAPH depends on features only present in CUDA capability 3.0 and higher architectures. This means that nvGRAPH will only
                        run on Kepler generation or newer cards. This choice was made to provide the best performance possible. 
                        
                     </p>
                     <p class="p"> We recommend the user start by inspecting the example codes provided, and adapt from there for their own use.
                        
                     </p>
                  </div>
               </div>
               <div class="topic concept nested0" xml:lang="en-us" id="nvgraph-api-reference"><a name="nvgraph-api-reference" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#nvgraph-api-reference" name="nvgraph-api-reference" shape="rect">2.&nbsp;nvGRAPH API Reference</a></h2>
                  <div class="body conbody">
                     <p class="p">This chapter specifies the behavior of the nvGRAPH library functions by describing their input/output parameters, data types,
                        and error codes.
                     </p>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraphstatus"><a name="nvgraphstatus" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraphstatus" name="nvgraphstatus" shape="rect">2.1.&nbsp;Return value nvgraphStatus_t</a></h3>
                     <div class="body conbody">
                        <p class="p">All nvGRAPH Library return values except for <samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp> indicate that the current API call failed and the user should reconfigure to correct the problem. The possible return values
                           are defined as follows:
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH operation was successful</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_NOT_INITIALIZED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">The nvGRAPH library was not initialized. This is usually caused by the lack of a prior call, an error in the CUDA Runtime
                                          API called by the nvGRAPH routine, or an error in the hardware setup.
                                       </p>
                                       <p class="p"><strong class="ph b">To correct:</strong> call <samp class="ph codeph">nvgraphCreate()</samp> prior to the function call; and check that the hardware, an appropriate version of the driver, and the nvGRAPH library are
                                          correctly installed.
                                       </p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_ALLOC_FAILED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">Resource allocation failed inside the nvGRAPH library. This is usually caused by a <samp class="ph codeph">cudaMalloc()</samp> failure.
                                       </p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">An unsupported value or parameter was passed to the function </p>
                                       <p class="p"><strong class="ph b">To correct:</strong> ensure that all the parameters being passed have valid values.
                                       </p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_ARCH_MISMATCH</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">The function requires a feature absent from the device architecture.</p>
                                       <p class="p"><strong class="ph b">To correct:</strong> compile and run the application on a device with appropriate compute capability.
                                       </p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_MAPPING_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">An access to GPU memory space failed.</p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_EXECUTION_FAILED </samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">The GPU program failed to execute. This is often caused by a launch failure of the kernel on the GPU, which can be caused
                                          by multiple reasons.
                                       </p>
                                       <p class="p"><strong class="ph b">To correct:</strong> check that the hardware, an appropriate version of the driver, and the nvGRAPH library are correctly installed.
                                       </p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph"> NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">An internal nvGRAPH operation failed.</p>
                                       <p class="p"><strong class="ph b">To correct:</strong> check that the hardware, an appropriate version of the driver, and the nvGRAPH library are correctly installed. Also, check
                                          that the memory passed as a parameter to the routine is not being deallocated prior to the routine’s completion.
                                       </p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">The type is not supported by this function. This is usually caused by passing an invalid graph descriptor to the function.</p>
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_NOT_CONVERGED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       <p class="p">An algorithm failed to converge. </p>
                                       <p class="p"><strong class="ph b">To correct:</strong>  ensure that all the parameters being passed have valid values for this algorithm, increase the maximum number of iteration
                                          and/or the tolerance.
                                       </p>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph_topology"><a name="nvgraph_topology" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph_topology" name="nvgraph_topology" shape="rect">2.2.&nbsp;nvGRAPH graph topology types</a></h3>
                     <div class="body conbody">
                        <p class="p">nvGRAPH separates the topology (connectivity) of a graph from the values.  To make specifying a topology easier, nvGRAPH supports
                           three topology types. Each topology type defines its own storage format, which have benefits for some operations but detriments
                           for others. Some algorithms can work only with specific topology types, see the algorithms descriptions for the list of supported
                           topologies.
                        </p><pre xml:space="preserve">
typedef enum
{
   NVGRAPH_CSR_32 = 0,
   NVGRAPH_CSC_32 = 1,
   NVGRAPH_COO_32 = 2
} nvgraphTopologyType_t;
</pre><div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Topology types</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_CSR_32</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Compressed Sparse Row format (row major format). Used in SrSPMV algorithm. Use nvgraphCSRTopology32I_t topology structure
                                       for this format.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_CSC_32</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Compressed Sparse Column format (column major format). Used in SSSP, WidestPath and Pagerank algorithms. Use nvgraphCSCTopology32I_t
                                       topology structure for this format.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_COO_32</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Coordinate list format with source or destination major. Not used in any algorithm and provided for data storage only. Use
                                       nvgraphCOOTopology32I_t topology structure for this format.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph_topology_structures"><a name="nvgraph_topology_structures" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph_topology_structures" name="nvgraph_topology_structures" shape="rect">nvGRAPH topology structure types</a></h3>
                     <div class="body conbody">
                        <p class="p">Graph topology structures are used to set or retrieve topology data. Users should use the structure that corresponds to the
                           chosen topology type.
                        </p>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="nvgraph_topology_csc"><a name="nvgraph_topology_csc" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph_topology_csc" name="nvgraph_topology_csc" shape="rect">2.3.1.&nbsp;nvgraphCSCTopology32I_t</a></h3>
                        <div class="body conbody">
                           <p class="p">Used for <samp class="ph codeph">NVGRAPH_CSC_32</samp> topology type
                           </p><pre xml:space="preserve">
struct nvgraphCSCTopology32I_st {
  int nvertices;
  int nedges;
  int *destination_offsets;
  int *source_indices;
};
typedef struct nvgraphCSCTopology32I_st *nvgraphCSCTopology32I_t;
</pre><div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Structure fields</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nvertices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of vertices in the graph.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nedges</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of edges in the graph.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">destination_offsets</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">nvertices+1</samp>, where <samp class="ph codeph">i</samp> element equals to the number of the first edge for this vertex in the list of all incoming edges in the <samp class="ph codeph">source_indices</samp> array. Last element stores total number of edges
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">source_indices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">nedges</samp>, where each value designates source vertex for an edge.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="nvgraph_topology_csr"><a name="nvgraph_topology_csr" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph_topology_csr" name="nvgraph_topology_csr" shape="rect">2.3.2.&nbsp;nvgraphCSRTopology32I_t</a></h3>
                        <div class="body conbody">
                           <p class="p">Used for <samp class="ph codeph">NVGRAPH_CSR_32</samp> topology type
                           </p><pre xml:space="preserve">
struct nvgraphCSRTopology32I_st {
  int nvertices;
  int nedges;
  int *source_offsets;
  int *destination_indices;
};
typedef struct nvgraphCSRTopology32I_st *nvgraphCSRTopology32I_t;
</pre><div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Structure fields</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nvertices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of vertices in the graph.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nedges</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of edges in the graph.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">source_offsets</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">nvertices+1</samp>, where <samp class="ph codeph">i</samp> element equals to the number of the first edge for this vertex in the list of all outgoing edges in the <samp class="ph codeph">destination_indices</samp> array. Last element stores total number of edges
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">destination_indices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">nedges</samp>, where each value designates destanation vertex for an edge.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="nvgraph_topology_el"><a name="nvgraph_topology_el" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph_topology_el" name="nvgraph_topology_el" shape="rect">2.3.3.&nbsp;nvgraphCOOTopology32I_t</a></h3>
                        <div class="body conbody">
                           <p class="p">Used for <samp class="ph codeph">NVGRAPH_COO_32</samp> topology type
                           </p><pre xml:space="preserve">
struct nvgraphCOOTopology32I_st {
  int nvertices;
  int nedges;
  int *source_indices;
  int *destination_indices;
  nvgraphTag_t tag;
};
typedef struct nvgraphCOOTopology32I_st *nvgraphCOOTopology32I_t;
</pre><div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Structure fields</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nvertices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of vertices in the graph.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nedges</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of edges in the graph.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">source_indices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">nedges</samp>, where each value designates the source vertex for an edge.
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">destination_indices</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">nedges</samp>, where each value designates the destination vertex for an edge.
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">tag</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One of the values of <samp class="ph codeph">NVGRAPH_UNSORTED</samp>, <samp class="ph codeph">NVGRAPH_SORT_BY_SOURCE</samp> or <samp class="ph codeph">NVGRAPH_SORT_BY_DESTINATION</samp> to indicate topology order.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphgetproperty"><a name="function-nvgraphgetproperty" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphgetproperty" name="function-nvgraphgetproperty" shape="rect">2.4.&nbsp;Function nvgraphGetProperty()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphGetProperty(libraryPropertyType type, int *value);
      </pre><p class="p">Returns property value of a library, such as version number.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Identifier of a library property, such as <samp class="ph codeph">MAJOR_VERSION</samp>, <samp class="ph codeph">MINOR_VERSION</samp> or <samp class="ph codeph">PATCH_LEVEL</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Value of a requested property<br clear="none"></br></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH successfully created the handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Invalid property requested.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphcreate"><a name="function-nvgraphcreate" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphcreate" name="function-nvgraphcreate" shape="rect">2.5.&nbsp;Function nvgraphCreate()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphCreate(nvgraphHandle_t *handle);
      </pre><p class="p">Creates only an opaque handle, and allocates small data structures on the host. This handle is used in all of the nvGRAPH
                           functions, so this function should be called first, before any other calls are made to the library.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">nvgraphHandle_t</samp> object
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH successfully created the handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_ALLOC_FAILED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of resources for the handle failed.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphdestroy"><a name="function-nvgraphdestroy" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphdestroy" name="function-nvgraphdestroy" shape="rect">2.6.&nbsp;Function nvgraphDestroy()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphDestroy(nvgraphHandle_t handle);
      </pre><p class="p">
                           Destroys a handle created with <samp class="ph codeph">nvgraphCreate()</samp>. This will automatically release any allocated memory objects created with this handle, for example any graphs and their
                           vertices' and edges' data. Any subsequent usage of this handle after calling nvgraphDestroy() will be invalid.  Any calls
                           to the nvGRAPH API after nvgraphDestroy() is called will return 'NVGRAPH_UNINITIALIZED' errors.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">nvgraphHandle_t</samp> object of the handle to be destroyed.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH successfully destroyed the handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">handle</samp> parameter is not a valid handle.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphcreategraphdescr"><a name="function-nvgraphcreategraphdescr" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphcreategraphdescr" name="function-nvgraphcreategraphdescr" shape="rect">2.7.&nbsp;Function nvgraphCreateGraphDescr()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphCreateGraphDescr(nvgraphHandle_t handle, nvgraphGraphDescr_t *descrG);
      </pre><p class="p">
                           Creates opaque handle for a graph structure. This handle is required for any operation on the graph.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the empty <samp class="ph codeph">nvgraphGraphDescr_t</samp> structure object.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad library handle is provided</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_ALLOC_FAILED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Cannot allocate graph descriptor.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphdestroygraphdescr"><a name="function-nvgraphdestroygraphdescr" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphdestroygraphdescr" name="function-nvgraphdestroygraphdescr" shape="rect">2.8.&nbsp;Function nvgraphDestroyGraphDescr()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphDestroyGraphDescr(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG);
      </pre><p class="p">
                           Destroys a graph handle created with nvgraphCreateGraphDescr(). This won't release any memory allocated for this graph until
                           the nvGRAPH library handle is destroyed. Calls to manipulate destroyed graphs will return NVGRAPH_STATUS_INVALID_VALUE.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph descriptor to be released</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Successful release of the graph descriptor</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph is stored with unknown type of data</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Invalid library handle or graph descriptor handle</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphsetgraphstructure"><a name="function-nvgraphsetgraphstructure" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphsetgraphstructure" name="function-nvgraphsetgraphstructure" shape="rect">2.9.&nbsp;Function nvgraphSetGraphStructure()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphSetGraphStructure( nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      void* topologyData, nvgraphTopologyType_t TType);
      </pre><p class="p">
                           This call sets both topology data and topology type for the given graph descriptor. Graph topology should be set only once.
                           Users should choose one of the supported topologies, fill in the corresponding structure for the graph structure initialization
                           and provide a pointer to this structure.  The topology data and type are given in parameters <samp class="ph codeph">topologyData</samp> and <samp class="ph codeph">TType</samp>. Typically graph topology data includes a number of vertices, number of edges and connectivity information. Look at the description
                           of the corresponding topology structures for details.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">topologyData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a filled structure of one of the types <samp class="ph codeph">{nvgraphCSRTopology32I_t, nvgraphCSCTopology32I_t}</samp>. The particular type to be used is defined by parameter TType.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">TType</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph topology type. This value should be equal to one of the possible values of the enum <samp class="ph codeph">nvgraphTopologyType_t</samp>. This defines what data structure should be provided by the <samp class="ph codeph">topologyData</samp> parameter.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph descriptor. Must not have topology previously defined.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Invalid library handle, topology data structure pointer or topology values, or graph topology was already set</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Provided topology type is not supported</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Unknown internal error was caught</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphgetgraphstructure"><a name="function-nvgraphgetgraphstructure" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphgetgraphstructure" name="function-nvgraphgetgraphstructure" shape="rect">2.10.&nbsp;Function nvgraphGetGraphStructure()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphGetGraphStructure( nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      void* topologyData, nvgraphTopologyType_t* TType);
      </pre><p class="p">
                           This function allows users to retrieve a given graph's topology and topology data such as the number of vertices and edges
                           in the graph. Users must provide a graph descriptor as well as an empty topology structure, where this information will be
                           stored.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph descriptor. This graph should have its topology structure previously set.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">topologyData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a structure of one of the types <samp class="ph codeph">{nvgraphCSRTopology32I_t, nvgraphCSCTopology32I_t}</samp> matching the graph topology. If the field is <samp class="ph codeph">NULL</samp> it will be ignored and only graph topology will be returned. The user can point source and destination fields in the structure
                                       to a host or device memory to retrive connectivity information, if one of the fields is NULL it will be ignored.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">TType</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to <samp class="ph codeph">nvgraphTopologyType_t</samp> where graph topology will be returned. If the field is NULL it will be ignored and only topology data will be returned.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Invalid library handle, graph descriptor or topology for the graph is not set.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Unsupported topology or graph's topology doesn't match provided parameter.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphconverttopology"><a name="function-nvgraphconverttopology" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphconverttopology" name="function-nvgraphconverttopology" shape="rect">2.11.&nbsp;Function nvgraphConvertTopology()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphConvertTopology(nvgraphHandle_t handle, 
      nvgraphTopologyType_t srcTType, void *srcTopology, void *srcEdgeData,
      cudaDataType_t *dataType,
      nvgraphTopologyType_t dstTType, void *dstTopology, void *dstEdgeData);
      </pre><p class="p">
                           Convert one of the supported topologys to another. In case the source and destination topologies are the same, the function
                           will perform a straight memory copy.
                           
                        </p>
                        <p class="p">
                           This function assumes that source and destination arrays within the topologies and edge data reside in GPU (device) memory.
                           It is the user's responsibility to allocate memory and copy data between GPU memory and CPU memory using standard CUDA runtime
                           API routines, such as <samp class="ph codeph">cudaMalloc()</samp>, <samp class="ph codeph">cudaFree()</samp>, <samp class="ph codeph">cudaMemcpy()</samp>, and <samp class="ph codeph">cudaMemcpyAsync()</samp>.
                           
                        </p>
                        <p class="p">
                           If the destination topology is <samp class="ph codeph">nvgraphCOOTopology32I_st</samp>, the tag field needs to be set to one of the values of <samp class="ph codeph">NVGRAPH_UNSORTED</samp>, <samp class="ph codeph">NVGRAPH_SORT_BY_SOURCE</samp> or <samp class="ph codeph">NVGRAPH_SORT_BY_DESTINATION</samp> to tell the library how the user wants entries sorted (or not).
                           
                        </p>
                        <p class="p">
                           The function requires extra buffer storage in the device memory for some of the conversion operations, the extra storage is
                           proportional to the topology size. The function is executed asynchronously with respect to the host and may return control
                           to the application on the host before the result is ready.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">srcTType</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Source topology type. This value should be equal to one of the possible values of the enum <samp class="ph codeph">nvgraphTopologyType_t</samp>. This defines what data structure type should be provided by the <samp class="ph codeph">srcTopology</samp> parameter.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">srcTopology</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Pointer to a structure of one of the types <samp class="ph codeph">{nvgraphCSRTopology32I_t, nvgraphCSCTopology32I_t, nvgraphCOOTopology32I_st}</samp>. The particular type to be used is defined by parameter <samp class="ph codeph">srcTType</samp>. The function assumes that source and destination arrays within the structure reside in device memory.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">srcEdgeData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Pointer to the user memoryspace where edge data are stored. Must be device memory.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">dataType</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Edge data type. This value should be equal to one of <samp class="ph codeph">CUDA_R_32F</samp> or <samp class="ph codeph">CUDA_R_64F</samp>. This defines what data type is provided by the <samp class="ph codeph">srcEdgeData</samp> and <samp class="ph codeph">dstEdgeData</samp> parameters.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">dstTType</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Destination topology type. This value should be equal to one of the possible values of the enum <samp class="ph codeph">nvgraphTopologyType_t</samp>. This defines what data structure type should be provided by the <samp class="ph codeph">dstTopology</samp> and parameter.
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">dstTopology</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Pointer to a structure of one of the types <samp class="ph codeph">{nvgraphCSRTopology32I_t, nvgraphCSCTopology32I_t, nvgraphCOOTopology32I_st}</samp> where conversion results will be stored. The particular type to be used is defined by parameter <samp class="ph codeph">dstTType</samp>. The function assumes that source and destination arrays within the structure are pre-allocated by the user with at least
                                       the number of bytes needed by the topology. Source and destination arrays are assumed to reside in device memory.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">dstEdgeData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Pointer to the user memoryspace where converted edge data will be stored. Must be device memory and have at least <samp class="ph codeph">number_of_vertices*sizeof(dataType)</samp> bytes.
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one topology or edge set is not supported. Currently we support float and double type values.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphconvertgraph"><a name="function-nvgraphconvertgraph" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphconvertgraph" name="function-nvgraphconvertgraph" shape="rect">2.12.&nbsp;Function nvgraphConvertGraph()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphConvertGraph(nvgraphHandle_t handle,
      nvgraphGraphDescr_t srcDescrG, nvgraphGraphDescr_t dstDescrG,
      nvgraphTopologyType_t dstTType);
      </pre><p class="p">
                           Convert one of the supported graph types to another. The function will allocate the necessary memory for the destination graph.
                           It is recommended to use this function over <samp class="ph codeph">nvgraphConvertTopology</samp> when converting a large data set.
                           
                        </p>
                        <p class="p">
                           In addition to the destination graph memory, the function requires extra buffer storage in the device memory for some of the
                           conversion operation, the extra storage is proportional to the topology size. The function is executed asynchronously with
                           respect to the host and may return control to the application on the host before the result is ready.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">srcDescrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Source graph descriptor. This graph should have its topology structure previously set, and optionally vertex and edge data
                                       set.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">dstTType</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Destination topology type. This value should be equal to one of the possible values of <samp class="ph codeph">{nvgraphCSRTopology32I_t, nvgraphCSCTopology32I_t, nvgraphCOOTopology32I_t}</samp>. This defines what data structure type should be provided by the <samp class="ph codeph">dstTopology</samp> and parameter.
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">dstDescrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Destination graph descriptor. Must be an empty descriptor created with <samp class="ph codeph">nvgraphCreateGraphDescr</samp> and not have a topology set.
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one topology or edge set is not supported. Currently we support float and double type values.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphallocateedgedata"><a name="function-nvgraphallocateedgedata" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphallocateedgedata" name="function-nvgraphallocateedgedata" shape="rect">2.13.&nbsp;Function nvgraphAllocateEdgeData()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphAllocateEdgeData(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      size_t numsets, cudaDataType_t *settypes);
      </pre><p class="p">
                           Allocates one or more storages for the data associated with graph edges. Number of allocated storages is specified by the
                           numsets parameter. Types for each of the allocated storages should be provided in the array settypes of size numsets. Right
                           now nvGRAPH graphs are limited to have data storages to have same type and same size - all elements of settypes array should
                           be the same and all of those storages will have number of elements equal to the number of edges in the graph. Vertices data
                           allocated with nvgraphAllocateVerticesData() function should have the same datatype as edge data. These storages could later
                           be used in other functions by indices from <samp class="ph codeph">0</samp> to <samp class="ph codeph">numsets-1</samp>. This function could be called successfully only once for each graph.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">numsets</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of datasets to allocate for the edges. Should be more than 0.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">settypes</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">numsets</samp> that specifies types of allocated datasets. All values in this array should be the same and match graph's datasets data type,
                                       if exists.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Descriptor of the graph for which edge data is allocated. Should not have previously allocated edge data and have it's topology
                                       properly initialized.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Invalid function parameters, inconsistent types in the type array, types doesn't match graph's type or graph is not initialized
                                       for data allocation.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Types provided in parameter are not supported.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphsetedgedata"><a name="function-nvgraphsetedgedata" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphsetedgedata" name="function-nvgraphsetedgedata" shape="rect">2.14.&nbsp;Function nvgraphSetEdgeData()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphSetEdgeData(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      void *edgeData, size_t setnum);
      </pre><p class="p">
                           Update a specific edge value set (weights) of the graph with the user's provided values.   
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain the connectivity information and the edge set <samp class="ph codeph">setnum</samp></td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*edgeData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the data to load into the edge value set. This entry expects to read one value for each edge. Conversions are not
                                       supported so the user's type before the void* cast should be equivalent to the one specified  in <samp class="ph codeph">nvgraphAllocateEdgeData</samp></td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">setnum</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The identifier of the set to update. This assumes that <samp class="ph codeph">setnum</samp> is one of the the edge set allocated in the past using <samp class="ph codeph">nvgraphAllocateEdgeData</samp>. Sets have 0-based index
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphgetedgedata"><a name="function-nvgraphgetedgedata" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphgetedgedata" name="function-nvgraphgetedgedata" shape="rect">2.15.&nbsp;Function nvgraphGetEdgeData()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphGetEdgeData(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      void *edgeData, size_t setnum);
      </pre><p class="p">
                           Downloads one dataset associated with graph edges using <samp class="ph codeph">setnum</samp> index to the user memoryspace. <samp class="ph codeph">edgeData</samp> could point to either host or device memoryspace. Size of the data transfer depends on the edges number of the graph and
                           graph's data type.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph descriptor. Graph should contain at least one data set associated with it's vertices</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">setnum</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Index of the source data set of the graph edge data. Value should be between <samp class="ph codeph">0</samp> and <samp class="ph codeph">edge_dataset_number-1</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">edgeData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the user memoryspace where edge data will be stored. Could be either host or device memory and have at least <samp class="ph codeph">number_of_edges*sizeof(graph_data_type)</samp> bytes.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Incorrect function parameter, graph has no associated edge data sets or topology type doesn't match.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph datatype or topology type is not supported.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Memory copy failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphallocatevertexdata"><a name="function-nvgraphallocatevertexdata" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphallocatevertexdata" name="function-nvgraphallocatevertexdata" shape="rect">2.16.&nbsp;Function nvgraphAllocateVertexData()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphAllocateVertexData(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      size_t numsets, cudaDataType_t *settypes);
      </pre><p class="p">
                           Allocates one or more storages for the data associated with graph vertices. Number of allocated storages is specified by the
                           numsets parameter. Types for each of the allocated storages should be provided in the array settypes of size numsets. Right
                           now nvGRAPH graphs are limited to have data storages to have same type and same size - all elements of settypes array should
                           be the same and all of those storages will have number of elements equal to the number of vertices in the graph. Edge data
                           allocated with nvgraphAllocateEdgeData() function should have the same datatype as vertex data. These storages could later
                           be used in other functions by indices from <samp class="ph codeph">0</samp> to <samp class="ph codeph">numsets-1</samp>. This function could be called successfully only once for each graph.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">numsets</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of datasets to allocate for the vertices. Should be more than 0.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">settypes</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">numsets</samp> that specifies types of allocated datasets. All values in this array should be the same and match graph's datasets data type,
                                       if exists.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input/Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Descriptor of the graph for which edge data is allocated. Should not have previously allocated edge data and have it's topology
                                       properly initialized.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Invalid function parameters, inconsistent types in the type array, types doesn't match graph's type or graph is not initialized
                                       for data allocation.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Types provided in parameter are not supported.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphsetvertexdata"><a name="function-nvgraphsetvertexdata" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphsetvertexdata" name="function-nvgraphsetvertexdata" shape="rect">2.17.&nbsp;Function nvgraphSetVertexData()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphSetVertexData(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      void *vertexData, size_t setnum);
      </pre><p class="p">
                           Update a specific vertex value set of the graph with the user's provided values.          
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain the connectivity information and vertex set <samp class="ph codeph">setnum</samp>.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*vertexData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the data to load into the vertex value set. This entry expects to read one value for each vertex. Conversions are
                                       not supported so the user's type before the void* cast should be equivalent to the one specified  in <samp class="ph codeph">nvgraphAllocateVertexData</samp></td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">setnum</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The identifier of the set to update. This assumes that <samp class="ph codeph">setnum</samp> is one of the the vertex set allocated in the past using <samp class="ph codeph">nvgraphAllocateVertexData</samp>. Sets have 0-based index
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphgetvertexdata"><a name="function-nvgraphgetvertexdata" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphgetvertexdata" name="function-nvgraphgetvertexdata" shape="rect">2.18.&nbsp;Function nvgraphGetVertexData()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphGetVertexData(nvgraphHandle_t handle, nvgraphGraphDescr_t descrG,
      void *vertexData, size_t setnum);
      </pre><p class="p">
                           Downloads one dataset associated with graph vertices using <samp class="ph codeph">setnum</samp> index to the user memoryspace. <samp class="ph codeph">vertexData</samp> could point to either host or device memoryspace. Size of the data transfer depends on the vertex number of the graph and
                           graph's data type.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph descriptor. Graph should contain at least one data set associated with it's vertices</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">setnum</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Index of the source data set of the graph vertex data. Value should be between <samp class="ph codeph">0</samp> and <samp class="ph codeph">vertex_dataset_number-1</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">edgeData</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the user memoryspace where vertex data will be stored. Could be either host or device memory and have at least
                                       <samp class="ph codeph">number_of_vertices*sizeof(graph_data_type)</samp> bytes.
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Incorrect function parameter, graph has no associated vertex data sets or topology type doesn't match.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Graph datatype or topology type is not supported.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Memory copy failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphextractsubgraphbyvertex"><a name="function-nvgraphextractsubgraphbyvertex" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphextractsubgraphbyvertex" name="function-nvgraphextractsubgraphbyvertex" shape="rect">2.19.&nbsp;Function nvgraphExtractSubgraphByVertex()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphExtractSubgraphByVertex(nvgraphHandle_t handle, 
      nvgraphGraphDescr_t descrG, nvgraphGraphDescr_t subdescrG, 
      int *subvertices, size_t numvertices);
      </pre><p class="p">
                           Create a new graph by extracting a subgraph given an array of vertices, consisting of row indices in the graph incidence matrix;
                           array must be: (i) free of duplicates; (ii) sorted in ascending order; (iii) must consist of indices with values between 0
                           and <samp class="ph codeph">graph_nvertices-1</samp>.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH handle of the source graph (original graph)</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH descriptor of the source graph (original graph)</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">subvertices</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">array containing vertex indices (row indices in graph incidence matrix) of the subgraph to be extracted; array must be: (i)
                                       free of duplicates; (ii) sorted in ascending order; (iii) must consist of indices with values between 0 and <samp class="ph codeph">graph_nvertices-1</samp>.
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">numvertices</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">the size of subvertices[] array. Should be more than 0 and less or equal to the number of graph's vertices.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">subdescrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH graph descriptor of the target graph (subgraph)</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH target (subgraph) was created succesfully.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of specified nvGRAPH is not supported.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphextractsubgraphbyedge"><a name="function-nvgraphextractsubgraphbyedge" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphextractsubgraphbyedge" name="function-nvgraphextractsubgraphbyedge" shape="rect">2.20.&nbsp;Function nvgraphExtractSubgraphByEdge()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphExtractSubgraphByEdge(nvgraphHandle_t handle, 
      nvgraphGraphDescr_t descrG, nvgraphGraphDescr_t subdescrG,
      int *subedges, size_t numedges);
      </pre><p class="p">
                           Create a new graph by extracting a subgraph given an array of edges, consisting of indices in the col_ind[] array of the the
                           graph incidence matrix CSR representation); the array of edges must be: (i) free of duplicates; (ii) sorted in ascending order;
                           (iii) must consist of indices with values between 0 and <samp class="ph codeph">graph_nedges-1</samp>.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH handle of the source graph (original graph)</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH descriptor of the source graph (original graph)</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">subedges</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">array containing edge indices (indices in the col_ind[] array of the the graph incidence matrix CSR representation) of the
                                       subgraph to be extracted; array must be: (i) free of duplicates; (ii) sorted in ascending order; (iii) must consist of indices
                                       with values between 0 and <samp class="ph codeph">graph_nedges-1</samp></td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">numedges</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">the size of subedges[] array, should be more than 0 and less or equal to number of graph's edges</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">subdescrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH graph descriptor of the target graph (subgraph)</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH target (subgraph) was created succesfully.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of specified nvGRAPH is not supported.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphwidestpath"><a name="function-nvgraphwidestpath" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphwidestpath" name="function-nvgraphwidestpath" shape="rect">2.21.&nbsp;Function nvgraphWidestPath()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphWidestPath(nvgraphHandle_t handle, const nvgraphGraphDescr_t descrG,
      const size_t weight_index, const int *source_vert, 
      const size_t widest_path_index);
      </pre><p class="p">
                           Find the widest path from the vertex at source_index to every other vertex; this problem is also known as 'the bottleneck
                           path problem' or 'the maximum capacity path problem'. <br clear="none"></br>
                           If some vertices are unreachable, the widest path to those vertices is -∞. In limited-precision arithmetic, this corresponds
                           to -FLT_MAX or -DBL_MAX depending on the value type of the set (CUDA_R_32F or CUDA_R_64F respectively).
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain the connectivity information in <samp class="ph codeph">NVGRAPH_CSC_32</samp>, at least 1 edge set (the capacity ) and 1 vertex set (to store the result).
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">weight_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the edge set for the weights.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*source_vert</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the source, using 0-based indexes.
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">widest_path_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The values strored inside the vertex set at widest_path_index (VertexData[widest_path_index]) are the widest path values.
                                       
                                       VertexData[widest_path_index][i] is the length of the widest path between source_vert and vertex i. 
                                       If vertex i is not reachable from source_vert, VertexData[widest_path_index][i] = -∞. <br clear="none"></br>
                                       Users can get a copy of the result using <samp class="ph codeph">nvgraphGetVertexData</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one vetex or edge set is not supported.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphsssp"><a name="function-nvgraphsssp" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphsssp" name="function-nvgraphsssp" shape="rect">2.22.&nbsp;Function nvgraphSssp()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphSssp(nvgraphHandle_t handle, const nvgraphGraphDescr_t descrG,
      const size_t weight_index, const int *source_vert,
      const size_t sssp_index);
      </pre><p class="p">
                           The Single Source Shortest Path (SSSP) algorithm calculates the shortest path distance from a single vertex in the graph to
                           all other vertices. <br clear="none"></br>
                           If some vertices are unreachable, the shortest path to those vertices is ∞. In limited-precision arithmetic, that corresponds
                           to FLT_MAX or DBL_MAX depending on the value type of the set (CUDA_R_32F or CUDA_R_64F respectively).
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain the connectivity information in <samp class="ph codeph">NVGRAPH_CSC_32</samp>, at least 1 edge set (distances) and 1 vertex set (the shortest path lengths).
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">weight_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the edge set for the weights. The default value is 0, meaning the first edge set.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*source_vert</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the source, using 0-based indexes.
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">sssp_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The values stored inside the vertex set at sssp_index (VertexData[sssp_index]) are the shortest path values. 
                                       VertexData[sssp_index][i] is the length of the shortest path between source_vert and vertex i. 
                                       If vertex i is not reachable from source_vert, VertexData[sssp_index][i] = ∞. <br clear="none"></br>
                                       User can get a copy of the result using <samp class="ph codeph">nvgraphGetVertexData</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one vetex or edge set is not supported.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphsrspmv"><a name="function-nvgraphsrspmv" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphsrspmv" name="function-nvgraphsrspmv" shape="rect">2.23.&nbsp;Function nvgraphSrSpmv()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphSrSpmv(nvgraphHandle_t handle, const nvgraphGraphDescr_t descrG,
      const size_t weight_index, const void *alpha, const size_t x_index,
      const void *beta, const size_t y_index, const nvgraphSemiring_t SR);
      </pre><p class="p">
                           The Semi-Ring Sparse Matrix Vector multiplication is an operation of the type y = α * A * x + β y.
                           Where : <br clear="none"></br>
                           - A is a weighted graph seen as a compressed sparse matrix in CSR, x and y are vectors, α and β are scalars <br clear="none"></br>
                           - (*,+) is a set of two binary operators operating on real values and satisfying semi-ring properties. <br clear="none"></br><br clear="none"></br>
                           In nvGRAPH all semi-rings operate on a set (R) with two binary operators:  + and * that satisfies: <br clear="none"></br>
                           - (R, +) is associative, commutative with additive identity (additive_identity + a = a) <br clear="none"></br>
                           - (R, *) is associative with multiplicative identity (multiplicative_identity * a = a) <br clear="none"></br>
                           - Left and Right multiplication is distributive over addition <br clear="none"></br>
                           - Additive identity = multiplicative null operator ( null_operator * a = a * null_operator = null_operator). <br clear="none"></br><br clear="none"></br>
                           nvGRAPH's approach for sparse matrix vector multiplication on the GPU is based on the CSRMV merge-path algorithm from Duane
                           Merill. It is designed to handle arbitrary sparsity patterns in an efficient way by offering a good workload balance. As a
                           result, this operation delivers consistent good performance even for networks with a power-law distribution of connections.
                           <br clear="none"></br>
                           nvGRAPH has pre-defined useful semi-ring for graphs in nvgraphSemiring_t, so the user can select them directly.  
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Semi rings</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="28.57142857142857%" rowspan="1" colspan="1"><strong class="ph b">Semiring</strong></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"><strong class="ph b">Set</strong></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"><strong class="ph b">Plus</strong></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"><strong class="ph b">Times</strong></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"><strong class="ph b">Add_ident</strong></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"><strong class="ph b">Mult_ident</strong></td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="28.57142857142857%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_PLUS_TIMES_SR</samp></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">R</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">+</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">*</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">0</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">1</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="28.57142857142857%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_MIN_PLUS_SR</samp></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"> R U {-∞,+∞}</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">min</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">+</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">∞</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">0</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="28.57142857142857%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_MAX_MIN_SR</samp></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"> R U {-∞,+∞}</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">max</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">min</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">-∞</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">+∞</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="28.57142857142857%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_OR_AND_SR</samp></td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">{0.0, 1,0}</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1"> OR</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">AND</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">0</td>
                                    <td class="entry" valign="top" width="14.285714285714285%" rowspan="1" colspan="1">1</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH library handle.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain the connectivity information in <samp class="ph codeph">NVGRAPH_CSR_32</samp>, at least 1 edge set (weights) and 2 vertex sets (input vector and output vector).
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">weight_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the edge set for the weights.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*alpha</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Scalar used for multiplication
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">x_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the vertex set for used for multiplication
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*beta</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Scalar used for multiplication. If beta is zero, the vertex set at y_index does not have to be a valid input.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">y_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       (optional) Index of the vertex set for used for the addition.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">SR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       The semi-ring type <samp class="ph codeph"> nvgraphSemiring_t </samp>which can be   <samp class="ph codeph">NVGRAPH_PLUS_TIMES_SR,  NVGRAPH_MIN_PLUS_SR,  NVGRAPH_MAX_MIN_SR, NVGRAPH_OR_AND_SR.</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1">Values at <samp class="ph codeph">y_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       The values stored inside the set at y_index (VertexData[y_index]) are the result of the operation. <br clear="none"></br>
                                       User can get a copy of the result using <samp class="ph codeph">nvgraphGetVertexData</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one vetex or edge set is not supported.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphpagerank"><a name="function-nvgraphpagerank" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphpagerank" name="function-nvgraphpagerank" shape="rect">2.24.&nbsp;Function nvgraphPagerank()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphPagerank(nvgraphHandle_t handle, const nvgraphGraphDescr_t descrG,
      const size_t weight_index, const void *alpha, 
      const size_t bookmark_index,
      const int has_guess, const size_t pagerank_index,
      const float tolerance, const int max_iter);
      </pre><p class="p">
                           	 Find the PageRank vertex values for a graph with a given transition matrix (Markov chain), 
                           	 a bookmark vector of dangling vertices, and the damping factor. 
                           	 The transition matrix is sub-stochastic (ie. each row sums to 0 or 1) and has to be provided in column major order 
                           	 (ie. in CSC, which is equivalent to the transposed of the sub-stochastic matrix in CSR). 
                           The bookmark vector flags vertices without outgoing edges (also called dangling vertices).
                           <br clear="none"></br>
                           This is equivalent to an eigenvalue problem where we compute the dominant eigenpair. 
                           	 By construction, the maximum eigenvalue is 1, only the eigenvector is interesting. 
                           	 nvGRAPH computes an approximation of the Pagerank eigenvector using the power method. 
                           	 The number of iterations depends on the properties of the network itself; 
                           	 it increases when the tolerance descreases and/or alpha increases toward the limiting value of 1.  
                           <br clear="none"></br>
                           The user is free to use default values or to provide inputs for the initial guess, tolerance and maximum number of iterations.
                           
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH library handle.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain the connectivity information in <samp class="ph codeph">NVGRAPH_CSC_32</samp>, at least 1 edge set and 2 vertex sets.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">weight_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the edge set for the transition probability.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*alpha</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       The damping factor <samp class="ph codeph">alpha</samp> represents the probability to follow an outgoing edge, standard value is 0.85. Thus <samp class="ph codeph">1.0-alpha</samp>is the probability to “teleport” to a random node.
                                       <samp class="ph codeph">alpha</samp>should be greater than 0.0 and strictly lower than 1.0.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">bookmark_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Index of the vertex set for the bookmark of dangling nodes (<samp class="ph codeph">VertexData[bookmark_index][i] = 1.0</samp> if i is a dangling node, 0.0 otherwise).
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">has_guess</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       This parameter is used to notify nvGRAPH if it should use a user-provided initial guess.
                                       0 means the user doesn't have a guess, in this case nvGRAPH will use a uniform vector set to <samp class="ph codeph">1/V</samp>.
                                       If the value is 1 nvGRAPH will read VertexData[pagerank_index] and use this as initial guess. The initial guess must not be
                                       the vector of 0s.
                                       Any value other than 1 or 0 is treated as an invalid value.
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">pagerank_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       (optional) Index of the vertex set for the initial guess if <samp class="ph codeph">has_guess=1</samp></td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">tolerance</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       Set the tolerance the approximation, this parameter should be a small magnitude value. The lower the tolerance the better
                                       the approximation. If this value is <samp class="ph codeph">0.0f</samp>, nvGRAPH will use the default value which is <samp class="ph codeph">1.0E-6</samp>.  Setting too small a tolerance (less than 1.0E-6 typically) can lead to non-convergence due to numerical roundoff.  Usually
                                       0.01 and 0.0001 are acceptable. 
                                       
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">max_iter</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       The maximum number of iterations before an answer is returned. This can be used to limit the execution time and do an early
                                       exit before the solver reaches the convergence tolerance. If this value is lower or equal to 0 nvGRAPH will use the default
                                       value, which is 500. 
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1">Values at <samp class="ph codeph">pagerank_index</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       The values stored inside the vertex set at pagerank_index (VertexData[pagerank_index]) are the PageRank values. VertexData[pagerank_index][i]
                                       is the PageRank of vertex i. <br clear="none"></br>
                                       Users can get a copy of the result using <samp class="ph codeph">nvgraphGetVertexData</samp></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1"> The Pagerank iteration reached the desired <samp class="ph codeph">tolerance</samp> in less than <samp class="ph codeph">max_iter</samp> iterations 
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_NOT_CONVERGED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1"> The Pagerank iteration did not reach the desired <samp class="ph codeph">tolerance</samp> after <samp class="ph codeph">max_iter</samp> iterations 
                                    </td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one vertex or edge set is not supported. Currently we support float and double type values.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphtricount"><a name="function-nvgraphtricount" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtricount" name="function-nvgraphtricount" shape="rect">2.25.&nbsp;Function nvgraphTriangleCount()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t
   nvgraphTriangleCount(nvgraphHandle_t handle, 
      const nvgraphGraphDescr_t graph_descr, 
      uint64_t* result);
      </pre><p class="p">
                           The triangles counting algorithm calculates number of unique triangles formed by graph edges. Algorithm works on the undirected
                           graphs and graph structure in parameter should store only lower triangular of the adjacency matrix (no diagonal or self loops
                           for vertices).
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">nvGRAPH library handle.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">graph_descr</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                       nvGRAPH graph descriptor, should contain graph connectivity information in <samp class="ph codeph">NVGRAPH_CSR_32</samp> or <samp class="ph codeph">NVGRAPH_CSC_32</samp> format which should contain only lower triangular of adjacency matrix (no diagonal or self loops for vertices).
                                       
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">result</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of triangles for provided graph will be stored in this parameter.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Success.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s), for example unsupported topology or topology is not stored in the graph.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_MAPPING_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Incorrect graph handle parameter.</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal operation failed.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="function-nvgraphstatusgetstring"><a name="function-nvgraphstatusgetstring" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphstatusgetstring" name="function-nvgraphstatusgetstring" shape="rect">2.26.&nbsp;Function nvgraphStatusGetString()</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
const char* 
   nvgraphStatusGetString(nvgraphStatus_t status);
      </pre><p class="p">
                           Gets string description for the nvGRAPH C API statuses.
                           
                        </p>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">status</samp></td>
                                    <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Status returned from one of the C API functions</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <div class="tablenoborder">
                           <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" valign="top" rowspan="1" colspan="1">Pointer to the string with the text description of the C API status.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="unique_157222822"><a name="unique_157222822" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#unique_157222822" name="unique_157222822" shape="rect">nvGRAPH Spectral Clustering API</a></h3>
                     <div class="body conbody">
                        <p class="p">This part describes nvGRAPH Spectral Clustering  API types, parameters and functions.</p>
                        <p class="p">Graph clustering consists in grouping vertices based on their characteristics such that there is high intra‐cluster similarity
                           and low inter‐cluster similarity. There are many ways of determining these groups. The spectral clustering scheme constructs
                           a matrix, solves an associated eigenvalue problem, and extracts splitting information from the calculated eigenvectors.
                        </p>
                        <p class="p">nvGRAPH can compute cluster assignments with the spectral technique by using the modularity maximization or the minimum balanced
                           cut formulation. 
                        </p>
                        <p class="p">The modularity metric is based on the idea that similar vertices are connected by more edges in the current graph than if
                           they were randomly connected. It measures how well a given clustering applies to a particular graph versus a random graph.
                           The clustering is achieved by finding vertex assignments into clusters such that the modularity is maximized. 
                        </p>
                        <p class="p"> The balanced cut metric measures the size of each cluster and the volume of connections between clusters. It attempts to
                           minimize the volume of connections between clusters relatively to their size. 
                        </p>
                        <p class="p">It is important to outline the difference between the clustering and partitioning. Clustering is often used in analysis of
                           graphs and networks, while partitioning is often used for load balancing across a fixed set of resources. For example, in
                           partitioning the size of sub‐graphs is specified and fixed while clustering focuses on finding tightly connected groups.
                        </p>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="unique_381131945"><a name="unique_381131945" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#unique_381131945" name="unique_381131945" shape="rect">Structure SpectralClusteringParameter</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
struct SpectralClusteringParameter {
       int n_clusters; 
       int n_eig_vects; 
       nvgraphSpectralClusteringType_t algorithm; 
       float evs_tolerance;
       int evs_max_iter; 
       float kmean_tolerance;
       int kmean_max_iter; 
};
</pre><div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Structure fields</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n_clusters</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Number of clusters. Should be at least <samp class="ph codeph">2</samp>. 
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n_eig_vects</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Number of eigenvectors. Should be at least <samp class="ph codeph">2</samp> and at most <samp class="ph codeph">n_clusters</samp>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">algorithm</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          nvGRAPH has pre-defined algorithms in <samp class="ph codeph">nvgraphSpectralClusteringType_t</samp> which can take the following values: <br clear="none"></br><samp class="ph codeph">NVGRAPH_MODULARITY_MAXIMIZATION</samp> : maximize modularity with Lanczos solver.<br clear="none"></br><samp class="ph codeph">NVGRAPH_BALANCED_CUT_LANCZOS</samp>  : minimize balanced cut with Lanczos solver.<br clear="none"></br><samp class="ph codeph">NVGRAPH_BALANCED_CUT_LOBPCG</samp>: minimize balanced cut with LOPCG solver.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">evs_tolerance</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Set the approximation tolerance for the eigensolver, this parameter should be a small magnitude value. The lower the tolerance
                                          the better the approximation. If this value is
                                          <samp class="ph codeph">0.0f</samp>
                                          , nvGRAPH will use the default value which is
                                          <samp class="ph codeph">1.0E-3</samp>
                                          . Setting a low tolerance (less than <samp class="ph codeph">1.0E-4</samp>) may lead to divergence due to numerical roundoff. Usually values between <samp class="ph codeph">0.01</samp> and <samp class="ph codeph">0.0001</samp> are acceptable for spectral clustering.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">evs_max_iter</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          The maximum number of eigensolver iterations before an answer is returned. This can be used to limit the execution time and
                                          do an early exit before the it reaches the convergence tolerance. If this value is lower or equal to <samp class="ph codeph">0</samp> nvGRAPH will use the default value, which is <samp class="ph codeph">4000</samp>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">kmean_tolerance</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Set the approximation tolerance for the k-means algorithm, this parameter should be a small magnitude value. The lower the
                                          tolerance the better the approximation. If this value is
                                          <samp class="ph codeph">0.0f</samp>
                                          , nvGRAPH will use the default value which is
                                          <samp class="ph codeph">1.0E-2</samp>
                                          . Usually values between <samp class="ph codeph">0.01</samp> and <samp class="ph codeph">0.001</samp> are acceptable for spectral clustering.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">kmean_max_iter</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          The maximum number of k-means iterations before an answer is returned. This can be used to limit the execution time and do
                                          an early exit before the it reaches the convergence tolerance. If this value is lower or equal to <samp class="ph codeph">0</samp> nvGRAPH will use the default value, which is <samp class="ph codeph">200</samp>. 
                                          
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="unique_291163896"><a name="unique_291163896" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#unique_291163896" name="unique_291163896" shape="rect">Function nvgraphSpectralClustering()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
      nvgraphStatus_t 
      nvgraphSpectralClustering(nvgraphHandle_t handle, 
                           const nvgraphGraphDescr_t descrG,
                           const size_t weight_index, 
                           const struct SpectralClusteringParameter *params,
                           int* clustering, 
                           void* eig_vals,  
                           void* eig_vects); 
      </pre><p class="p">
                              Assign vertices to groups such as intra-group connections are strong and/or 
                              inter-groups connections are weak using spectral technique. This function supports weighted, undirected graphs.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          nvGRAPH library handle.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          nvGRAPH graph descriptor, should contain the connectivity information of an undirected graph in <samp class="ph codeph">NVGRAPH_CSR_32</samp>, and at least 1 edge set. In <samp class="ph codeph">NVGRAPH_CSR_32</samp> topology, an undirected edge between vertices <em class="ph i">u</em> and <em class="ph i">v</em> is represented as a directed edge in both direction <em class="ph i">(u,v)</em> and <em class="ph i">(v,u)</em>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">weight_index</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Index of the edge set for the connection strength. For unweighted graphs, the edge set should be uniform and different than
                                          <samp class="ph codeph">0</samp>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*params</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Spectral clustering solver parameters stored in <samp class="ph codeph">struct SpectralClusteringParameter</samp></td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*clustering</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          For each vertex <samp class="ph codeph">i</samp>, <samp class="ph codeph">clustering[i]</samp> contains the cluster assignment computed by the spectral clustering algorithm. Possible values are between <samp class="ph codeph">0</samp> and <samp class="ph codeph">n_clusters-1</samp>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*eig_vals</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          If <samp class="ph codeph">algorithm=NVGRAPH_MODULARITY_MAXIMIZATION</samp>, <samp class="ph codeph">*eig_vals</samp> contains the <samp class="ph codeph">n_eig_vects</samp> largest eigenvalues of the Modularity matrix. <br clear="none"></br>
                                          If <samp class="ph codeph">algorithm=NVGRAPH_BALANCED_CUT_LANCZOS</samp> or <samp class="ph codeph">algorithm=NVGRAPH_BALANCED_CUT_LOBPCG</samp>, <samp class="ph codeph">*eig_vals</samp> contains the <samp class="ph codeph">n_eig_vects</samp> smallest eigenvalues of the graph Laplacian matrix. <br clear="none"></br>
                                          The datatype is the same as the edge set at <samp class="ph codeph">weight_index</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*eig_vects</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          If <samp class="ph codeph">algorithm=NVGRAPH_MODULARITY_MAXIMIZATION</samp>, <samp class="ph codeph">*eig_vects</samp> contains the eigeninformation based on the <samp class="ph codeph">n_eig_vects</samp> largest eigenvectors of the Modularity matrix. The eigenvectors are stored in row-major order and normalized by row and by
                                          column.<br clear="none"></br>
                                          If <samp class="ph codeph">algorithm=NVGRAPH_BALANCED_CUT_LANCZOS</samp> or <samp class="ph codeph">algorithm=NVGRAPH_BALANCED_CUT_LOBPCG</samp>, <samp class="ph codeph">*eig_vects</samp> contains the eigeninformation based on the <samp class="ph codeph">n_eig_vects</samp> smallest eigenvectors of the graph Laplacian matrix. The eigenvectors are stored in column-major order and normalized by
                                          column.<br clear="none"></br>
                                          The datatype is the same as the edge set at <samp class="ph codeph">weight_index</samp></td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1"> The spectral clustering algorithm found a solution. </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_NOT_CONVERGED</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1"> The eigensolver of the k-means algorithm did not reach the desired <samp class="ph codeph">tolerance</samp> after <samp class="ph codeph">max_iter</samp> iterations. 
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one vertex or edge set is not supported. Currently we support float and double type values.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_GRAPH_TYPE_NOT_SUPPORTED</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of the graph is not <samp class="ph codeph">NVGRAPH_CSR_32</samp>.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="unique_503059101"><a name="unique_503059101" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#unique_503059101" name="unique_503059101" shape="rect">Function nvgraphAnalyzeClustering()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
      nvgraphStatus_t 
      nvgraphAnalyzeClustering( nvgraphHandle_t handle, 
                                  const nvgraphGraphDescr_t descrG, 
                                  const size_t weight_index,
                                  const int n_clusters, 
                                  const int* clustering,
                                  nvgraphClusteringMetric_t metric, 
                                  float * score); 
      </pre><p class="p">
                              Measure the clustering quality according to a metric. This function supports weighted, undirected graphs.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">handle</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          nvGRAPH library handle.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          nvGRAPH graph descriptor, should contain the connectivity information of an undirected graph in <samp class="ph codeph">NVGRAPH_CSR_32</samp>, and at least 1 edge set. In <samp class="ph codeph">NVGRAPH_CSR_32</samp> topology, an undirected edge between vertices <em class="ph i">u</em> and <em class="ph i">v</em> is represented as a directed edge in both direction <em class="ph i">(u,v)</em> and <em class="ph i">(v,u)</em>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">weight_index</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Index of the edge set for the connection strength. For unweighted graphs, the edge set should be uniform and different than
                                          <samp class="ph codeph">0</samp>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n_clusters</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Total number of clusters in <samp class="ph codeph">*clustering</samp>.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*clustering</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Cluster assignments to be measured.
                                          
                                       </td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">metric</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          nvGRAPH has pre-defined metrics in <samp class="ph codeph">nvgraphClusteringMetric_t</samp> which can take the following values: <br clear="none"></br><samp class="ph codeph">NVGRAPH_MODULARITY</samp> : modularity clustering score telling how good the clustering is compared to random assignments.<br clear="none"></br><samp class="ph codeph">NVGRAPH_EDGE_CUT</samp>  : total number of edges between clusters.<br clear="none"></br><samp class="ph codeph">NVGRAPH_RATIO_CUT</samp> : sum for all clusters of the number of edges going outside of the cluster divided by the number of vertices inside the cluster.
                                          
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*score</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                          Pointer to the score that measures the quality of the cluster assignments according to the <samp class="ph codeph">metric</samp>.
                                          
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1"> Success.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Bad parameter(s).</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_TYPE_NOT_SUPPORTED</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of at least one vertex or edge set is not supported. Currently we support float and double type values.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_GRAPH_TYPE_NOT_SUPPORTED</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The type of the graph is not <samp class="ph codeph">NVGRAPH_CSR_32</samp>.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="unique_781623932"><a name="unique_781623932" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#unique_781623932" name="unique_781623932" shape="rect">nvGRAPH Traversal API</a></h3>
                     <div class="body conbody">
                        <p class="p">This chapter describes nvGRAPH Traversal API types, parameters and functions.</p>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="param-nvgraphtraversalalgo"><a name="param-nvgraphtraversalalgo" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#param-nvgraphtraversalalgo" name="param-nvgraphtraversalalgo" shape="rect">2.28.1.&nbsp;nvGRAPH traversal algorithms</a></h3>
                        <div class="body conbody">
                           <p class="p">Enum which is used as a parameter to nvgraphTraversal API and which tells nvGRAPH which traversal algorithm to use.</p><pre xml:space="preserve">
typedef enum {
  NVGRAPH_TRAVERSAL_BFS=0
} nvgraphTraversal_t;
</pre><div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Algorithms</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_TRAVERSAL_BFS</samp></td>
                                       <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Use Breadth First Search algorithm for graph traversal.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" xml:lang="en-us" id="struct-nvgraphtraversalparameter"><a name="struct-nvgraphtraversalparameter" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#struct-nvgraphtraversalparameter" name="struct-nvgraphtraversalparameter" shape="rect">2.28.2.&nbsp;nvgraphTraversalParameter_t parameter struct</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
typedef struct {
   size_t pad[128];
} nvgraphTraversalParameter_t;   
      </pre><p class="p">
                              Array of bytes that is used for passing parameters to various algorithms of nvgraphTraversal API. Should be accessed through
                              the corresponding Get/Set function.
                              
                           </p>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalparameterinit"><a name="function-nvgraphtraversalparameterinit" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalparameterinit" name="function-nvgraphtraversalparameterinit" shape="rect">2.28.3.&nbsp;nvgraphTraversalParameterInit()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t nvgraphTraversalParameterInit(
    nvgraphTraversalParameter_t *param);
</pre><p class="p">
                              This function initializes <samp class="ph codeph">traversal parameter</samp> struct with default values.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output  </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">The structure was initialized successfully.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalsetdistancesindex"><a name="function-nvgraphtraversalsetdistancesindex" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalsetdistancesindex" name="function-nvgraphtraversalsetdistancesindex" shape="rect">2.28.4.&nbsp;nvgraphTraversalSetDistancesIndex()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalSetDistancesIndex(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function sets index of vertex data where distances values will be stored. After successfull traversal this vertex_data[vertex_id]
                              will be equal to shortest distance from traversal source_vertex to vertex_id. Distance to unreachable vertices is <samp class="ph codeph">2^31-1</samp> and for source vertex itself - <samp class="ph codeph">0</samp>.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Index of the vertex data where to save distances.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was set successfully in the structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalgetdistancesindex"><a name="function-nvgraphtraversalgetdistancesindex" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalgetdistancesindex" name="function-nvgraphtraversalgetdistancesindex" shape="rect">2.28.5.&nbsp;nvgraphTraversalGetDistancesIndex()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalGetDistancesIndex(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function retrieves index of vertex data for distances from the traversal parameters structure. See <samp class="ph codeph">nvgraphTraversalSetDistancesIndex()</samp> description for predecessors data meaning.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Index of the vertex data for distances saved in the param struct.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was retrieved successfully from the params structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalsetpredecessorsindex"><a name="function-nvgraphtraversalsetpredecessorsindex" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalsetpredecessorsindex" name="function-nvgraphtraversalsetpredecessorsindex" shape="rect">2.28.6.&nbsp;nvgraphTraversalSetPredecessorsIndex()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalSetPredecessorsIndex(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function sets index of vertex data where predecessor of the vertex in shortest path will be stored. After successfull
                              traversal if vertex_data[vertex_id]=prev_vertex_id that means that traversal path from <samp class="ph codeph">source vertex</samp> to <samp class="ph codeph">vertex_id</samp> contains edge from <samp class="ph codeph">prev_vertex_id</samp> to <samp class="ph codeph">vertex_id</samp>. Predecessor for source vertex and unreachable vertices is -1.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Index of the vertex data where predecessors will be stored.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was set successfully in the structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalgetpredecessorsindex"><a name="function-nvgraphtraversalgetpredecessorsindex" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalgetpredecessorsindex" name="function-nvgraphtraversalgetpredecessorsindex" shape="rect">2.28.7.&nbsp;nvgraphTraversalGetPredecessorsIndex()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalGetPredecessorsIndex(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function retrieves index of vertex data for predecessors from traversal parameters structure. See <samp class="ph codeph">nvgraphTraversalSetPredecessorsIndex()</samp> description for predecessors data meaning.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Index of the vertex data for predecessors saved in the param struct.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was retrieved successfully from the params structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalsetedgemaskindex"><a name="function-nvgraphtraversalsetedgemaskindex" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalsetedgemaskindex" name="function-nvgraphtraversalsetedgemaskindex" shape="rect">2.28.8.&nbsp;nvgraphTraversalSetEdgeMaskIndex()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalSetEdgeMaskIndex(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function sets index of edge data where mask for edges will be stored. If for this set of data <samp class="ph codeph">edge_data[edge_id]</samp> is <samp class="ph codeph">0</samp> then traversal path will not advance using this edge.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Index of the edge data where edge mask will be stored.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was set successfully in the structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalgetedgemaskindex"><a name="function-nvgraphtraversalgetedgemaskindex" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalgetedgemaskindex" name="function-nvgraphtraversalgetedgemaskindex" shape="rect">2.28.9.&nbsp;nvgraphTraversalGetEdgeMaskIndex()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalGetEdgeMaskIndex(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function retrieves index of an edge data for edge mask from traversal parameters structure. If for this set of data <samp class="ph codeph">edge_data[edge_id]</samp> is <samp class="ph codeph">0</samp> then traversal path will not advance using this edge.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Index of the edge data for edge mask saved in the param struct.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was retrieved successfully from the params structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalsetundirectedflag"><a name="function-nvgraphtraversalsetundirectedflag" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalsetundirectedflag" name="function-nvgraphtraversalsetundirectedflag" shape="rect">2.28.10.&nbsp;nvgraphTraversalSetUndirectedFlag()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalSetUndirectedFlag(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function sets flag specifying whether processing will be performed on the undirected graph or not.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">1 if graph is undirected, 0 - otherwise.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was set successfully in the structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalgetundirectedflag"><a name="function-nvgraphtraversalgetundirectedflag" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalgetundirectedflag" name="function-nvgraphtraversalgetundirectedflag" shape="rect">2.28.11.&nbsp;nvgraphTraversalGetUndirectedFlag()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalGetUndirectedFlag(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function retrieves graph direction property flag from traversal parameters structure.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">1 if graph is undirected, 0 - otherwise.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was retrieved successfully from the params structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalsetalpha"><a name="function-nvgraphtraversalsetalpha" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalsetalpha" name="function-nvgraphtraversalsetalpha" shape="rect">2.28.12.&nbsp;nvgraphTraversalSetAlpha()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalSetAlpha(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function sets <samp class="ph codeph">alpha</samp> parameter for BFS. See http://parlab.eecs.berkeley.edu/sites/all/parlab/files/main.pdf paper for the details on meaning of
                              this parameter.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Alpha</samp> parameter to be set.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was set successfully in the structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalgetalpha"><a name="function-nvgraphtraversalgetalpha" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalgetalpha" name="function-nvgraphtraversalgetalpha" shape="rect">2.28.13.&nbsp;nvgraphTraversalGetAlpha()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalGetAlpha(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function retrieves <samp class="ph codeph">alpha</samp> BFS parameter from traversal parameters structure. See http://parlab.eecs.berkeley.edu/sites/all/parlab/files/main.pdf paper
                              for the details on meaning of this parameter.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Alpha</samp> parameter saved in the traversal parameters structure.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was retrieved successfully from the params structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalsetbeta"><a name="function-nvgraphtraversalsetbeta" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalsetbeta" name="function-nvgraphtraversalsetbeta" shape="rect">2.28.14.&nbsp;nvgraphTraversalSetBeta()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalSetBeta(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function sets <samp class="ph codeph">beta</samp> parameter for BFS traversal. See http://parlab.eecs.berkeley.edu/sites/all/parlab/files/main.pdf paper for the details on
                              meaning of this parameter.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Beta</samp> parameter to be set.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was set successfully in the structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversalgetbeta"><a name="function-nvgraphtraversalgetbeta" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversalgetbeta" name="function-nvgraphtraversalgetbeta" shape="rect">2.28.15.&nbsp;nvgraphTraversalGetBeta()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversalGetBeta(
    nvgraphTraversalParameter_t *param, 
    const size_t value);
</pre><p class="p">
                              This function retrieves <samp class="ph codeph">beta</samp> BFS parameter from traversal parameters structure. See http://parlab.eecs.berkeley.edu/sites/all/parlab/files/main.pdf paper
                              for the details on meaning of this parameter.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">param</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">The pointer to the structure traversal parameters.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">value</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Beta</samp> parameter saved in the traversal parameters structure.
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Parameter was retrieved successfully from the params structure.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <div class="topic concept nested2" id="function-nvgraphtraversal"><a name="function-nvgraphtraversal" shape="rect">
                           <!-- --></a><h3 class="title topictitle2"><a href="#function-nvgraphtraversal" name="function-nvgraphtraversal" shape="rect">2.28.16.&nbsp;nvgraphTraversal()</a></h3>
                        <div class="body conbody"><pre xml:space="preserve">
nvgraphStatus_t 
nvgraphTraversal(nvgraphHandle_t handle,
                               const nvgraphGraphDescr_t descrG,
                               const nvgraphTraversal_t traversalT,
                   const int *source_vert,
                   const nvgraphTraversalParameter_t params);
</pre><p class="p">
                              This functions performs traversal of the graph specified by <samp class="ph codeph">descrG</samp> descriptor from the <samp class="ph codeph">source_vert</samp> using traversal <samp class="ph codeph">params</samp> with algorithm provided in <samp class="ph codeph">traversalT</samp>. See corresponding helper function description to get details on <samp class="ph codeph">params</samp> structure meaning for each of the algorithm.
                              
                           </p>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b"></strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">parameter</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">Memory </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">In/out </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1"><samp class="ph codeph">Meaning</samp></td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">descrG</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input/output </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Graph decriptor handle on which traversal will be performed.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">traversalT</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Traversal algorithm to be used.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">source_vert</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Pointer to the starting vertex for the traversal.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="25%" rowspan="1" colspan="1"><samp class="ph codeph">params</samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">host  </samp></td>
                                       <td class="entry" valign="top" width="16.666666666666664%" rowspan="1" colspan="1"><samp class="ph codeph">input </samp></td>
                                       <td class="entry" valign="top" width="41.66666666666667%" rowspan="1" colspan="1">Traversal parameters structure. Use other helper functions to modify parameters values.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                           <div class="tablenoborder">
                              <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">CUSOLVER_STATUS_SUCCESS</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Traversal was performed successfully.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INVALID_VALUE</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">Invalid parameter.</td>
                                    </tr>
                                    <tr class="row">
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1"><samp class="ph codeph">NVGRAPH_STATUS_INTERNAL_ERROR</samp></td>
                                       <td class="entry" valign="top" width="50%" rowspan="1" colspan="1">An internal operation failed.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested0" xml:lang="en-us" id="nvgraph-code-examples"><a name="nvgraph-code-examples" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#nvgraph-code-examples" name="nvgraph-code-examples" shape="rect">3.&nbsp;nvGRAPH Code Examples</a></h2>
                  <div class="body conbody">
                     <p class="p">This chapter provides simple examples.</p>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-converttopology-example"><a name="nvgraph-converttopology-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-converttopology-example" name="nvgraph-converttopology-example" shape="rect">3.1.&nbsp;nvGRAPH convert topology example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> check(nvgraphStatus_t status) {
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (status != NVGRAPH_STATUS_SUCCESS) {
        printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"ERROR : %d\n"</span>,status);
        exit(0);
    }
}
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv) {
    size_t  n = 6, nnz = 10;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphHandle_t handle;
    nvgraphCSCTopology32I_t CSC_input;
    nvgraphCSRTopology32I_t CSR_output;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> *src_weights_d, *dst_weights_d;
    cudaDataType_t edge_dimT = CUDA_R_32F;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Allocate source data</span>
    CSC_input = (nvgraphCSCTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSCTopology32I_st));
    CSC_input-&gt;nvertices = n; CSC_input-&gt;nedges = nnz;
    cudaMalloc( (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;(CSC_input-&gt;destination_offsets), (n+1)*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>));
    cudaMalloc( (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;(CSC_input-&gt;source_indices), nnz*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>));
    cudaMalloc( (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;src_weights_d, nnz*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Copy source data</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> src_weights_h[] = {0.333333f, 0.5f, 0.333333f, 0.5f, 0.5f, 1.0f, 0.333333f, 0.5f, 0.5f, 0.5f};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_offsets_h[] = {0, 1, 3, 4, 6, 8, 10};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_indices_h[] = {2, 0, 2, 0, 4, 5, 2, 3, 3, 4};
    cudaMemcpy(CSC_input-&gt;destination_offsets, destination_offsets_h, (n+1)*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>), cudaMemcpyDefault);
    cudaMemcpy(CSC_input-&gt;source_indices, source_indices_h, nnz*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>), cudaMemcpyDefault);
    cudaMemcpy(src_weights_d, src_weights_h, nnz*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>), cudaMemcpyDefault);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Allocate destination data</span>
    CSR_output = (nvgraphCSRTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSRTopology32I_st));
    cudaMalloc( (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;(CSR_output-&gt;source_offsets), (n+1)*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>));
    cudaMalloc( (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;(CSR_output-&gt;destination_indices), nnz*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>));
    cudaMalloc( (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;dst_weights_d, nnz*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Starting nvgraph and convert</span>
    check(nvgraphCreate (&amp;handle));
    check(nvgraphConvertTopology(handle, NVGRAPH_CSC_32, CSC_input, src_weights_d,
        &amp;edge_dimT, NVGRAPH_CSR_32, CSR_output, dst_weights_d));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Free memory</span>
    check(nvgraphDestroy(handle));
    cudaFree(CSC_input-&gt;destination_offsets);
    cudaFree(CSC_input-&gt;source_indices);
    cudaFree(CSR_output-&gt;source_offsets);
    cudaFree(CSR_output-&gt;destination_indices);
    cudaFree(src_weights_d);
    cudaFree(dst_weights_d);
    free(CSC_input);
    free(CSR_output);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-convertgraph-example"><a name="nvgraph-convertgraph-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-convertgraph-example" name="nvgraph-convertgraph-example" shape="rect">3.2.&nbsp;nvGRAPH convert graph example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> check(nvgraphStatus_t status) {
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (status != NVGRAPH_STATUS_SUCCESS) {
        printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"ERROR : %d\n"</span>,status);
        exit(0);
    }
}
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv) {
    size_t  n = 6, nnz = 10, vert_sets = 2, edge_sets = 1;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphHandle_t handle; nvgraphGraphDescr_t src_csc_graph;
    nvgraphCSCTopology32I_t CSC_input;
    cudaDataType_t edge_dimT = CUDA_R_32F;
    cudaDataType_t* vertex_dimT;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Allocate host data</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> *pr_1 = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>*)malloc(n*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> **vertex_dim = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)malloc(vert_sets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*));
    vertex_dimT = (cudaDataType_t*)malloc(vert_sets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cudaDataType_t));
    CSC_input = (nvgraphCSCTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSCTopology32I_st));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Initialize host data</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> weights_h[] = {0.333333f, 0.5f, 0.333333f, 0.5f, 0.5f, 1.0f, 0.333333f, 0.5f, 0.5f, 0.5f};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_offsets_h[] = {0, 1, 3, 4, 6, 8, 10};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_indices_h[] = {2, 0, 2, 0, 4, 5, 2, 3, 3, 4};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> bookmark_h[] = {0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f};
    vertex_dim[0] = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)bookmark_h; vertex_dim[1]= (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)pr_1;
    vertex_dimT[0] = CUDA_R_32F; vertex_dimT[1]= CUDA_R_32F, vertex_dimT[2]= CUDA_R_32F;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Starting nvgraph</span>
    check(nvgraphCreate (&amp;handle));
    check(nvgraphCreateGraphDescr (handle, &amp;src_csc_graph));
    CSC_input-&gt;nvertices = n; CSC_input-&gt;nedges = nnz;
    CSC_input-&gt;destination_offsets = destination_offsets_h;
    CSC_input-&gt;source_indices = source_indices_h;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Set graph connectivity and properties (tranfers)</span>
    check(nvgraphSetGraphStructure(handle, src_csc_graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)CSC_input, NVGRAPH_CSC_32));
    check(nvgraphAllocateVertexData(handle, src_csc_graph, vert_sets, vertex_dimT));
    check(nvgraphAllocateEdgeData  (handle, src_csc_graph, edge_sets, &amp;edge_dimT));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">for</span> (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> i = 0; i &lt; 2; ++i)
        check(nvgraphSetVertexData(handle, src_csc_graph, vertex_dim[i], i));
    check(nvgraphSetEdgeData(handle, src_csc_graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)weights_h, 0));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Convert to CSR graph</span>
    nvgraphGraphDescr_t dst_csr_graph;
    check(nvgraphCreateGraphDescr (handle, &amp;dst_csr_graph));
    check(nvgraphConvertGraph(handle, src_csc_graph, dst_csr_graph, NVGRAPH_CSR_32));
    check(nvgraphDestroyGraphDescr(handle, src_csc_graph));
    check(nvgraphDestroyGraphDescr(handle, dst_csr_graph));
    check(nvgraphDestroy(handle));
    free(pr_1); free(vertex_dim); free(vertex_dimT);
    free(CSC_input);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-pagerank-example"><a name="nvgraph-pagerank-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-pagerank-example" name="nvgraph-pagerank-example" shape="rect">3.3.&nbsp;nvGRAPH pagerank example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> check(nvgraphStatus_t status) {
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (status != NVGRAPH_STATUS_SUCCESS) {
        printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"ERROR : %d\n"</span>,status);
        exit(0);
    }
}
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv) {
    size_t  n = 6, nnz = 10, vert_sets = 2, edge_sets = 1;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> alpha1 = 0.9f; <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> *alpha1_p = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> *) &amp;alpha1;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphHandle_t handle; nvgraphGraphDescr_t graph;
    nvgraphCSCTopology32I_t CSC_input;
    cudaDataType_t edge_dimT = CUDA_R_32F;
    cudaDataType_t* vertex_dimT;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Allocate host data</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> *pr_1 = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>*)malloc(n*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> **vertex_dim = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)malloc(vert_sets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*));
    vertex_dimT = (cudaDataType_t*)malloc(vert_sets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cudaDataType_t));
    CSC_input = (nvgraphCSCTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSCTopology32I_st));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Initialize host data</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> weights_h[] = {0.333333f, 0.5f, 0.333333f, 0.5f, 0.5f, 1.0f, 0.333333f, 0.5f, 0.5f, 0.5f};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_offsets_h[] = {0, 1, 3, 4, 6, 8, 10};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_indices_h[] = {2, 0, 2, 0, 4, 5, 2, 3, 3, 4};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> bookmark_h[] = {0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f};
    vertex_dim[0] = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)bookmark_h; vertex_dim[1]= (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)pr_1;
    vertex_dimT[0] = CUDA_R_32F; vertex_dimT[1]= CUDA_R_32F, vertex_dimT[2]= CUDA_R_32F;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Starting nvgraph</span>
    check(nvgraphCreate (&amp;handle));
    check(nvgraphCreateGraphDescr (handle, &amp;graph));
    CSC_input-&gt;nvertices = n; CSC_input-&gt;nedges = nnz;
    CSC_input-&gt;destination_offsets = destination_offsets_h;
    CSC_input-&gt;source_indices = source_indices_h;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Set graph connectivity and properties (tranfers)</span>
    check(nvgraphSetGraphStructure(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)CSC_input, NVGRAPH_CSC_32));
    check(nvgraphAllocateVertexData(handle, graph, vert_sets, vertex_dimT));
    check(nvgraphAllocateEdgeData  (handle, graph, edge_sets, &amp;edge_dimT));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">for</span> (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> i = 0; i &lt; 2; ++i)
        check(nvgraphSetVertexData(handle, graph, vertex_dim[i], i));
    check(nvgraphSetEdgeData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)weights_h, 0));
    
    check(nvgraphPagerank(handle, graph, 0, alpha1_p, 0, 0, 1, 0.0f, 0));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Get result</span>
    check(nvgraphGetVertexData(handle, graph, vertex_dim[1], 1));
    check(nvgraphDestroyGraphDescr(handle, graph));
    check(nvgraphDestroy(handle));
    free(pr_1); free(vertex_dim); free(vertex_dimT);
    free(CSC_input);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-sssp-example"><a name="nvgraph-sssp-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-sssp-example" name="nvgraph-sssp-example" shape="rect">3.4.&nbsp;nvGRAPH SSSP example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> check(nvgraphStatus_t status) {
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (status != NVGRAPH_STATUS_SUCCESS) {
        printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"ERROR : %d\n"</span>,status);
        exit(0);
    }
}
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv) {
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">const</span> size_t  n = 6, nnz = 10, vertex_numsets = 1, edge_numsets = 1;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> *sssp_1_h;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>** vertex_dim;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphStatus_t status; nvgraphHandle_t handle;
    nvgraphGraphDescr_t graph;
    nvgraphCSCTopology32I_t CSC_input;
    cudaDataType_t edge_dimT = CUDA_R_32F;
    cudaDataType_t* vertex_dimT;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Init host data</span>
    sssp_1_h = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>*)malloc(n*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span>));
    vertex_dim  = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)malloc(vertex_numsets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*));
    vertex_dimT = (cudaDataType_t*)malloc(vertex_numsets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cudaDataType_t));
    CSC_input = (nvgraphCSCTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSCTopology32I_st));
    vertex_dim[0]= (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)sssp_1_h; vertex_dimT[0] = CUDA_R_32F;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> weights_h[] = {0.333333, 0.5, 0.333333, 0.5, 0.5, 1.0, 0.333333, 0.5, 0.5, 0.5};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_offsets_h[] = {0, 1, 3, 4, 6, 8, 10};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_indices_h[] = {2, 0, 2, 0, 4, 5, 2, 3, 3, 4};
    check(nvgraphCreate(&amp;handle));
    check(nvgraphCreateGraphDescr (handle, &amp;graph));
    CSC_input-&gt;nvertices = n; CSC_input-&gt;nedges = nnz;
    CSC_input-&gt;destination_offsets = destination_offsets_h;
    CSC_input-&gt;source_indices = source_indices_h;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Set graph connectivity and properties (tranfers)</span>
    check(nvgraphSetGraphStructure(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)CSC_input, NVGRAPH_CSC_32));
    check(nvgraphAllocateVertexData(handle, graph, vertex_numsets, vertex_dimT));
    check(nvgraphAllocateEdgeData  (handle, graph, edge_numsets, &amp;edge_dimT));
    check(nvgraphSetEdgeData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)weights_h, 0));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Solve</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_vert = 0;
    check(nvgraphSssp(handle, graph, 0,  &amp;source_vert, 0));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Get and print result</span>
    check(nvgraphGetVertexData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)sssp_1_h, 0));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Clean </span>
    free(sssp_1_h); free(vertex_dim);
    free(vertex_dimT); free(CSC_input);
    check(nvgraphDestroyGraphDescr(handle, graph));
    check(nvgraphDestroy(handle));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-semiringspmv-example"><a name="nvgraph-semiringspmv-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-semiringspmv-example" name="nvgraph-semiringspmv-example" shape="rect">3.5.&nbsp;nvGRAPH Semi-Ring SPMV example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> check(nvgraphStatus_t status) {
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (status != NVGRAPH_STATUS_SUCCESS) {
        printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"ERROR : %d\n"</span>,status);
        exit(0);
    }
}
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv) {
    size_t  n = 5, nnz = 10, vertex_numsets = 2, edge_numsets = 1;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> alpha = 1.0, beta = 0.0;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> *alpha_p = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> *)&amp;alpha, *beta_p = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> *)&amp;beta;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>** vertex_dim;
    cudaDataType_t edge_dimT = CUDA_R_32F;
    cudaDataType_t* vertex_dimT;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphStatus_t status; nvgraphHandle_t handle;
    nvgraphGraphDescr_t graph;
    nvgraphCSRTopology32I_t CSR_input;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Init host data</span>
    vertex_dim  = (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)malloc(vertex_numsets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*));
    vertex_dimT = (cudaDataType_t*)malloc(vertex_numsets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cudaDataType_t));
    CSR_input = (nvgraphCSRTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSRTopology32I_st));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> x_h[] = {1.1f, 2.2f, 3.3f, 4.4f, 5.5f};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> y_h[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
    vertex_dim[0]= (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)x_h; vertex_dim[1]= (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)y_h;
    vertex_dimT[0] = CUDA_R_32F; vertex_dimT[1]= CUDA_R_32F;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">float</span> weights_h[] = {1.0f, 4.0f, 2.0f, 3.0f, 5.0f, 7.0f, 8.0f, 9.0f, 6.0f, 1.5f};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_offsets_h[] = {0, 2, 4, 7, 9, 10};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_indices_h[] = {0, 1, 1, 2, 0, 3, 4, 2, 4, 2};
    check(nvgraphCreate(&amp;handle));
    check(nvgraphCreateGraphDescr(handle, &amp;graph));
    CSR_input-&gt;nvertices = n; CSR_input-&gt;nedges = nnz;
    CSR_input-&gt;source_offsets = source_offsets_h;
    CSR_input-&gt;destination_indices = destination_indices_h;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Set graph connectivity and properties (tranfers)</span>
    check(nvgraphSetGraphStructure(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)CSR_input, NVGRAPH_CSR_32));
    check(nvgraphAllocateVertexData(handle, graph, vertex_numsets, vertex_dimT));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">for</span> (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> i = 0; i &lt; vertex_numsets; ++i)
       check(nvgraphSetVertexData(handle, graph, vertex_dim[i], i));
    check(nvgraphAllocateEdgeData  (handle, graph, edge_numsets, &amp;edge_dimT));
    check(nvgraphSetEdgeData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)weights_h, 0));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Solve</span>
    check(nvgraphSrSpmv(handle, graph, 0, alpha_p, 0, beta_p, 1, NVGRAPH_PLUS_TIMES_SR));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Get result</span>
    check(nvgraphGetVertexData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)y_h, 1));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Clean </span>
    check(nvgraphDestroyGraphDescr(handle, graph));
    check(nvgraphDestroy(handle));
    free(vertex_dim); free(vertex_dimT); free(CSR_input);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-trianglescounting-example"><a name="nvgraph-trianglescounting-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-trianglescounting-example" name="nvgraph-trianglescounting-example" shape="rect">3.6.&nbsp;nvGRAPH Triangles Counting example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
#include <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"stdlib.h"</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#include "inttypes.h"</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#include "stdio.h"</span>

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#include "nvgraph.h"</span>

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define check( a ) \
{\
    nvgraphStatus_t status = (a);\
    if ( (status) != NVGRAPH_STATUS_SUCCESS) {\
        printf("ERROR : %d in %s : %d\n", status, __FILE__ , __LINE__ );\
        exit(0);\
    }\
}</span>

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv) 
{
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphHandle_t handle;
    nvgraphGraphDescr_t graph;
    nvgraphCSRTopology32I_t CSR_input;

    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Init host data</span>
    CSR_input = (nvgraphCSRTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSRTopology32I_st));

    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Undirected graph:</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// 0       2-------4       </span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//  \     / \     / \</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//   \   /   \   /   \</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//    \ /     \ /     \</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//     1-------3-------5</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// 3 triangles</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// CSR of lower triangular of adjacency matrix:</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">const</span> size_t n = 6, nnz = 8;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_offsets[] = {0, 0, 1, 2, 4, 6, 8};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_indices[] = {0, 1, 1, 2, 2, 3, 3, 4};

    check(nvgraphCreate(&amp;handle));
    check(nvgraphCreateGraphDescr (handle, &amp;graph));
    CSR_input-&gt;nvertices = n; 
    CSR_input-&gt;nedges = nnz;
    CSR_input-&gt;source_offsets = source_offsets;
    CSR_input-&gt;destination_indices = destination_indices;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Set graph connectivity</span>
    check(nvgraphSetGraphStructure(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)CSR_input, NVGRAPH_CSR_32));

    uint64_t trcount = 0;
    check(nvgraphTriangleCount(handle, graph, &amp;trcount));
    printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Triangles count: %"</span> PRIu64 <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"\n"</span>, trcount);

    free(CSR_input);
    check(nvgraphDestroyGraphDescr(handle, graph));
    check(nvgraphDestroy(handle));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
                  <div class="topic concept nested1" xml:lang="en-us" id="nvgraph-traversal-example"><a name="nvgraph-traversal-example" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#nvgraph-traversal-example" name="nvgraph-traversal-example" shape="rect">3.7.&nbsp;nvGRAPH Traversal example</a></h3>
                     <div class="body conbody"><pre xml:space="preserve">
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> check_status(nvgraphStatus_t status){
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> ((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span>)status != 0)    {
        printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"ERROR : %d\n"</span>,status);
        exit(0);
    }
}
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> main(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> argc, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">char</span> **argv){
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Example of graph (CSR format)</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">const</span> size_t  n = 7, nnz = 12, vertex_numsets = 2, edge_numset = 0;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_offsets_h[] = {0, 1, 3, 4, 6, 8, 10, 12};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> destination_indices_h[] = {5, 0, 2, 0, 4, 5, 2, 3, 3, 4, 1, 5};
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//where to store results (distances from source) and where to store results (predecessors in search tree) </span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> bfs_distances_h[n], bfs_predecessors_h[n];
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// nvgraph variables</span>
    nvgraphStatus_t status;
    nvgraphHandle_t handle;
    nvgraphGraphDescr_t graph;
    nvgraphCSRTopology32I_t CSR_input;
    cudaDataType_t* vertex_dimT;
    size_t distances_index = 0;
    size_t predecessors_index = 1;
    vertex_dimT = (cudaDataType_t*)malloc(vertex_numsets*<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cudaDataType_t));
    vertex_dimT[distances_index] = CUDA_R_32I;
    vertex_dimT[predecessors_index] = CUDA_R_32I;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Creating nvgraph objects</span>
    check_status(nvgraphCreate (&amp;handle));
    check_status(nvgraphCreateGraphDescr (handle, &amp;graph));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Set graph connectivity and properties (tranfers)</span>
    CSR_input = (nvgraphCSRTopology32I_t) malloc(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">struct</span> nvgraphCSCTopology32I_st));
    CSR_input-&gt;nvertices = n;
    CSR_input-&gt;nedges = nnz;
    CSR_input-&gt;source_offsets = source_offsets_h;
    CSR_input-&gt;destination_indices = destination_indices_h;
    check_status(nvgraphSetGraphStructure(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)CSR_input, NVGRAPH_CSR_32));
    check_status(nvgraphAllocateVertexData(handle, graph, vertex_numsets, vertex_dimT));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> source_vert = 1;
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Setting the traversal parameters  </span>
    nvgraphTraversalParameter_t traversal_param;
    nvgraphTraversalParameterInit(&amp;traversal_param);
    nvgraphTraversalSetDistancesIndex(&amp;traversal_param, distances_index);
    nvgraphTraversalSetPredecessorsIndex(&amp;traversal_param, predecessors_index);
    nvgraphTraversalSetUndirectedFlag(&amp;traversal_param, false);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">//Computing traversal using BFS algorithm</span>
    check_status(nvgraphTraversal(handle, graph, NVGRAPH_TRAVERSAL_BFS, &amp;source_vert, traversal_param));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// Get result</span>
    check_status(nvgraphGetVertexData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)bfs_distances_h, distances_index));
    check_status(nvgraphGetVertexData(handle, graph, (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>*)bfs_predecessors_h, predecessors_index));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// expect bfs distances_h = (1 0 1 3 3 2 2147483647)</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">for</span> (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> i = 0; i&lt;n; i++)  printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Distance to vertex %d: %i\n"</span>,i, bfs_distances_h[i]); printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"\n"</span>);
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// expect bfs predecessors = (1 -1 1 5 5 0 -1)</span>
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">for</span> (<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> i = 0; i&lt;n; i++)  printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Predecessor of vertex %d: %i\n"</span>,i, bfs_predecessors_h[i]); printf(<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"\n"</span>);
    free(vertex_dimT);
    free(CSR_input);
    check_status(nvgraphDestroyGraphDescr (handle, graph));
    check_status(nvgraphDestroy (handle));
    <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span> 0;
}

</pre></div>
                  </div>
               </div>
               <div class="topic concept nested0" id="notices-header"><a name="notices-header" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#notices-header" name="notices-header" shape="rect">Notices</a></h2>
                  <div class="topic reference nested1" id="notice"><a name="notice" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#notice" name="notice" shape="rect"></a></h3>
                     <div class="body refbody">
                        <div class="section">
                           <h3 class="title sectiontitle">Notice</h3>
                           <p class="p">ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND
                              SEPARATELY, "MATERIALS") ARE BEING PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE
                              WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS
                              FOR A PARTICULAR PURPOSE. 
                           </p>
                           <p class="p">Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the
                              consequences of use of such information or for any infringement of patents or other rights of third parties that may result
                              from its use. No license is granted by implication of otherwise under any patent rights of NVIDIA Corporation. Specifications
                              mentioned in this publication are subject to change without notice. This publication supersedes and replaces all other information
                              previously supplied. NVIDIA Corporation products are not authorized as critical components in life support devices or systems
                              without express written approval of NVIDIA Corporation.
                           </p>
                        </div>
                     </div>
                  </div>
                  <div class="topic reference nested1" id="trademarks"><a name="trademarks" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#trademarks" name="trademarks" shape="rect"></a></h3>
                     <div class="body refbody">
                        <div class="section">
                           <h3 class="title sectiontitle">Trademarks</h3>
                           <p class="p">NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation
                              in the U.S. and other countries.  Other company and product names may be trademarks of
                              the respective companies with which they are associated.
                           </p>
                        </div>
                     </div>
                  </div>
                  <div class="topic reference nested1" id="copyright-past-to-present"><a name="copyright-past-to-present" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#copyright-past-to-present" name="copyright-past-to-present" shape="rect"></a></h3>
                     <div class="body refbody">
                        <div class="section">
                           <h3 class="title sectiontitle">Copyright</h3>
                           <p class="p">© <span class="ph">2016</span>-<span class="ph">2019</span> NVIDIA
                              Corporation. All rights reserved.
                           </p>
                           <p class="p">This product includes software developed by the Syncro Soft SRL (http://www.sync.ro/).</p>
                        </div>
                     </div>
                  </div>
               </div>
               
               <hr id="contents-end"></hr>
               
            </article>
         </div>
      </div>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script>
      <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script><script type="text/javascript">_satellite.pageBottom();</script></body>
</html>