Пример #1
0
void session_interface::save_data(data_type const &data,std::string &s)
{
	s.clear();
	data_type::const_iterator p;
	for(p=data.begin();p!=data.end();++p) {
		packed header(p->first.size(),p->second.exposed,p->second.value.size());
		char *ptr=(char *)&header;
		s.append(ptr,ptr+sizeof(header));
		s.append(p->first.begin(),p->first.end());
		s.append(p->second.value.begin(),p->second.value.end());
	}
}
Пример #2
0
task4_5::solution::solution( const data_type& data )
{
	
	min_of_min = INT32_MAX;
	max_of_max = INT32_MIN;
	curr_vector = data.begin();
	end_of_data = data.end();
	data_size = data.size();
	
	for( size_t i = 0; i < threads_count; i++ )
	{
		threads.create_thread( boost::bind( &task4_5::solution::solve, this  ) );
	}

	threads.join_all();

}
 const_iterator_type begin() const
 {
     return partition_vector_.begin();
 }
 iterator_type begin()
 {
     return partition_vector_.begin();
 }
Пример #5
0
 virtual size_type  get(     data_type      & value_param,  size_type const& position_param )const
  {
   auto const& data = ((*m_pointer).* m_traitor)();
   // TODO range check
   std::copy( data.begin() + position_param, data.begin() + position_param + value_param.size(), value_param.begin() );
   return size();
  }
 const_iterator_type begin() const
 {
     return partition_unordered_map_.begin();
 }
Пример #7
0
 const_iterator begin() const { return data_.begin(); }
Пример #8
0
 iterator begin() { return data_.begin(); }
Пример #9
0
 const_iterator begin() const noexcept { return data_.begin(); }
Пример #10
0
 iterator begin() noexcept { return data_.begin(); }
Пример #11
0
void Ecppll::print(std::ostream& out)
{
  tnt::DatachunksCreator dc;
  std::copy(data.begin(), data.end(), std::back_inserter(dc));
  out.write(dc.ptr(), dc.size());
}