Skip to content

Hide robin hood#2455

Merged
kevinkreiser merged 3 commits intovalhalla:masterfrom
mwoehlke-kitware:hide-robin-hood
Jul 10, 2020
Merged

Hide robin hood#2455
kevinkreiser merged 3 commits intovalhalla:masterfrom
mwoehlke-kitware:hide-robin-hood

Conversation

@mwoehlke-kitware
Copy link
Copy Markdown
Contributor

Modify thor::CostMatrix to make the target map an opaque type. Make idtable.h explicitly a private header (by moving it to src/) and remove its inclusion from pbfgraphparser.cc, which was not actually using it.

This removes all instances of a public (or "public", in the case of idtable.h) header including robin_hood.h, such that our use thereof is totally hidden to consumers rather than leaked into the public interface. In particular, this means that consumers no longer need to be able to include the RHH headers. (Which is very fortunate, as we weren't installing them!)

Fixes #2445.

Comment thread src/thor/costmatrix.cc Outdated
Copy link
Copy Markdown
Contributor

@mandeepsandhu mandeepsandhu left a comment

Choose a reason for hiding this comment

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

LGTM. I'll let @kevinkreiser weigh-in on this for final approval.

Modify thor::CostMatrix to make the target map an opaque type. This
allows us to entirely encapsulate use of RHH in the implementation,
avoiding what otherwise appears to be the only place where use of RHH
leaked into the public interface. In particular, this means that
consumers no longer need to be able to include the RHH headers. (Which
is very fortunate, as we weren't installing them!)
@mwoehlke-kitware mwoehlke-kitware force-pushed the hide-robin-hood branch 2 times, most recently from cbecdf0 to 3d29d2d Compare July 9, 2020 13:33
Move idtable.h into src/ so that it is explicitly a private header.
Also, remove its inclusion from pbfgraphparser.cc, which was not
actually using it. This "fixes" the other potential leak of
robin-hood-hashing. (Note also the previous commit.)
Comment thread src/mjolnir/pbfadminparser.cc
Comment thread test/idtable.cc
@kevinkreiser
Copy link
Copy Markdown
Member

Other than the unneeded changes this looks good

@mwoehlke-kitware
Copy link
Copy Markdown
Contributor Author

Other than the unneeded changes [...]

I don't understand what "unneeded changes" you mean. Both changes on which you commented were not present in earlier versions of this PR, which failed CI.

Copy link
Copy Markdown
Member

@kevinkreiser kevinkreiser left a comment

Choose a reason for hiding this comment

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

sorry i missed the single line part of the diff where it showed you moved the idtable header to the source directory tree

@kevinkreiser kevinkreiser merged commit 2ac1fa0 into valhalla:master Jul 10, 2020
@mwoehlke-kitware mwoehlke-kitware deleted the hide-robin-hood branch July 10, 2020 17:34
@mwoehlke-kitware
Copy link
Copy Markdown
Contributor Author

sorry i missed the single line part of the diff where it showed you moved the idtable header to the source directory tree

Hehe... yeah, that would do it 😄. No worries, I can totally understand that happening.

yuzheyan added a commit that referenced this pull request Jul 13, 2020
* 'master' of github.com:valhalla/valhalla:
  Hide robin hood (#2455)
  openlr: Explicitly check for linear reference option for Valhalla serialization (#2458)
  docs: add luajit to macOS installation (#2461)
  Insert Shape Points at TrafficSpeed Breakpoints (#2451)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Valhalla "leaks" dependence on robin-hood?

3 participants