-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate compilation now works with dependency analysis. There are st…
…ill some tweaks to be performed though. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16788 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
10 changed files
with
364 additions
and
34 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
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,94 @@ | ||
/* | ||
* This file is part of OpenModelica. | ||
* | ||
* Copyright (c) 1998-CurrentYear, Linköping University, | ||
* Department of Computer and Information Science, | ||
* SE-58183 Linköping, Sweden. | ||
* | ||
* All rights reserved. | ||
* | ||
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 | ||
* AND THIS OSMC PUBLIC LICENSE (OSMC-PL). | ||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S | ||
* ACCEPTANCE OF THE OSMC PUBLIC LICENSE. | ||
* | ||
* The OpenModelica software and the Open Source Modelica | ||
* Consortium (OSMC) Public License (OSMC-PL) are obtained | ||
* from Linköping University, either from the above address, | ||
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or | ||
* http://www.openmodelica.org, and in the OpenModelica distribution. | ||
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. | ||
* | ||
* This program is distributed WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH | ||
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS | ||
* OF OSMC-PL. | ||
* | ||
* See the full OSMC Public License conditions for more details. | ||
* | ||
*/ | ||
|
||
encapsulated package HashSetString "HashSet of strings." | ||
|
||
/* Below is the instance specific code. For each hashset the user must define: | ||
Key - The key used to uniquely define elements in a hashset | ||
hashFunc - A function that maps a key to a positive integer. | ||
keyEqual - A comparison function between two keys, returns true if equal. | ||
*/ | ||
|
||
/* HashSet instance specific code */ | ||
|
||
public import BaseHashSet; | ||
protected import System; | ||
protected import Util; | ||
|
||
public type Key = String; | ||
|
||
public type HashSetCrefFunctionsType = tuple<FuncHashCref,FuncCrefEqual,FuncCrefStr>; | ||
public type HashSet = tuple< | ||
array<list<tuple<Key,Integer>>>, | ||
tuple<Integer,Integer,array<Option<Key>>>, | ||
Integer, | ||
Integer, | ||
HashSetCrefFunctionsType | ||
>; | ||
|
||
partial function FuncHashCref | ||
input Key cr; | ||
input Integer mod; | ||
output Integer res; | ||
end FuncHashCref; | ||
|
||
partial function FuncCrefEqual | ||
input Key cr1; | ||
input Key cr2; | ||
output Boolean res; | ||
end FuncCrefEqual; | ||
|
||
partial function FuncCrefStr | ||
input Key cr; | ||
output String res; | ||
end FuncCrefStr; | ||
|
||
public function emptyHashSet | ||
" | ||
Returns an empty HashSet. | ||
Using the default bucketsize.. | ||
" | ||
output HashSet hashSet; | ||
algorithm | ||
hashSet := emptyHashSetSized(BaseHashSet.defaultBucketSize); | ||
end emptyHashSet; | ||
|
||
public function emptyHashSetSized | ||
"Returns an empty HashSet. | ||
Using the bucketsize size" | ||
input Integer size; | ||
output HashSet hashSet; | ||
algorithm | ||
hashSet := BaseHashSet.emptyHashSetWork(size,(System.stringHashDjb2Mod,stringEq,Util.id)); | ||
end emptyHashSetSized; | ||
|
||
end HashSetString; |
Oops, something went wrong.