, . , , . , ( - ), , , ( ..), . , / , - , () resize() push_back() , ( , , ).
Edit: ', , . , std::vector<std::vector<POINT> >, . (, ). , - , "" , .
std::vector<USERPOINT> inputs;
std::vector<std::vector<POINT> > outputs;
const int thread_count = 4;
struct work_packet {
USERPOINT *inputs;
std::vector<POINT> *outputs;
int num_points;
HANDLE finished;
};
std::vector<work_packet> packets(thread_count);
std::vector<HANDLE> events(thread_count);
outputs.resize(inputs.size);
for (int i=0; i<thread_count; i++) {
int offset = i * inputs.size() / thread_count;
packets[i].inputs = &inputs[0]+offset;
packets[i].outputs = &outputs[0]+offset;
packets[i].count = inputs.size()/thread_count;
events[i] = packets[i].done = CreateEvent();
threads[i].process(&packets[i]);
}
WaitForMultipleObjects(&events[0], thread_count, WAIT_ALL, INFINITE);
, , , outputs , , .