异步并行编程
帕菲瓦尔
You can evaluate a function in the background without waiting for it to complete, using帕菲瓦尔
。在许多情况下,早日脱离循环可能很方便。例如,在优化过程中,您可以在结果足够好时尽早停止循环。您可以使用帕菲瓦尔
orParfevalonall
。This can be useful if you want to be able to plot intermediate results. Note that this is different from usingparfor
,您必须等待循环完成。
Usesend
andpoll
一起使用数据队列发送和轮询来自不同工人的消息或数据。您可以使用后到达
从数据队列接收新数据时添加函数。
Use后到达
andafterAll
to automatically invoke functions after each or after all elements of aFuture
阵列完成。此数组可以包含返回的期货帕菲瓦尔
,,,,Parfevalonall
,,,,后到达
orafterAll
。
职能
话题
- Evaluate Functions in the Background Using parfeval
尽早突破循环并收集结果。
- Query and Cancel parfeval Futures
此示例显示了如何查询状态
帕菲瓦尔
futures and cancel them. - 使用AfterEACH和AWEALL运行回调功能
自动运行功能之后
Future
对象完成并行池上运行。 - 参数扫描期间的绘图
此示例显示了如何使用
帕菲瓦尔
并在计算中以Dataqueue
object. - 使用AfterEACH和ALTER ALLEAL AFTER ALLENALINAL ADENCONCOLATION更新用户界面
此示例显示了如何在计算完成后更新用户界面。
- 与后处理并行执行网络摄像头图像采集
此示例显示了如何与数据后处理并行从网络摄像头执行帧采集。
- 执行图像采集和并行图像处理
此示例显示了如何并行从网络摄像头和后进程数据执行图像采集。
- 并行培训深度学习网络(深度学习工具箱)
此示例显示了如何在本地机器上运行多个深度学习实验。
- Use parfeval to Train Multiple Deep Learning Networks(深度学习工具箱)
此示例显示了如何使用
帕菲瓦尔
要在网络体系结构的深度上进行参数扫描,以进行深度学习网络,并在培训过程中检索数据。 - Choose Between spmd, parfor, and parfeval
比较和对比
SPMD
against other parallel computing functionality such asparfor
and帕菲瓦尔
。