File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -393,13 +393,9 @@ with qe.Timer():
393393
394394让我们回顾一下科学计算中常用的两种主要 CPU 并行化方式,并讨论它们的优缺点。
395395
396- #### 多进程
397-
398- 多进程是指使用多个处理器并发执行多条逻辑线程。
399-
400- 多进程可以在一台拥有多个 CPU 的机器上进行,也可以在通过网络连接的机器集群上进行。
396+ #### 多线程
401397
402- 在多进程中, * 每个进程都有自己的内存空间 * ,尽管物理内存芯片可能是共享的 。
398+ 多线程是指在单个进程中运行多个执行线程 。
403399
404400所有线程共享同一内存空间,因此它们可以在不复制数据的情况下对同一数组进行读写。
405401
Original file line number Diff line number Diff line change @@ -16,11 +16,9 @@ translation:
1616 Compiling Functions : 编译函数
1717 Compiling Functions::An Example : 示例
1818 Compiling Functions::How and When it Works : 工作原理与适用时机
19- Type Inference : 类型推断
20- Dangers and Limitations : 危险与局限
21- Dangers and Limitations::Limitations : 局限性
22- ' Dangers and Limitations::A Gotcha: Global Variables ' : 一个陷阱:全局变量
23- Dangers and Limitations::Caching Compiled Code : 缓存编译代码
19+ Sharp Bits : 注意事项
20+ Sharp Bits::Typing : 类型推断
21+ Sharp Bits::Global Variables : 全局变量
2422 Multithreaded Loops in Numba : Numba 中的多线程循环
2523 Exercises : 练习
2624---
@@ -185,7 +183,7 @@ timer1.elapsed / timer3.elapsed
185183
186184让我们讨论一下这是如何工作的。
187185
188- ### 工作原理与适用场景
186+ ### 工作原理与适用时机
189187
190188Numba 尝试使用 [ LLVM Project] ( https://llvm.org/ ) 提供的基础设施生成快速机器码。
191189
@@ -421,6 +419,8 @@ with qe.Timer():
421419
422420注意,我们是跨家庭进行并行化,而非跨时间——单个家庭跨时期的更新本质上是顺序的。
423421
422+ 关于基于 GPU 的并行化,请参阅我们{doc}` 关于 JAX 的讲座 <jax_intro> ` 。
423+
424424## 练习
425425
426426``` {exercise}
You can’t perform that action at this time.
0 commit comments