Commit Graph

221 Commits

Author SHA1 Message Date
Pepijn Schoen
1b31099f73 superclass extractor_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
a9b6686725 superclass partition_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
fe00a8a0ca superclass storage_config with io_config 2017-07-20 12:01:05 +02:00
Michael Krasnyk
3940cc1641 Switch from stxxl::vector to std::vector in extractor 2017-07-11 08:23:26 +00:00
Patrick Niklaus
fef0344be0 Don't use bool flags on ExternalMemoryNode because they blow up the struct 2017-07-07 13:24:34 +00:00
Patrick Niklaus
44739f2dc3 Allow users to specify a class for each way
This adds the ability to mark ways with a user-defined
class in the profile. This class information will be included
in the response as property of the RouteStep object.
2017-07-06 09:17:49 +00:00
Michael Krasnyk
b910ab9bcb Add duration values to overlay graph 2017-07-03 14:57:52 +00:00
Patrick Niklaus
97592e5bc3 Refactor file writing in OSRM contract 2017-06-23 09:22:30 +00:00
Daniel Patterson
3d77714c36 Make most command-line tools return useful error codes on well-known exceptions. 2017-06-08 15:03:24 +00: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
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
Patrick Niklaus
579a1ed42e Don't copy the object on WriteOne 2017-05-29 15:09:36 +00:00
Michael Krasnyk
1a7cd785f2 Rename .nodes -> .nbg_nodes and .nodes_data -> .ebg_nodes 2017-05-17 15:21:51 +00:00
Michael Krasnyk
26702920b4 Move ComponentID to EdgeBasedNodeDataContainer 2017-05-17 15:21:51 +00:00
Patrick Niklaus
2f02384d22 Disbale boost::interprocess condition variables on Linux to fix issue #3911 2017-05-08 09:15:01 +00:00
Michael Krasnyk
88082c48cf Remove GetEdgeBasedNodeID from TurnDataContainer 2017-05-03 21:59:38 +00:00
Michael Krasnyk
f1e4349c82 Move geometry ids, name_ids and travel_modes to EdgeBasedNodeData 2017-05-03 21:59:38 +00:00
Pepijn Schoen
8ff5a22799 clang-format 2017-04-18 12:01:06 +00:00
Pepijn Schoen
b830a8f942 Replace Count32 with Count64 2017-04-18 12:01:06 +00:00
Pepijn Schoen
a196d5ced3 Fingerprint .timestamp, normalize use of Size / GetSize and make that function Fingerprint-aware 2017-04-18 12:01:06 +00:00
Patrick Niklaus
da474a16a9 Fix formating 2017-04-10 17:25:02 +00:00
Patrick Niklaus
59bbfeb67f Buffer turn data on disk to save memory 2017-04-10 17:25:02 +00:00
Patrick Niklaus
0072bf0c59 Move to forward declare header 2017-04-06 15:42:38 +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
Patrick Niklaus
ef3fcdc6e6 Refactor graph writing code in contractor 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d7e1c9c09c Refactor turn data into own class 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
157ca9161f clang-format 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
Daniel Patterson
379380abd8 These don't need to be warning messages, debug is sufficient. 2017-03-22 10:41:10 +00:00
Patrick Niklaus
655ca803d8 Adds a special graph for MLD with effcient boundary scan
This graph enables efficient boundary edge scans at each level.
Currenly this needs about |V|*|L| bytes of storage.
We can optimize this when the highest boundary nodes ID is << |V|.
2017-03-21 16:23:10 +00:00
Patrick Niklaus
907f933a54 Add update functionality to osrm-customize
All speed file flags are compatible with osrm-contract.
2017-03-13 23:04:45 +00:00
Patrick Niklaus
a636e8cc13 Include datasources in .geometries file and refactor .datasource_names 2017-03-10 20:40:59 +00:00
Patrick Niklaus
ffd6311e7d Address PR comment by @oxidase 2017-03-10 14:43:02 +00:00
Patrick Niklaus
260a84b94b Simplify write/read code 2017-03-10 14:43:02 +00:00
Pepijn Schoen
c7fc36a61b Normalize file writes 2017-03-09 14:16:41 +00:00
Michael Krasnyk
264cec12e9 Fix reading MLD data into shared memory block 2017-03-08 00:56:50 +00:00
Michael Krasnyk
f42136637d Add edge-based graph loading in MLD facade 2017-03-08 00:56:50 +00:00
Patrick Niklaus
694bf9d8b1 Integrate CellStorage into datafacade 2017-03-08 00:56:50 +00:00
Patrick Niklaus
ef71cc0d12 Clang format 2017-03-08 00:56:50 +00:00
Patrick Niklaus
108fce896b Pull everthing in the facades 2017-03-08 00:56:50 +00:00
Michael Krasnyk
ff0a98196f Initial interation on writing out MLD partition/cell data 2017-03-08 00:56:50 +00:00
Patrick Niklaus
2fa8d0f534 Port OSRM, Engine and Datafacades to be algorithm aware 2017-03-03 16:02:12 +00:00
Daniel J. Hofmann
f71d742b5e Implements Mapping for NodeBasedGraph -> EdgeBasedgraph Translation 2017-03-01 16:09:29 +00:00
Michael Krasnyk
82acd59a8e shared monitor implementation with a conditional variable
or a ring buffer with semaphores
2017-02-24 16:01:56 +00:00
Patrick Niklaus
0c04c6cafb Address PR comments 2017-02-07 18:12:49 +00:00
Michael Krasnyk
6e1c4bfecd Added indexed array data type with variable and fixed group blocks 2017-02-07 07:41:12 +00:00
Pepijn Schoen
9d2628b74f Don't use bool return values on successful write, instead rely on exception throwing 2017-02-02 10:31:32 +01:00
Michael Krasnyk
c22ce3ae1f Use shared memory region mapping at fixed address for OSX 2017-01-31 13:25:59 +01:00
Patrick Niklaus
279f8aabfb Allow specifing a weight for routing that is independent of duration 2017-01-27 11:19:37 +01:00
Michael Krasnyk
7deff5837c Throw IO error if the number of read bytes does not match count
and the stream is in failed state
2017-01-27 11:19:37 +01:00
Patrick Niklaus
70e899378d Replace shmctl with waiting on all on-Linux platforms 2017-01-14 01:14:29 +01:00
Patrick Niklaus
dbd70d4884 Throw exception with more helpful error message when shmctl fails 2017-01-14 01:14:29 +01:00
Michael Krasnyk
b8f631f6f6 fake waiting by sleep on windows 2017-01-14 01:14:29 +01:00
Patrick Niklaus
763ad0d047 Print warning on Windows that we can't wait for clients 2017-01-14 01:14:29 +01:00
Patrick Niklaus
104e23abf3 Restore --max-wait and file_lock for osrm-datastore 2017-01-14 01:14:29 +01:00
Michael Krasnyk
fce8d72895 Change to condvar signaling if data region swapped 2017-01-14 01:14:29 +01:00
Michael Krasnyk
774b8688ca read_only if shmem size is 0, read_write otherwise 2017-01-14 01:14:29 +01:00
Michael Krasnyk
fe2beb6f68 Respect data constness in Write methods 2017-01-13 22:37:46 +01:00
Daniel Patterson
f7e8581a1b Replace fingerprint with semver-based scheme. (#3467) 2017-01-06 13:45:08 -08:00
Daniel J. Hofmann
1153b78c06 Fixes various compiler diagnostics
Found with LLVM 3.9.1 and then fixed the most severe categories.
2017-01-06 16:47:52 +01:00
Daniel J. Hofmann
559c88b36d Adds runtime alignment assertions, see #3267 2017-01-05 16:27:53 +01:00
Michael Krasnyk
b376c97db8 Join LAYOUT and DATA shared memory blocks into REGION 2016-12-23 11:56:22 +01:00
Moritz Kobitzsch
2288704bb5 don't assign unused name to exception 2016-12-08 13:35:28 +01:00
Daniel Patterson
468d8c0031 Refactor logging, improve error handling workflow, clang-format. (#3385) 2016-12-06 12:30:46 -08:00
Pepijn Schoen
6f4c6e84ae Handle file output through a FileWriter, align interfaces for FileWriter and FileReader 2016-12-06 15:59:12 +01:00
Daniel Patterson
5a311012af Consolidate file reading through the new FileReader class/interface. (#3321) 2016-11-30 19:08:01 -08:00
Moritz Kobitzsch
a1127c3e09 reduce numbers of intersections in findNextIntersection, don't normalise for turn lanes 2016-11-30 10:21:53 +01:00
Michael Krasnyk
ba2629456f Added a copy of std::align due to missing implementation in gcc < 5
References:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
2016-11-17 16:02:56 +01:00
Daniel J. H
73e365d398 Conditionally checks std::is_trivially_copyable only if available. (#3327) 2016-11-16 12:07:45 -08:00
Michael Krasnyk
d5bf508046 Fix alignments in shared facade via alignof/std::align 2016-11-16 18:20:19 +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
83a9d0590d Pass-by-reference instead of pointer. 2016-11-15 16:55:02 -08:00
Daniel Patterson
d8b016b92a Simplify read error detection. 2016-11-15 16:55:02 -08:00
Daniel Patterson
2dfeb0cabc Remove unused code. 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
be496eb4e3 Return the type we claim it will return. 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
Daniel Patterson
33ff92d27e Remove debugging code. 2016-11-15 16:55:02 -08:00
Daniel Patterson
bf6df74d44 Consolidate datafacade file loading logic.
Both datafacades now use a single large memory block and common
file loading logic.
2016-11-15 16:55:02 -08:00
Patrick Niklaus
f02b7b0910
[skip ci] Fix formating using format.sh 2016-10-28 14:45:05 -07: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
Huyen Chau Nguyen
69a60686dc refactor loading code of .datasource_indexes and .datasource_names files and move to io.hpp 2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
7b97e1035f refactor loading code of .nodes and .edges files and move to io.hpp 2016-10-26 13:18:52 -07:00
karenzshea
c4f010e363 read properties stream to size of properties object, not 1 2016-10-26 13:18:52 -07:00
karenzshea
51ebadfc45 deduplicate code for loading profile properties into io.hpp 2016-10-26 13:18:52 -07:00
jakepruitt
42271d99b2 Store node ID's and weights separately in CompressedEdgeContainer
Removes CompressedEdges from the extractor and shared data format by
directly serializing vectors of node ID's, forward weights and reverse
weights for each node-based-edge

Refs #2575
2016-10-20 11:32:28 -07:00
Moritz Kobitzsch
5e167b8745 Turn Angles in OSRM were computed using a lookahead of 10 meters.
This PR adds more advanced coordinate extraction, analysing the road
to detect offsets due to OSM way modelling.

In addition it improves the handling of bearings. Right now OSM reports
bearings simply based on the very first coordinate along a way.
With this PR, we store the bearings for a turn correctly, making the
bearings for turns correct.
2016-10-20 10:47:29 +02:00
Huyen Chau Nguyen
2d13116487 fix memory leak of char[] initialization 2016-10-19 17:26:21 -07:00
Huyen Chau Nguyen
316ef305de Refactor loading code for timestamp file 2016-10-19 17:26:21 -07:00
Patrick Niklaus
b7ee38eca7 Refactored loading code for .hsgr file 2016-10-19 19:59:23 +02:00
Patrick Niklaus
81c5cba0e5 Recover from stale mutexes with force unlocking and retry 2016-10-18 21:58:50 +02:00
Patrick Niklaus
847f530c8e Only keep reader lock on shared memory during queries. 2016-10-18 21:58:50 +02:00
Patrick Niklaus
c69545c47a Don't block all requests to switch data
This switchtes the data even if there are requests still running on the
old data. osrm-datastore then waits until all of these old requests have
finished before freeing the old regions.

This also means that osrm-datastore will return with an error if there
is a data update currenlty in progress.
2016-10-18 21:58:50 +02:00
Patrick Niklaus
ebac9f586b Adapt SharedMemory ownership changes from @oxidase
We don't leak any pointers anymore and make owning the shared memory
explicit.
2016-10-18 21:58:50 +02:00
Patrick Niklaus
2512cf386d Add better debug log output 2016-10-18 21:58:50 +02:00
Patrick Niklaus
9eb7fc03ce Use a shared (!) reader writer lock to protect CURRENT_REGIONS
This fixes issue #3016.
2016-10-10 12:13:45 +02:00
Moritz Kobitzsch
5905708111 expose lanes as enums, adjusted for comments 2016-06-27 11:12:02 +02:00
Moritz Kobitzsch
5d91b759d1 Implement Turn Lane Api 2016-06-27 10:07:48 +02:00
Michael Krasnyk
04e334e3e2
Make storage blocks aligned to 4 bytes for ARM NEON/VFP instructions
Aligned blocks prevent bus errors in NEON/VFP instructions.

Block pointers are aligned to 4 bytes, that is guaranteed
by aligned mmaped-pointers, the 4 bytes size of the CANARY block and
aligned sizes of blocks.
2016-06-20 22:45:40 +02:00
Lauren Budorick
a4ac07866a Recreate feature/expose_node_ids 2016-06-02 14:27:25 +02:00
Patrick Niklaus
6e16eab6ec
Format with clang-format 3.8 2016-05-27 21:05:04 +02:00
Moritz Kobitzsch
4d9aa65e78
intersection classes with variable degree of discretization 2016-05-19 16:44:31 +02:00
Moritz Kobitzsch
ba074b0116
initial version of intersection classification 2016-05-19 16:43:46 +02:00
Michael Krasnyk
2c8cf26e74 Fix build break in MSVC
fatal error C1189: #error:  "This header can't be used in operating systems without XSI (System V) shared memory support"
2016-05-05 13:24:27 +02:00
Daniel J. Hofmann
43413ff980 Add license to storage and storage config exposed in public API, closes #2036 2016-04-07 10:41:32 +02:00
Daniel J. Hofmann
c6c25e609b Initial libosrm API docs 2016-04-05 22:59:14 +02:00
Patrick Niklaus
87fbfc6475 std::string -> boost::filesystem::path 2016-04-05 22:58:32 +02:00
Patrick Niklaus
cb8bfa027e Only allow to specify the common base path 2016-04-05 22:58:32 +02:00
Patrick Niklaus
a781c36876 Use uturn default from .properties file 2016-04-05 22:58:32 +02:00
Daniel Patterson
11b356e55f Enables the use of multiple segment-speed-files on the osrm-contract
command line, and exposes the file name used for each edge in the debug
tiles.
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7c30ea32bf Runs scripts/format.sh 2016-04-05 22:58:32 +02:00
Patrick Niklaus
8d7821c84e Remove geometry indicator 2016-03-24 21:24:08 +01:00
Daniel J. Hofmann
64b36807d3 Transforms osrm_exception to exception 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
a48f02e0da Takes care of proper special member generation globally, fixes #1689
Phew, a lot of classes were affected by this. The rationale for the
changes are as follows:

- When a type X declares any constructor, the default constructor is
  not declared, so there is no need for X() = delete there. In fact,
  there is brutal difference between those two: deleted members
  participate in overload resolution, but not-declared members do not!

- When a type X wants to be non-copyable (e.g. to be only movable, like
  threads, unique_ptrs, and so on), you can either do it by inheriting
  from boost::noncopyable (the old way), or better declare both (!) the
  copy constructor _and_ the copy assignment operator as deleted:

      X(X const&) = delete;
      X& operator=(X const&) = delete;

  We had tons of types with deleted copy constructors that were lacking
  a corresponding deleted copy assignment operator, making them still
  copyable and you wouldn't even notice (read: scary)!

References:

- http://accu.org/content/conf2014/Howard_Hinnant_Accu_2014.pdf
- http://www.boost.org/doc/libs/master/libs/core/doc/html/core/noncopyable.html

Note: I know, I'm quoting Hinnant's extraordinary slides a lot, but
getting the sematic right here is so incredibly important.
2016-01-27 17:25:30 +01:00
Patrick Niklaus
439eb9da3d Create public facing libraries for extractor, contractor and datastore
New libraries libosrm_extract, libosrm_contract, libosrm_store
2016-01-21 06:47:34 +01:00