예제 #1
0
 /*! Sets pointers to this process' identifier Ids and their weights.
     \param Ids will on return point to the list of the global Ids for
       each identifier on this process.
     \param wgts will on return point to a list of the weight or weights
        associated with each identifier in the Ids list. Each weight
        is represented as a StridedData object.
      \return The number of ids in the Ids list.
  */
 inline size_t getIdentifierList(ArrayView<const gno_t> &Ids,
                                 ArrayView<input_t> &wgts) const 
 {
   Ids = ArrayView<const gno_t>();
   wgts = weights_.view(0, nUserWeights_);
   size_t n = getLocalNumIdentifiers();
   if (n){
     Ids = ArrayView<const gno_t>(
                     reinterpret_cast<const gno_t*>(gids_.getRawPtr()), n);
   }
   return n;
 }
예제 #2
0
  size_t getIdentifierList(ArrayView<const gno_t>  &Ids,
    ArrayView<input_t> &wgts) const 
  {
    Ids = ArrayView<const gno_t>();
    wgts = weights_.view(0, userWeightDim_);

    size_t n = getLocalNumIdentifiers();
    if (n){
      if (gnosAreGids_)
        Ids = gids_(0, n);
      else
        Ids = gnosConst_(0, n);
    }

    return n;
  }
예제 #3
0
 inline size_t getLocalNumObjects() const {return getLocalNumIdentifiers();}