Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Clear[inner];
- inner = Compile[ {{i, _Integer}, {j, _Integer}},
- If[i >= j, Return[], AppendTo[bag, list]; inner[i + 1, j]];
- ,CompilationOptions -> {"InlineExternalDefinitions" -> True,
- "InlineCompiledFunctions" -> False} ]
- Clear[outer];
- outer = Compile[{{i, _Integer}},
- Block[{list = Table[{0, 0}, {i}], bag},
- bag = {list};
- inner[1, i];
- bag
- ]
- , CompilationOptions -> {"InlineExternalDefinitions" -> True,
- "InlineCompiledFunctions" -> True}
- ]
- Compile::cret : The type of return values in (...) are different.
- Evaluation will use the uncompiled function.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement