14 #ifndef _ZOLTAN2_TPETRACRSGRAPHADAPTER_HPP_
15 #define _ZOLTAN2_TPETRACRSGRAPHADAPTER_HPP_
32 template <
typename User,
typename UserCoord = User>
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 using userCoord_t = UserCoord;
60 int nEdgeWeights = 0);
66 template <
typename Adapter>
68 const User &in, User *&out,
71 template <
typename Adapter>
73 const User &in, RCP<User> &out,
81 template <
typename User,
typename UserCoord>
83 const RCP<const User> &graph,
int nVtxWgts,
int nEdgeWgts)
85 auto adjIdsHost = graph->getLocalIndicesHost();
87 auto adjIdsGlobalHost =
88 typename Base::IdsHostView(
"adjIdsGlobalHost", adjIdsHost.extent(0));
89 auto colMap = graph->getColMap();
92 Kokkos::parallel_for(
"adjIdsGlobalHost",
93 Kokkos::RangePolicy<Kokkos::HostSpace::execution_space>(
94 0, adjIdsGlobalHost.extent(0)),
97 colMap->getGlobalElement(adjIdsHost(i));
100 auto adjIdsDevice = Kokkos::create_mirror_view_and_copy(
104 this->
offsDevice_ = graph->getLocalRowPtrsDevice();
109 "vertexWeightsDevice_", graph->getLocalNumRows(),
127 template <
typename User,
typename UserCoord>
128 template <
typename Adapter>
130 const User &in, User *&out,
137 template <
typename User,
typename UserCoord>
138 template <
typename Adapter>
140 const User &in, RCP<User> &out,
Helper functions for Partitioning Problems.
typename InputTraits< User >::scalar_t scalar_t
Base::WeightsDeviceView edgeWeightsDevice_
Base::ConstOffsetsDeviceView offsDevice_
GraphAdapter defines the interface for graph-based user data.
Defines TpetraRowGraphAdapter class.
Provides access for Zoltan2 to Tpetra::CrsGraph data.
Traits of Xpetra classes, including migration method.
typename InputTraits< User >::part_t part_t
void applyPartitioningSolution(const User &in, User *&out, const PartitioningSolution< Adapter > &solution) const
typename InputTraits< User >::node_t node_t
TpetraCrsGraphAdapter(const RCP< const User > &graph, int nVtxWeights=0, int nEdgeWeights=0)
Constructor for graph with no weights or coordinates.
A PartitioningSolution is a solution to a partitioning problem.
typename InputTraits< User >::gno_t gno_t
Base::ConstIdsDeviceView adjIdsDevice_
Base::VtxDegreeHostView vertexDegreeWeightsHost_
typename InputTraits< User >::offset_t offset_t
Base::WeightsDeviceView vertexWeightsDevice_
void applyPartitioningSolution(const User &in, User *&out, const PartitioningSolution< Adapter > &solution) const
RCP< const User > getUserGraph() const
Access to user's graph.
typename InputTraits< User >::lno_t lno_t
Provides access for Zoltan2 to Tpetra::RowGraph data.
This file defines the StridedData class.