Opened 10 years ago
Last modified 9 years ago
#2874 new enhancement
Implement threaded for-loops in MetaModelica — at Version 1
Reported by: | Per Östlund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | MetaModelica | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
We currently have threaded reductions, it would be nice to have the equivalent for-loops also (syntax is only a suggestion):
for threaded e1 in list1, e2 in list2 loop // Iterates simultaneously over list1 and list2. end for;
=>
class M Real r(start = 0.0); algorithm for i in 1:20 loop for j in 1:30 loop r := r + /*Real*/(i) + /*Real*/(j); end for; end for; end M;
Note:
See TracTickets
for help on using tickets.
The for-loops are currently translated into nested loops, making this require substantial changes to the DAE
=>