This repository has been archived by the owner on May 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FMI] Implement a faster setReal/getReal
Only implemented for FMI2 set/get Real/Integer for now. The implementation should be much faster for clang to optimize since it does not use a huge switch-statement. All indexes are used directly and are just calculated as offsets. Belonging to [master]: - #1884
- Loading branch information
1 parent
a603749
commit 173618c
Showing
4 changed files
with
130 additions
and
39 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
encapsulated package AvlTreeCRToInt "AvlTree for String to Integer. New implementation only used by the backend (until we get a new bootstrapping tarball)" | ||
import BaseAvlTree; | ||
import DAE; | ||
protected | ||
import ComponentReference; | ||
public | ||
extends BaseAvlTree; | ||
redeclare type Key = DAE.ComponentRef; | ||
redeclare type Value = Integer; | ||
redeclare function extends keyStr | ||
algorithm | ||
outString := ComponentReference.printComponentRefStr(inKey); | ||
end keyStr; | ||
redeclare function extends valueStr | ||
algorithm | ||
outString := String(inValue); | ||
end valueStr; | ||
redeclare function extends keyCompare | ||
algorithm | ||
outResult := ComponentReference.crefCompareIntSubscript(inKey1, inKey2); | ||
end keyCompare; | ||
annotation(__OpenModelica_Interface="backend"); | ||
end AvlTreeCRToInt; |