图书介绍

OpenCL编程指南 英文版PDF|Epub|txt|kindle电子书版本网盘下载

OpenCL编程指南 英文版
  • (美)AaftabMunshiBendeictR.GasterTimothyG.MattsonJamesFungDanGinsburg著 著
  • 出版社: 北京:科学出版社
  • ISBN:9787030349637
  • 出版时间:2012
  • 标注页数:603页
  • 文件大小:87MB
  • 文件页数:627页
  • 主题词:图形软件-程序设计-英文

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

OpenCL编程指南 英文版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

Part Ⅰ The OpenCL 1.1 Language and API1

1.An Introduction to OpenCL3

What Is OpenCL,or...Why You Need This Book3

Our Many-Core Future:Heterogeneous Platforms4

Software in a Many-Core World7

Conceptual Foundations of OpenCL11

Platform Model12

Execution Model13

Memory Model21

Programming Models24

OpenCL and Graphics29

The Contents of OpenCL30

Platform API31

Runtime API31

Kernel Programming Language32

OpenCL Summary34

The Embedded Profile35

Learning OpenCL36

2.HelloWorld:An OpenCL Example39

Building the Examples40

Prerequisites40

Mac OS X and Code::Blocks41

Microsoft Windows and Visual Studio42

Linux and Eclipse44

HelloWorld Example45

Choosing an OpenCL Platform and Creating a Context49

Choosing a Device and Creating a Command-Queue50

Creating and Building a Program Object52

Creating Kernel and Memory Objects54

Executing a Kernel55

Checking for Errors in OpenCL57

3.Platforms,Contexts,and Devices63

OpenCL Platforms63

OpenCL Devices68

OpenCL Contexts83

4.Programming with OpenCL C97

Writing a Data-Parallel Kernel Using OpenCL C97

Scalar Data Types99

The half Data Type101

Vector Data Types102

Vector Literals104

Vector Components106

Other Data Types108

Derived Types109

Implicit Type Conversions110

Usual Arithmetic Conversions114

Explicit Casts116

Explicit Conversions117

Reinterpreting Data as Another Type121

Vector Operators123

Arithmetic Operators124

Relational and Equality Operators127

Bitwise Operators127

Logical Operators128

Conditional Operator129

Shift Operators129

Unary Operators131

Assignment Operator132

Qualifiers133

Function Qualifiers133

Kernel Attribute Qualifiers134

Address Space Qualifiers135

Access Qualifiers140

Type Qualifiers141

Keywords141

Preprocessor Directives and Macros141

Pragma Directives143

Macros145

Restrictions146

5.OpenCL C Built-In Functions149

Work-Item Functions150

Math Functions153

Floating-Point Pragmas162

Floating-Point Constants162

Relative Error as ulps163

Integer Functions168

Common Functions172

Geometric Functions175

Relational Functions175

Vector Data Load and Store Functions181

Svnchronization Functions190

Async Copy and Prefetch Functions191

Atomic Functions195

Miscellaneous Vector Functions199

Image Read and Write Functions201

Reading from an Image201

Samplers206

Determining the Border Color209

Writing to an Image210

Querying Image Information214

6.Programs and Kernels217

Program and Kernel Object Overview217

Program Objects218

Creating and Building Programs218

Program Build Options222

Creating Programs from Binaries227

Managing and Querying Programs236

Kernel Objects237

Creating Kernel Objects and Setting Kernel Arguments237

Thread Safety241

Managing and Querying Kernels242

7.Buffers and Sub-Buffers247

Memory Objects,Buffers,and Sub-Buffers Overview247

Creating Buffers and Sub-Buffers249

Querying Buffers and Sub-Buffers257

Reading,Writing,and Copying Buffers and Sub-Buffers259

Mapping Buffers and Sub-Buffers276

8.Images and Samplers281

Image and Sampler Object Overview281

Creating Image Objects283

Image Formats287

Querying for Image Support291

Creating Sampler Objects292

OpenCL C Functions for Working with Images295

Transferring Image Objects299

9.Events309

Commands,Queues,and Events Overview309

Events and Command-Queues311

Event Objects317

Generating Events on the Host321

Events Impacting Execution on the Host322

Using Events for Profiling327

Events Inside Kernels332

Events from Outside OpenCL333

10.Interoperability with OpenGL335

OpenCL/OpenGL Sharing Overview335

Querying for the OpenGL Sharing Extension336

Initializing an OpenCL Context for OpenGL Interoperability338

Creating OpenCL Buffers from OpenGL Buffers339

Creating OpenCL Image Objects from OpenGL Textures344

Querying Information about OpenGL Objects347

Synchronization between OpenGL and OpenCL348

11.Interoperability with Direct3D353

Direct3D/OpenCL Sharing Overview353

Initializing an OpenCL Context for Direct3D Interoperability354

Creating OpenCL Memory Objects from Direct3D Buffers and Textures357

Acquiring and Releasing Direct3D Objects in OpenCL361

Processing a Direct3D Texture in OpenCL363

Processing D3D Vertex Data in OpenCL366

12.C++Wrapper API369

C++Wrapper API Overview369

C++Wrapper API Exceptions371

Vector Add Example Using the C++Wrapper API374

Choosing an OpenCL Platform and Creating a Context375

Choosing a Device and Creating a Command-Queue376

Creating and Building a Program Object377

Creating Kernel and Memory Objects377

Executing the Vector Add Kernel378

13.OpenCL Embedded Profile383

OpenCL Profile Overview383

64-Bit Integers385

Images386

Built-In Atomic Functions387

Mandated Minimum Single-Precision Floating-Point Capabilities387

Determining the Profile Supported by a Device in an OpenCL C Program390

Part Ⅱ OpenCL 1.1 Case Studies391

14.Image Histogram393

Computing an Image Histogram393

Parallelizing the Image Histogram395

Additional Optimizations to the Parallel Image Histogram400

Computing Histograms with Half-Float or Float Values for Each Channel403

15.Sobel Edge Detection Filter407

What Is a Sobel Edge Detection Filter?407

Implementing the Sobel Filter as an OpenCL Kernel407

16.Parallelizing Dijkstra's Single-Source Shortest-Path Graph Algorithm411

Graph Data Structures412

Kernels414

Leveraging Multiple Compute Devices417

17.Cloth Simulation in the Bullet Physics SDK425

An Introduction to Cloth Simulation425

Simulating the Soft Body429

Executing the Simulation on the CPU431

Changes Necessary for Basic GPU Execution432

Two-Layered Batching438

Optimizing for SIMD Computation and Local Memory441

Adding OpenGL Interoperation446

18.Simulating the Ocean with Fast Fourier Transform449

An Overview of the Ocean Application450

Phillips Spectrum Generation453

An OpenCL Discrete Fourier Transform457

Determining 2D Decomposition457

Using Local Memory459

Determining the Sub-Transform Size459

Determining the Work-Group Size460

Obtaining the Twiddle Factors461

Determining How Much Local Memory Is Needed462

Avoiding Local Memory Bank Conflicts463

Using Images463

A Closer Look at the FFT Kernel463

A Closer Look at the Transpose Kernel467

19.Optical Flow469

Optical Flow Problem Overview469

Sub-Pixel Accuracy with Hardware Linear Interpolation480

Application of the Texture Cache480

Using Local Memory481

Early Exit and Hardware Scheduling483

Efficient Visualization with OpenGL Interop483

Performance484

20.Using OpenCL with PyOpenCL487

Introducing PyOpenCL487

Running the PylmageFilter2D Example488

PyImageFilter2D Code488

Context and Command-Queue Creation492

Loading to an Image Object493

Creating and Building a Program494

Setting Kernel Arguments and Executing a Kernel495

Reading the Results496

21.Matrix Multiplication with OpenCL499

The Basic Matrix Multiplication Algorithm499

A Direct Translation into OpenCL501

Increasing the Amount of Work per Kernel506

Optimizing Memory Movement:Local Memory509

Performance Results and Optimizing the Original CPU Code511

22.Sparse Matrix-Vector Multiplication515

Sparse Matrix-Vector Multiplication(SpMV)Algorithm515

Description of This Implementation518

Tiled and Packetized Sparse Matrix Representation519

Header Structure522

Tiled and Packetized Sparse Matrix Design Considerations523

Optional Team Information524

Tested Hardware Devices and Results524

Additional Areas of Optimization538

A.Summary of OpenCL 1.1541

The OpenCL Platform Layer541

Contexts541

Querying Platform Information and Devices542

The OpenCL Runtime543

Command-Queues543

Buffer Objects544

Create Buffer Objects544

Read,Write,and Copy Buffer Objects544

Map Buffer Objects545

Manage Buffer Objects545

Query Buffer Objects545

Program Objects546

Create Program Objects546

Build Program Executable546

Build Options546

Query Program Objects547

Unload the OpenCL Compiler547

Kernel and Event Objects547

Create Kernel Objects547

Kernel Arguments and Object Queries548

Execute Kernels548

Event Objects549

Out-of-Order Execution of Kernels and Memory Object Commands549

Profiling Operations549

Flush and Finish550

Supported Data Types550

Built-In Scalar Data Types550

Built-In Vector Data Types551

Other Built-In Data Types551

Reserved Data Types551

Vector Component Addressing552

Vector Components552

Vector Addressing Equivalencies553

Conversions and Type Casting Examples554

Operators554

Address Space Qualifiers554

Function Qualifiers554

Preprocessor Directives and Macros555

Specify Type Attributes555

Math Constants556

Work-Item Built-In Functions557

Integer Built-In Functions557

Common Built-In Functions559

Math Built-In Functions560

Geometric Built-In Functions563

Relational Built-In Functions564

Vector Data Load/Store Functions567

Atomic Functions568

Async Copies and Prefetch Functions570

Synchronization,Explicit Memory Fence570

Miscellaneous Vector Built-In Functions571

Image Read and Write Built-In Functions572

Image Objects573

Create Image Objects573

Query List of Supported Image Formats574

Copy between Image,Buffer Objects574

Map and Unmap Image Objects574

Read,Write,Copy Image Objects575

Query Image Objects575

Image Formats576

Access Qualifiers576

Sampler Objects576

Sampler Declaration Fields577

OpenCL Device Architecture Diagram577

OpenCL/OpenGL Sharing APIs577

CL Buffer Objects>GL Buffer Objects578

CL Image Objects>GL Textures578

CL Image Objects>GL Renderbuffers578

Query Information578

Share Objects579

CL Event Objects>GL Sync Objects579

CL Context>GL Context,Sharegroup579

OpenCL/Direct3D 10 Sharing APIs579

Index581

热门推荐