Multithreading with map_rect

Hello all. If I loop over target += sum(map_rect)), does Stan await for all the shards in each loop iteration to finish before moving forward or it just goes forward whenever possible?

map_rect waits for all shards to complete before continuing to the next statement.

1 Like