描述
开 本: 16开纸 张: 胶版纸包 装: 平装-胶订是否套装: 否国际标准书号ISBN: 9787564170738
内容简介
对于开发人员而言,如今要想充分利用所有可用 的计算资源来构建出高效的软件系统,并行编程技术 是必不可少的技能。从多核到GPU系统,再到分布式 架构,计算量繁重的程序都离不开编程工具和软件库 。
吉安卡洛·扎克尼*的《Python并行编程参考手 册》首先简要介绍了并行编程,然后讲述了Python的 基础知识,接着探究了基于线程的并行模型、采用同 步线程的Python线程模块以及锁、互斥量、信号量队 列、GIL和线程池的用法。
吉安卡洛·扎克尼*的《Python并行编程参考手 册》首先简要介绍了并行编程,然后讲述了Python的 基础知识,接着探究了基于线程的并行模型、采用同 步线程的Python线程模块以及锁、互斥量、信号量队 列、GIL和线程池的用法。
目 录
Preface Chapter 1: Getting Started with Parallel Computing and Python Introduction The parallel computing memory architecture Memory organization Parallel programming models How to design a parallel program How to evaluate the performance of a parallel program Introducing Python Python in a parallel world Introducing processes and threads Start working with processes in Python Start working with threads in Python Chapter 2: Thread-based Parallelism Introduction Using the Python threading module How to define a thread How to determine the current thread How to use a thread in a subclass Thread synchronization with Lock and RLock Thread synchronization with RLock Thread synchronization with semaphores Thread synchronization with a condition Thread synchronization with an event Using the with statement Thread communication using a queue Evaluating the performance of multithread applications Chapter 3: Process-based Parallelism Introduction How to spawn a process How to name a process How to run a process in the background How to kill a process How to use a process in a subclass How to exchange objects between processes How to synchronize processes How to manage a state between processes How to use a process pool Using the mpi4py Python module Point-to-point communication Avoiding deadlock problems Collective communication using broadcast Collective communication using scatter Collective communication using gather Collective communication using AIItoall The reduction operation How to optimize communication Chapter 4: Asynchronous Programming Introduction Using the concurrent.futures Python modules Event loop management with Asyncio Handling coroutines with Asyncio Task manipulation with Asyncio Dealing with Asyncio and Futures Chapter 5: Distributed Python Introduction Using Celery to distribute tasks How to create a task with Celery Scientific computing with SCOOP Handling map functions with SCOOP Remote Method Invocation with Pyro4 Chaining objects with Pyro4 Developing a client-server application with Pyro4 Communicating sequential processes with PyCSP Using MapReduce with Disco A remote procedure call with RPyC Chapter 6: GPU Programming with Python Introduction Using the PyCUDA module How to build a PyCUDA application Understanding the PyCUDA memory model with matrix manipulation Kernel invocations with GPUArray Evaluating element-wise expressions with PyCUDA The MapReduce operation with PyCUDA GPU programming with NumbaPro Using GPU-accelerated libraries with NumbaPro Using the PyOpenCL module How to build a PyOpenCL application Evaluating element-wise expressions with PyOpenCI Testing your GPU application with PyOpenCL Index
评论
还没有评论。