Commit Graph

82 Commits

Author SHA1 Message Date
Dennis Luxen
7f9d591ab7
Upgrade clang-format to version 15 (#6859) 2024-05-06 09:14:46 +02:00
Dennis Luxen
7c06726a35 Fix formatting 2022-12-20 18:00:11 +01:00
Dennis Luxen
a4aa153ba4 Use nested namespace
It's a mechanical change to modernize the code base
2022-12-11 10:17:17 +01:00
Michael Bell
d74e7b66bd
Support snapping to multiple ways at an input location (#5953)
This PR improves routing results by adding support for snapping to
multiple ways at input locations.

This means all edges at the snapped location can act as source/target
candidates for routing search, ensuring we always find the best route,
and not the one dependent on the edge selected.
2022-08-27 11:36:20 +01:00
Siarhei Fedartsou
06b1b980bb
Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
Daniel Patterson
50d9632ed7
Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10

* Reformat using clang-format-10.0.09
2020-11-26 07:21:39 -08:00
Patrick Niklaus
cb4586ebee Make use of the view factory in the data facade 2018-04-04 12:38:40 +02:00
Patrick Niklaus
4ef331db1f Use read-only mmap as member in StaticRTree 2018-03-27 10:20:33 +00:00
Patrick Niklaus
c0dd5d7c76 Fix formating 2018-03-26 11:02:34 +00:00
Patrick Niklaus
8152dcfb4c Port .ramIndex to tar file and mmap .fileIndex directly 2018-03-26 11:02:33 +00:00
Patrick Niklaus
06f28ffd34 Add BufferWriter/BufferReader and simplify interface for ConditionalRestrictions 2018-03-26 11:02:04 +00:00
Mateusz Loskot
da4fb13aa3 Tidy up #include-s for Intel TBB headers
Remove unused and add missing headers.
2018-01-05 11:00:31 +01:00
Patrick Niklaus
0266c9d969 Renumber nodes after running osrm-partition
The new numbering uses the partition information
to sort border nodes first to compactify storages
that need access indexed by border node ID.

We also get an optimized cache performance for free
sincr we can also recursively sort the nodes by cell ID.

This implements issue #3779.
2017-06-02 18:12:13 +00:00
Patrick Niklaus
a195d7dfd3 Remove compiler errors and use 32bit for segment_index 2017-06-02 12:15:06 +00:00
Daniel Patterson
1c3cb897c1 Refactor RTree so that .fileIndex only contains EdgeDataT, and all r-tree structure is in the .ramIndex file.
Also tunes the BRANCHING_FACTOR a bit to speed up access with this new layout.
2017-06-02 12:15:06 +00:00
Daniel Patterson
382a5cebab Use FileWriter for writing LeafNode data to improve error handling. 2017-05-29 15:09:36 +00:00
Pepijn Schoen
85ec50552d fingerprint .ramIndex / tree nodes 2017-04-18 12:01:06 +00:00
Patrick Niklaus
4ec7ca29f1 Fix formating 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d94017dfae No shared_memory_wrapper, (De)SerializeVector 2017-04-06 15:42:38 +00:00
Patrick Niklaus
7f6e0c478b Split QueryNode into coordinates and osm id 2017-04-06 15:42:38 +00:00
Pepijn Schoen
789311abd6 Remove osrm namespace indication where possible, wrap out shared_memory_ownership 2017-04-04 17:00:36 +00:00
Pepijn Schoen
16665aeb00 Renaming of MemorySetting > Ownership 2017-04-04 17:00:36 +00:00
Pepijn Schoen
266e65e6d2 Replace bool for using shared memory with MemorySetting enum 2017-04-04 17:00:36 +00:00
Pepijn Schoen
c7fc36a61b Normalize file writes 2017-03-09 14:16:41 +00:00
Daniel J. Hofmann
559c88b36d Adds runtime alignment assertions, see #3267 2017-01-05 16:27:53 +01:00
Daniel Patterson
468d8c0031 Refactor logging, improve error handling workflow, clang-format. (#3385) 2016-12-06 12:30:46 -08:00
Michael Krasnyk
e343f71541 Refactor Hilbert values computation 2016-11-28 14:17:12 +01:00
Daniel Patterson
53ef2e2955 Use an enum type for the 'should read fingerprint' flag, rather than a mysterious boolean
Fix tests.
2016-11-15 16:55:02 -08:00
Daniel Patterson
2f9b5788d0 Destructor should fail hard if an exception is raised. 2016-11-15 16:55:02 -08:00
Daniel Patterson
4ad6d88888 Refactor file loading to use a common class that has proper error handling. 2016-11-15 16:55:02 -08:00
Daniel Patterson
e226b52f21 const-ify things, use RAII for file closure, and start to use io:: to read some stuff. 2016-11-15 16:55:02 -08:00
Huyen Chau Nguyen
cf35bbeb50 refactor function names; consolidate readCount() functions;
remove templated types as much as possible for type safety;
add more comments;
clean up code, add const if possible;
2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
fe94977c9b refactor loading code of .ramIndex files and move to io.hpp 2016-10-26 13:18:52 -07:00
Daniel J. Hofmann
e3a38a6b0d Fixes compilation against newer Boost versions; seems like we were lucky before; closes #2889 2016-09-09 16:14:25 +02:00
Patrick Niklaus
c7a1576100
Apply clang-format again 2016-07-26 15:00:58 +02:00
Daniel Patterson
0b868969be
Remove generic std::exception handlers, they don't seem to be adding value, and they hide useful info. 2016-07-26 11:43:08 +02:00
Daniel Patterson
ec02cdc4cc Use mmap instead of read - it's a lot faster here.
Also clean up construction of STRONG_TYPEDEF so that it can be
packed properly in structs (this explains all the () -> {}) changes
here.
2016-06-27 17:24:30 -07:00
Michael Krasnyk
25d3c4b843
Updated change log and adjusted format 2016-05-29 07:39:49 +02:00
Michael Krasnyk
371c06d66d
Change size of QueryCandidate from 32 to 24 bytes 2016-05-29 07:39:49 +02:00
Michael Krasnyk
3e5c978719
Reduce ramIndex file size
PR #2472: the bottom-most node of the r-tree contains
only a single index to a leaf node, so out of 532 bytes
only 4 are used.
2016-05-29 07:39:49 +02:00
Michael Krasnyk
843f1a6356
Set LeafNode alignment to LEAF_PAGE_SIZE bytes
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2348#issuecomment-219804408
- http://stackoverflow.com/questions/15523537/alignas-specifier-vs-attribute-aligned-c11
- http://stackoverflow.com/questions/7895869/cross-platform-alignx-macro
2016-05-29 07:39:49 +02:00
Patrick Niklaus
6e16eab6ec
Format with clang-format 3.8 2016-05-27 21:05:04 +02:00
Michael Krasnyk
7e80dae59b
Fix MSVS build. 2016-05-08 06:00:21 +02:00
Patrick Niklaus
7564633045
Update SearchInBox to not copy TreeNode 2016-05-07 23:52:11 +02:00
Patrick Niklaus
7174c5d036
Make StaticRTree and facades const 2016-05-07 23:52:11 +02:00
Patrick Niklaus
ddd128ce0e
Only use const-ref for coordinate vector 2016-05-07 23:52:11 +02:00
Michael Krasnyk
2acde49f0f
Make LeafNode aligned to memory pages.
Changes:
* LeafNode is aligned to LEAF_PAGE_SIZE.
  Alignment brings 24 bytes memory overhead for 4096, but reduces
  cache misses rate.
* Unused m_element_count from leaf nodes file.
  The size is computed as m_leaves_region.size() / LEAF_PAGE_SIZE.
* Added try/catch for mmap exceptions messages.
2016-05-07 23:52:11 +02:00
Michael Krasnyk
8849015bbf
Fix construct_multiple_levels_test
candidate_cache is removed because of failing test
make util-tests && ./unit_tests/util-tests --run_test=*/construct_multiple_levels_test
first bad commit: [9692be6f50] Add cache for CandidateSegments to reduce heap worke even more

Now SegmentIndex contains leaf index, object index and fixed_projected_coordinate
2016-05-07 23:52:11 +02:00
Michael Krasnyk
70cd7a94ec
Fix memory mapping "Invalid argument" exception. 2016-05-07 23:52:11 +02:00
Patrick Niklaus
3984dea34b
Use mmap in StaticRTree 2016-05-07 23:52:11 +02:00