Esempio n. 1
0
 DistVec& operator=(const vec & pvec){
   assert(offset >= 0);
   assert(pvec.size() == info.num_nodes(true) || pvec.size() == info.num_nodes(false));
   assert(start < end);
   if (!info.is_square() && pvec.size() == info.num_nodes(false)){
     transpose = true;
   }
   else {
     transpose = false;
   }
   for (int i=start; i< end; i++){  
     latent_factors_inmem[i].pvec[offset] = pvec[i-start];
   }
   debug_print(name);
   return *this;       
 }
Esempio n. 2
0
DistVec& DistVec::operator=(const vec & pvec){
  assert(offset >= 0);
  assert(pvec.size() == info.num_nodes(true) || pvec.size() == info.num_nodes(false));
  assert(start < end);
  if (!info.is_square() && pvec.size() == info.num_nodes(false)){
    transpose = true;
  }
  else {
    transpose = false;
  }
  //#pragma omp parallel for    
  INITIALIZE_TRACER(vecequals, "vector assignment");
  BEGIN_TRACEPOINT(vecequals);
  //for (int i=start; i< end; i++){  
  //  pgraph->vertex_data(i).pvec[offset] = pvec[i-start];
  //}
  pcurrent = this;
  curvec = pvec;
  graphlab::vertex_set nodes = pgraph->select(select_in_range);
  pgraph->transform_vertices(assign_vec, nodes);
  END_TRACEPOINT(vecequals);
  debug_print(name);
  return *this;       
}