Changes between Initial Version and Version 2 of Ticket #1415
- Timestamp:
- 2013-04-29T16:06:27Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1415
- Property Cc added; removed
- Property Component → Backend
-
Ticket #1415 – Description
initial v2 1 {{{ class ArrayCall 1 {{{#!mo 2 class ArrayCall 2 3 function fn 3 4 input Real r; … … 8 9 end fn; 9 10 Real x[10] = fn(time); 10 end ArrayCall;}}} 11 end ArrayCall; 12 }}} 11 13 12 14 Either we do common subexpression elimination in the backend or keep the arrays non-expanded. Common subexpression elimination would of course be preferrable as then we could do things like: 13 {{{class ArrayCall 15 {{{#!mo 16 class ArrayCall 14 17 Real x[10] = fn(time); 15 18 Real y[10] = fn(time)*2; 16 19 Real z[10] = fn(time)*3; 17 end ArrayCall;}}} 20 end ArrayCall; 21 }}} 18 22 And only call fn once. We probably need to introduce temporary variables to deal with duplicated function calls.