| 397 | }; |
| 398 | |
| 399 | size_t constexpr GetOptimalBatchSize() |
| 400 | { |
| 401 | // This code computes the most optimal (in the sense of cache lines |
| 402 | // occupancy) batch size. |
| 403 | size_t constexpr a = math::LCM(sizeof(LinearSegment), kCacheLineSize) / sizeof(LinearSegment); |
| 404 | size_t constexpr b = math::LCM(sizeof(IRoadGraph::EdgeVector), kCacheLineSize) / sizeof(IRoadGraph::EdgeVector); |
| 405 | return math::LCM(a, b); |
| 406 | } |
| 407 | } // namespace |
| 408 | |
| 409 | // OpenLRDecoder::SegmentsFilter ------------------------------------------------------------- |