yakra / DataProcessing

Data Processing Scripts and Programs for Travel Mapping Project
0 stars 0 forks source link

vertex numbers #255

Open yakra opened 11 months ago

yakra commented 11 months ago

Carving out this side topic in order to close #217. Some background/notes there.

A few different v7 & v8 flavors are on BiggaTomato in branches: v7gs 5849d90 v8 d8da55e Refamiliarize.


Another possible v7 variant...

// simple, collapsed & traveled vertex numbers, per thread
int& HighwayGraph::s_vertex_num(HGVertex const* v, const int threadnum)
{   return vnums[(threadnum*vertices.size()+v-vertices.data())*3];
}
int& HighwayGraph::c_vertex_num(HGVertex const* v, const int threadnum)
{   return vnums[(threadnum*vertices.size()+v-vertices.data())*3+1];
}
int& HighwayGraph::t_vertex_num(HGVertex const* v, const int threadnum)
{   return vnums[(threadnum*vertices.size()+v-vertices.data())*3+2];
}

That's a hell of a lot of arithmetic to get our array indices.


Like I said in https://github.com/yakra/DataProcessing/issues/217#issuecomment-1092112851

Hold off until more optimizations are in place and any changes may be more easily observed.

TMBitset is implemented, but there's more that can be done: