Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > 系统界面与配置 > 并行计算 > 数据并行化 >
Mathematica > 核心语言 > 调整和调试 > 并行计算 > 数据并行化 >

ParallelCombine

ParallelCombine[f, h[e1, e2, ...], comb]
并行计算 f[h[e1, e2, ...]],将计算分配到所有并行内核上,并用 comb 组合产生的部分结果。
ParallelCombine[f, h[e1, e2, ...]]
如果 h 有属性 Flat, 等价于 ParallelCombine[f, h[e1, e2, ...], h] ,其它情况下等价于ParallelCombine[f, h[e1, e2, ...], Join]
  • ParallelCombine[f, h[e1, ..., en], comb] 形成表达式 f[h[e1, ..., ek]]f[h[ek+1, ...]]...f[h[..., en]],在所有内核上计算这些表达式,并用 comb[r1, r2, ...] 组合结果 ri
  • 缺省组合运算 Join 适用于函数 f,这样 f[h[e1, ..., ek]] 的结果中包含头部 h。这包含有属性 Listable 的所有函数。
  • 对于有属性 Flat 的头部,缺省组合运算 h 实际上执行结合率 h[e1, ..., en] = h[h[e1, ..., ek], h[ek+1, ...], ..., h[..., en]]
  • 若选择相兼容的 combParallelCombine[f, h[e1, e2, ...], comb] 等价于 f[h[e1, e2, ...]]
7 的新功能
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team