Timeline for Map structure of irregular list, Flatten then reconstruct list using structure
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 18, 2014 at 5:51 | answer | added | William | timeline score: 0 | |
Apr 18, 2014 at 4:27 | comment | added | Mr.Wizard |
As far as I know you can't dynamically reshape arrays within a single CompiledFunction block without losing (some of?) the advantage of compiling. I am wondering if instead it is possible to create a series of separate compiled functions, perhaps dynamically generated (meta-programming), then pass the data from one to another. I am surely not an expert on compilation so I'm not sure if there is any merit to this idea (e.g. overhead may be significant) but is one possible approach.
|
|
Apr 16, 2014 at 23:13 | comment | added | CrustyNoodle |
Hi Mr.Wizard. I purposely left out the detail of what was inside the compiled function as it would no doubt generate a whole separate topic of debate - it basically has a number of nested For loops with a number of sequential matrix operations per iteration of the loop. Each subsequent iteration depends on the result of the previous iteration and each iteration requires modification of the shape of the resultant matrix from the calculations. I felt that adding this detail would have been a distraction from my main question. Happy to add it or start another question if you would like.
|
|
Apr 16, 2014 at 20:58 | comment | added | Mr.Wizard | Would you please give an example of the type of operation you wish to perform on the reconstructed matrices? | |
Apr 16, 2014 at 20:20 | answer | added | ciao | timeline score: 2 | |
Apr 16, 2014 at 14:22 | history | tweeted | twitter.com/#!/StackMma/status/456437505038905345 | ||
Apr 16, 2014 at 14:10 | comment | added | Simon Woods |
If you attempt to reconstruct the non-tensor object inside Compile it will generate a callback to the main evaluator.
|
|
Apr 16, 2014 at 13:26 | answer | added | Kuba | timeline score: 5 | |
Apr 16, 2014 at 13:10 | comment | added | kglr |
Perhaps you can use the answers in Unflattening a list ?
|
|
Apr 16, 2014 at 12:43 | history | asked | CrustyNoodle | CC BY-SA 3.0 |