在好例子网,分享、交流、成长!
您当前所在位置:首页Python 开发实例Python语言基础 → Python Parallel Programming Cookbook

Python Parallel Programming Cookbook

Python语言基础

下载此实例
  • 开发语言:Python
  • 实例大小:2.84M
  • 下载次数:12
  • 浏览次数:94
  • 发布时间:2022-08-23
  • 实例类别:Python语言基础
  • 发 布 人:thriller007
  • 文件格式:.pdf
  • 所需积分:2
 相关标签:

实例介绍

【实例简介】Python Parallel Programming Cookbook

【实例截图】

【核心代码】


Table of Contents
Preface
v
Chapter 1: Getting Started with Parallel Computing and Python
1
Introduction
2
The parallel computing memory architecture
3
Memory organization
6
Parallel programming models
14
How to design a parallel program
16
How to evaluate the performance of a parallel program
19
Introducing Python
21
Python in a parallel world
26
Introducing processes and threads
26
Start working with processes in Python
27
Start working with threads in Python
29
Chapter 2: Thread-based Parallelism
33
Introduction
34
Using the Python threading module
35
How to define a thread
35
How to determine the current thread
37
How to use a thread in a subclass
39
Thread synchronization with Lock and RLock
41
Thread synchronization with RLock
45
Thread synchronization with semaphores
48
Thread synchronization with a condition
52
Thread synchronization with an event
55
Using the with statement
59
Thread communication using a queue
62
Evaluating the performance of multithread applications
66
www.allitebooks.comii
Table of Contents
Chapter 3: Process-based Parallelism
73
Introduction
74
How to spawn a process
75
How to name a process
77
How to run a process in the background
79
How to kill a process
81
How to use a process in a subclass
82
How to exchange objects between processes
84
How to synchronize processes
90
How to manage a state between processes
93
How to use a process pool
95
Using the mpi4py Python module
97
Point-to-point communication
101
Avoiding deadlock problems
104
Collective communication using broadcast
108
Collective communication using scatter
110
Collective communication using gather
114
Collective communication using Alltoall
116
The reduction operation
118
How to optimize communication
120
Chapter 4: Asynchronous Programming
127
Introduction
127
Using the concurrent.futures Python modules
128
Event loop management with Asyncio
134
Handling coroutines with Asyncio
138
Task manipulation with Asyncio
143
Dealing with Asyncio and Futures
147
Chapter 5: Distributed Python
151
Introduction
151
Using Celery to distribute tasks
152
How to create a task with Celery
154
Scientific computing with SCOOP
158
Handling map functions with SCOOP
163
Remote Method Invocation with Pyro4
167
Chaining objects with Pyro4
171
Developing a client-server application with Pyro4
177
Communicating sequential processes with PyCSP
184
Using MapReduce with Disco
190
A remote procedure call with RPyC
195iii
Table of Contents
Chapter 6: GPU Programming with Python
199
Introduction
200
Using the PyCUDA module
201
How to build a PyCUDA application
207
Understanding the PyCUDA memory model with matrix manipulation
212
Kernel invocations with GPUArray
218
Evaluating element-wise expressions with PyCUDA
220
The MapReduce operation with PyCUDA
225
GPU programming with NumbaPro
229
Using GPU-accelerated libraries with NumbaPro
234
Using the PyOpenCL module
240
How to build a PyOpenCL application
243
Evaluating element-wise expressions with PyOpenCl
248
Testing your GPU application with PyOpenCL
251
Index
257


标签:

实例下载地址

Python Parallel Programming Cookbook

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警