Go to the documentation of this file.
50 #ifndef _ZOLTAN2_BASICKOKKOSIDENTIFIERADAPTER_HPP_
51 #define _ZOLTAN2_BASICKOKKOSIDENTIFIERADAPTER_HPP_
53 #include <Kokkos_Core.hpp>
83 template <
typename User>
109 Kokkos::View<scalar_t**, weight_layout_t> &
weights);
122 if (idx < 0 ||
scalar_t(idx) >= weightsView_.extent(0)) {
123 std::ostringstream emsg;
124 emsg << __FILE__ <<
":" << __LINE__
125 <<
" Invalid weight index " << idx << std::endl;
126 throw std::runtime_error(emsg.str());
128 wgt = Kokkos::subview(weightsView_, ALL, idx);
132 Kokkos::View<gno_t *> idsView_;
133 Kokkos::View<scalar_t **, weight_layout_t> weightsView_;
140 template <
typename User>
142 Kokkos::View<gno_t*> &ids,
143 Kokkos::View<scalar_t**, weight_layout_t> &
weights):
144 idsView_(ids), weightsView_(
weights) {
Kokkos::LayoutLeft weight_layout_t
This class represents a collection of global Identifiers and their associated weights,...
InputTraits< User >::gno_t gno_t
BasicKokkosIdentifierAdapter(Kokkos::View< gno_t * > &ids, Kokkos::View< scalar_t **, weight_layout_t > &weights)
Constructor.
int getNumWeightsPerID() const
Returns the number of weights per object. Number of weights per object should be zero or greater....
void getWeightsKokkosView(Kokkos::View< scalar_t * > &wgt, int idx=0) const
size_t getLocalNumIDs() const
Returns the number of objects on this process.
This file defines the StridedData class.
InputTraits< User >::node_t node_t
InputTraits< User >::scalar_t scalar_t
IdentifierAdapter defines the interface for identifiers.
Defines the IdentifierAdapter interface.
void getIDsKokkosView(Kokkos::View< gno_t * > &ids) const
Provide a pointer to this process' identifiers.
InputTraits< User >::lno_t lno_t
InputTraits< User >::part_t part_t