-
-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify distance2boundary calculation
The calculation that needs to be performed is a simple trigonomic calculation with two possible results. For performance reason one can introduce a previous check. For a detailed discussion see #497 This results in the following sheme: - For mu > 0 (outward propagation) the next boundary ist the outer boundary (case 1) - For mu < 0 we have to decide whether we hit the inner boundary or not and set the distance accordingly (case 2&3) Additionally branch prediction optimization was performed in distance2line. The compiler always assumes if statements to be true, which means the default branch should always the one the if statement checks for. This slightly reduces instruction misses. Resolves: #497
- Loading branch information
yeganer
committed
Mar 10, 2016
1 parent
ca53169
commit 2dbbecf
Showing
3 changed files
with
50 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters