Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Clear[inner];
  2. inner = Compile[ {{i, _Integer}, {j, _Integer}},
  3. If[i >= j, Return[], AppendTo[bag, list]; inner[i + 1, j]];
  4. ,CompilationOptions -> {"InlineExternalDefinitions" -> True,
  5. "InlineCompiledFunctions" -> False} ]
  6.  
  7. Clear[outer];
  8. outer = Compile[{{i, _Integer}},
  9. Block[{list = Table[{0, 0}, {i}], bag},
  10. bag = {list};
  11. inner[1, i];
  12. bag
  13. ]
  14. , CompilationOptions -> {"InlineExternalDefinitions" -> True,
  15. "InlineCompiledFunctions" -> True}
  16. ]
  17.  
  18. Compile::cret : The type of return values in (...) are different.
  19. Evaluation will use the uncompiled function.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement