Compile blocks within nested loops?

   4630   7   1
User Avatar
Member
897 posts
Joined: July 2018
Offline
I got a feedback loop and inside that a foreach and I'm trying to wrap the inside loop to a compile block. I fail to enclose this properly as it's referencing the per piece geometry from the outside loop - see attachment.

Attachments:
nestedLoopCompile.PNG (104.8 KB)

B.Henriksson, DICE
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
The compile block doesn't support what you are trying to do. You are forcing the compile block to re-compile every iteration.

Move the compile block around both foreach blocks. This will compile both foreach blocks and run inside the compile block for threading and memory savings.
There's at least one school like the old school!
User Avatar
Member
897 posts
Joined: July 2018
Offline
Will the inside loop be threaded within the outside loop iterations even though the compile block is wrapping the outer? That goes against my understanding of what the compile block is, I thought it was a single operation?
B.Henriksson, DICE
User Avatar
Member
897 posts
Joined: July 2018
Offline
This is failing too. Is it the two stream inputs that kills it?

Attachments:
nestedLoopCompile2.PNG (152.7 KB)

B.Henriksson, DICE
User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
Wires can't cross convex hulls with compiled blocks. Use fetch input nodes to prevent any contaminated lines.
User Avatar
Member
897 posts
Joined: July 2018
Offline
You mean the “block begin” nodes? That's what I'm using in the picture?

If that's what you're refering to I don't understand how I should design the network to not cross the hulls when I'm passing geo from the outer loop to the inner?
B.Henriksson, DICE
User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
You need to make forloop begin nodes, set to ‘fetch input’ to pass from the outer to inner loop.
User Avatar
Member
897 posts
Joined: July 2018
Offline
Of course! Thanks so much, really needed that last push. Here's the final setup for anyone who runs into the same issue.
Edited by kahuna031 - Aug. 16, 2017 14:54:34

Attachments:
nestedLoopCompile3.PNG (58.3 KB)

B.Henriksson, DICE
  • Quick Links