我正在尝试为嵌套循环实现并行处理。但是,我遇到了以下的语法错误。
我正在修改这里的示例 (Julia中的并行计算 - 在多个核心上运行简单的for循环)
这个有效
for N in 1:5:20, H in 1:5:20
println("The N of this iteration in $N, $H")
end
这会导致语法错误
using Distributed
@distributed for N in 1:5:20, H in 1:5:20
println("The N of this iteration in $N, $H")
end
@distributed
”。从技术上讲,我们是否可以将@distributed
添加到两个循环中? - jgr