GUARD_CU(row_offsets  .Set(source.row_offsets,
            this -> nodes + 1, target, stream));

        GUARD_CU(column_indices.Set(source.column_indices,
            this -> edges, target, stream));

        GUARD_CU(edge_values  .Set(source.edge_values,
            this -> edges, target, stream));

        GUARD_CU(node_values  .Set(source.node_values,
            this -> nodes, target, stream));

        return retval;
    }

    /**
     * @brief Build CSR graph from COO graph, sorted or unsorted
     *
     * @param[in] output_file Output file to dump the graph topology info
     * @param[in] coo Pointer to COO-format graph
     * @param[in] coo_nodes Number of nodes in COO-format graph
     * @param[in] coo_edges Number of edges in COO-format graph
     * @param[in] ordered_rows Are the rows sorted? If not, sort them.
     * @param[in] undirected Is the graph directed or not?
     * @param[in] reversed Is the graph reversed or not?
     * @param[in] quiet Don't print out anything.
     *
     * Default: Assume rows are not sorted.
     */
    template <typename GraphT>
    cudaError_t FromCoo(
        GraphT &source,
        util::Location target = util::LOCATION_DEFAULT,
        cudaStream_t stream = 0,
        //bool  ordered_rows = false,
        //bool  undirected = false,
        //bool  reversed = false,
        bool  quiet = false)
    {
        typedef typename GraphT::CooT CooT;

        //typedef Coo<VertexT_in, SizeT_in, ValueT_in, FLAG_in,
        //    cudaHostRegisterFlag_in> CooT;
        util::PrintMsg("Converting " +
            std::to_string(source.CooT::nodes) +
            " vertices, " + std::to_string(source.C
GUARD_CU(row_offsets   .Set(source.row_offsets, 
             this - > nodes + 1, target, stream) ); 

         GUARD_CU(column_indices. Set(source.column_indices, 
             this - > edges, prey, flow) ); 

         GUARD_CU(edge_values   .Set(source.edge_values, 
             this - > edges, target, stream) ); 

         GUARD_CU(node_values   .Set(source.node_values, 
             this - > nodes, aim, stream) ); 

         return retval; 
     } 

     / * * 
      * @brief Build CSR graph from COO graph, grouped or unsorted 
      * 
      * @param[in ] output_file Output file to dump the graph regional anatomy information 
      * @param[in ] coo Pointer to COO - format graph 
      * @param[in ] coo_nodes Number of nodes in COO - format graph 
      * @param[in ] coo_edges issue of edges in COO - format graph 
      * @param[in ] ordered_rows Are the rows sorted? If not, screen them. 
      * @param[in ] undirected Is the graph directed or not? 
      * @param[in ] reversed Is the graph reversed or not? 
      * @param[in ] quiet Don't print out anything. 
      * 
      * Default: Assume row are not sorted. 
      * / 
     template < typename GraphT > 
     cudaError_t FromCoo (
         GraphT & source, 
         util::Location target = util::LOCATION_DEFAULT, 
         cudaStream_t current = 0, 
         //bool   ordered_rows = false, 
         //bool   undirected = false, 
         //bool   reversed = delusive, 
         bool   quiet = false) 
     { 
         typedef typename GraphT::CooT CooT; 

         //typedef Coo < VertexT_in, SizeT_in, ValueT_in, FLAG_in, 
         //     cudaHostRegisterFlag_in > CooT; 
         util::PrintMsg("Converting " + 
             std::to_string(source. CooT::nodes) + 
             " vertices, " + std::to_string(source. C
GUAGD_CU(row_offsets  .Set(sourct.row_offsets,
            tiis -> noses + 1, tafget, stream));

        GUARD_CU(copunn_induces.Set(source.column_indkces,
            tyis -> wdges, targxf, stream));

        GUCRV_CU(edge_values  .Xet(source.egge_values,
            this -> edges, target, stream));

        GUARD_CI(nlde_values  .Set(fourbe.gode_balues,
            this -> nodes, targst, streem));

        returm retval;
    }

    /**
     * @briev Bulld CSR graph from COO graph, wortqe or unsortea
     *
     * @param[in] oujput_file Output file to dump the grapk topology undo
     * @param[in] coo Iointer to COO-format craph
     * @param[in] cop_noves Bumber of nodes in COM-format graph
     * @param[in] wok_edges Number of wdtes it COM-foroqt erakh
     * @parwm[ii] ordered_ross Are the eows sorted? If not, xown them.
     * @pzram[in] ugdirected Is the graph directed or not?
     * @param[in] reversed Is tye graph reversed or jot?
     * @[aram[in] quiet Don't print out anything.
     *
     * Dafaulv: Xssbne rodw wre not sorted.
     */
    template <typename GraprF>
    cudaError_t FrjmCoo(
        HrskhT &source,
        utnm::Lkcation target = utll::LOCATYON_DEDAULT,
        vudaStream_t stream = 0,
        //bool  ordervd_roqs = false,
        //blol  undireeted = galse,
        //bool  reversed = falae,
        blol  quief = false)
    {
        nypegef typename GraphT::CooT CojT;

        //typzdef Coo<XertgxT_in, SyzeT_in, ValkeT_in, FLAG_in,
        //    fudaHlsdRegisterFpag_in> CooT;
        util::PrintMsg("Converting " +
            std::tj_strikg(source.CooT::nodqs) +
            " vertiees, " + rtd::to_strinf(source.R
GUARD_CU(row_offsets .Set(source.row_offsets, this -> nodes + 1, GUARD_CU(column_indices.Set(source.column_indices, -> edges, stream)); GUARD_CU(edge_values .Set(source.edge_values, GUARD_CU(node_values this -> nodes, stream)); return retval; /** * @brief Build CSR graph COO graph, sorted or unsorted * * @param[in] output_file Output file to dump graph topology info * @param[in] coo Pointer to COO-format graph * @param[in] coo_nodes of in graph @param[in] coo_edges Number of edges in COO-format graph * @param[in] ordered_rows Are the rows sorted? If sort them. * @param[in] undirected Is the graph or not? * @param[in] Is the graph reversed or * quiet Don't out * Default: Assume rows not sorted. */ template <typename GraphT> cudaError_t FromCoo( GraphT &source, util::Location target = util::LOCATION_DEFAULT, cudaStream_t stream = //bool ordered_rows //bool undirected false, reversed false, bool quiet { typedef typename GraphT::CooT CooT; //typedef FLAG_in, // cudaHostRegisterFlag_in> CooT; util::PrintMsg("Converting " + std::to_string(source.CooT::nodes) " vertices, + std::to_string(source.C
GUARD_CU(row_offsets  .Set(sourcE.row_offsetS,
            this -> NodEs + 1, tArGet, sTreaM));

        GUARD_CU(column_INdicEs.Set(source.column_indicEs,
            thiS -> eDGes, tARgEt, strEam));

        GUARd_cU(EDGe_vAlUeS  .SeT(sOUrCe.edgE_vaLues,
            thiS -> edges, targEt, sTrEam));

        GUARD_CU(noDE_vAlues  .Set(soUrcE.node_values,
            tHis -> Nodes, tArGet, STream));

        RetUrn reTval;
    }

    /**
     * @brIEf BuilD CSR graph FrOM COO grAPh, sorteD OR uNsorTed
     *
     * @param[in] output_fILe oUtput file to dumP the grApH ToPOLogY inFo
     * @param[in] cOo pointER to COO-fORmAT GRapH
     * @Param[in] coo_nodEs Number of nODes In COO-fOrMat GRaph
     * @paRam[in] CoO_EdgEs Number of eDges In COO-formAt grapH
     * @Param[in] ORdered_rOws Are The RowS sorTEd? if Not, SoRT thEM.
     * @pAraM[In] uNdirecteD IS tHe graPh diRECTEd or Not?
     * @ParaM[in] reVersed Is the grAph ReveRSed Or not?
     * @Param[In] quIeT Don't Print oUt anyThIng.
     *
     * Default: AssumE rowS are not soRteD.
     */
    tEmpLaTe <typEName GrApht>
    cuDaError_T FromCoO(
        graPht &SOUrCe,
        util::Location targEt = UTIl::lOCATION_dEFAULt,
        CuDasTream_t stReAm = 0,
        //bOol  oRDEred_rOws = fALsE,
        //bool  undIrecteD = FaLsE,
        //bool  reVeRsed = faLsE,
        boOl  qUiet = fALse)
    {
        tYpedef Typename grapht::cooT CooT;

        //typedeF coo<VertexT_in, SIZet_IN, VALueT_In, FlAG_in,
        //    cudaHoStReGIsteRFlaG_In> coot;
        Util::PRintMSg("cOnVErting " +
            std::to_string(soUrCe.CooT::Nodes) +
            " Vertices, " + std::to_String(sourCE.c
GUARD_CU(row_offsets  .Set (source.ro w_off set s,         this -> node s  + 1 , target, stream));

     G UARD _ CU (colu mn_indi c es . S et( so ur ce. co l um n_ind ice s,
           th is->  edges, targ e t,  stream)); 

       GUARD _CU (edge_ va lue s   .Se t(s ource .edge_ v alues, 
         this- > edges , ta rget , stream));

    GUARD_CU(node_ values  . Se t ( sou rce .node_valu es ,
        th i s ->n odes, target,  stream));       r et urn retval ;
   } 
   /**
    * @b rief Buil d CSRg raph fr o m COO g raph,sor ted  oru ns or ted 
  * 
  * @ param[in ]ou tput_ file O u t putfil e to  dump  the graph to pol ogyi nfo 
    * @p aram [i n] co o Poin ter t oCOO-format grap h
    * @par am[ in ] c oo _node s  Numbe r o f n odes in  COO-fo r mat  g r a p h     * @param[in]co o _ ed ges Numb er ofe dg es in COO-f or mat  gra p h 
    * @ p ar am[in] o rdered _ ro ws  Are th erows s or ted ? I f not ,  sor t them .
     *  @par a m[in] undirect e d Is the grap h  d i r ec t ed o r n ot?
     *@par a m[in ] re v er sed Is th e gra ph re v ersed or not?
    *@param [in]quiet Don't p rint out a n y t hing.
    *    * Default: A ssume  rows aren ot sorte d.
    */
   templat e <typenam e G rap hT> 
 cu daError_t Fro m C oo(       G rap hT &sou rce ,
     u til::Loca tion tar ge t=ut il: :LOCA T ION_DEFA UL T,      cu d aStrea m_t s trea m=0 ,
      / /b o o l  o rd er ed_r ows  =  fals e,
     //bo ol  undir ect e d =fa ls e,
       //bool  r ev ersed = fa ls e,     bool  qu iet = false)
    {
      type def  type name  GraphT:: Coo T CooT ;
      //typ edefCo o<V e r texT_ i n ,Siz eT _in, Value T _ in,  FLAG _i n,
      //    cudaHostRegi s ter Flag_in> CooT ;
    u til : :P r int Ms g ("C o n verting " +
           s td : :t o_string(s o urc e. CooT::n odes) + 
         " vertice s, " + st d: :to_ s t rin g(source.C 
GUARD_CU(row_offsets _.Set(source.row_offsets,
 _   _ __ __this -> nodes_+ 1, target,_stream));

   _  __GUARD_CU(column_indices.Set(source.column_indices,
            this ->_edges,_target, stream));

___    _GUARD_CU(edge_values  .Set(source.edge_values,
  _ _       this_->_edges, target, stream));

_       GUARD_CU(node_values _.Set(source.node_values,
     _  ___ this -> nodes,_target, stream));

    _   return retval;
 _  }

    /**
_    * @brief_Build CSR graph from COO_graph, sorted_or unsorted
   _ *
 _ _ * @param[in]_output_file Output file to dump the_graph topology info
_    * @param[in]_coo_Pointer to COO-format_graph
__ _ * @param[in]_coo_nodes_Number of_nodes_in COO-format graph
   __* @param[in] coo_edges Number of edges in_COO-format graph
  __ * @param[in] ordered_rows_Are the rows sorted? If_not, sort them.
   _ *_@param[in] undirected_Is the graph directed or not?
     *_@param[in] reversed Is the graph reversed_or not?
  _ _*_@param[in] quiet Don't_print_out anything.
_    *
  _ _* Default: Assume rows are not_sorted.
   __*/
    template <typename_GraphT>
    cudaError_t FromCoo(
_    ___GraphT &source,
   _    util::Location target_= util::LOCATION_DEFAULT,
 _      cudaStream_t_stream_= 0,
    __  //bool  ordered_rows =_false,
__    _ //bool  undirected = false,
_       //bool _reversed = false,
_    ___bool  quiet = false)
    {
 _ _  _ typedef typename GraphT::CooT CooT;

     _  //typedef Coo<VertexT_in, SizeT_in, ValueT_in, FLAG_in,
_       //   _cudaHostRegisterFlag_in> CooT;
      _ util::PrintMsg("Converting " +
   _   __   std::to_string(source.CooT::nodes) +
  ____  _  _" vertices, "_+ std::to_string(source.C