Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute durations for table plugin at runtime #4876

Closed
wants to merge 2 commits into from
Closed

Conversation

ghoshkaj
Copy link
Member

@ghoshkaj ghoshkaj commented Feb 12, 2018

Issue

This PR implements a way to compute annotations for the table plugin at runtime, specifically, the annotation of durations to start off with. It follows the step in the first comment in this Issue: Compute durations for table plugin at runtime

Tasklist

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

@ghoshkaj ghoshkaj changed the title set up for computing durations while unpacking them Compute durations for table plugin at runtime Feb 12, 2018
@ghoshkaj ghoshkaj self-assigned this Feb 12, 2018
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 9 times, most recently from 56d6d86 to 82eb4ae Compare March 6, 2018 18:10
@ghoshkaj ghoshkaj requested a review from oxidase March 15, 2018 15:09
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 2 times, most recently from aa7df0c to b0bb421 Compare March 16, 2018 16:28
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 2 times, most recently from 548d260 to 71a03a4 Compare March 23, 2018 12:55
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 7 times, most recently from 03f1202 to 68cc993 Compare March 30, 2018 15:57
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 4 times, most recently from 00546fe to 2033f68 Compare April 3, 2018 01:02
@ghoshkaj
Copy link
Member Author

ghoshkaj commented Apr 3, 2018

A next step here is to make the size of the cache configurable in the engine_config file.

@ghoshkaj ghoshkaj requested review from TheMarex and removed request for oxidase April 3, 2018 16:13
class UnpackingCache
{
private:
boost::compute::detail::lru_cache<std::tuple<NodeID, NodeID, std::size_t>, EdgeDuration> cache;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using std::size_t (8 bytes) you can use unsigned char (1 byte) for exclude_index here since its maximum values is 8.

@ghoshkaj ghoshkaj force-pushed the implement-cache branch 4 times, most recently from ec0ea77 to 1b91354 Compare April 5, 2018 12:56
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 7 times, most recently from c7983bd to 0470a4e Compare April 9, 2018 13:15
@ghoshkaj ghoshkaj force-pushed the implement-cache branch 2 times, most recently from e59fdac to 4e2f6b7 Compare April 20, 2018 15:26
@ghoshkaj ghoshkaj force-pushed the implement-cache branch from 4e2f6b7 to 691efd0 Compare May 3, 2018 23:12
copy dummy cache over

implement retrievePackedPathFromSearchSpace

calculate packed_path_from_source_to_middle

debugging the retrievePackedPathFromSearchSpace function implementation

adding in packed_path_from_source_to_middle

cache is partway working

unpack path and get duration that way

the computeDurationForEdge method

comment out cache

clean up the code

move vector creation and allocation to outside of loop

hack to not return vectors on facade.GetUncompressedForwardDurations and facade.GetUncompressedReverseDurations

clean up hack

add exclude_index to cache key

clearing cache with timestamp

rebase against vectors->range pr

swapped out unordered_map cache with a boost_lru implementation

calculation for cache size

cleaned up comment about cache size calculations

unit tests

cache uses unsigned char for exclude index

clean up cache and unit tests

pass in a hashed key to the threadlocal cache

500 mb threadlocal 2 t

fixes and a rebase

correct calculation
@ghoshkaj ghoshkaj force-pushed the implement-cache branch from 691efd0 to 144c4d6 Compare May 5, 2018 10:02
comment about cache size

update unit tests
@ghoshkaj ghoshkaj force-pushed the implement-cache branch from 26122e3 to 62d7d08 Compare May 7, 2018 15:36
@ghoshkaj ghoshkaj closed this Apr 18, 2020
@DennisOSRM DennisOSRM deleted the implement-cache branch November 6, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants