This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NF] Add function vectorization test.
Belonging to [master]: - OpenModelica/OMCompiler#2635 - #1025
- Loading branch information
1 parent
ee8a23c
commit 989052e
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
flattening/modelica/scodeinst/FuncVectorizationCastConflict1.mo
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,25 @@ | ||
// name: FuncVectorizationCastConflict1 | ||
// keywords: vectorization function | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// Checks that a vectorized function that matches both exactly and via casting | ||
// chooses the exact match. | ||
// | ||
|
||
model FuncVectorizationCastConflict1 | ||
Integer x[3]; | ||
equation | ||
x = mod(x, 3); | ||
end FuncVectorizationCastConflict1; | ||
|
||
|
||
// Result: | ||
// class FuncVectorizationCastConflict1 | ||
// Integer x[1]; | ||
// Integer x[2]; | ||
// Integer x[3]; | ||
// equation | ||
// x = array(mod(x[$i1], 3) for $i1 in 1:3); | ||
// end FuncVectorizationCastConflict1; | ||
// endResult |
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