User`s guide

xii Contents
Program Communicating Jobs
8
Program Communicating Jobs . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Program Communicating Jobs for a Supported Scheduler . 8-4
Schedulers and Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Code the Task Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Code in the Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Program Communicating Jobs for a Generic Scheduler . . . 8-7
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Code in the Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Further Notes on Communicating Jobs . . . . . . . . . . . . . . . . 8-10
Number of Tasks in a Communicating Job . . . . . . . . . . . . . 8-10
Avoid Deadlock and Other Dependency Errors . . . . . . . . . . 8-10
GPU Computing
9
GPU Capabilities and Performance . . . . . . . . . . . . . . . . . . . . 9-2
Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Performance Benchmarking . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Establish Arrays on a GPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Transfer Arrays Between Workspace and GPU . . . . . . . . . . . 9-3
Create GPU Arrays Directly . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Examine gpuArray Characteristics . . . . . . . . . . . . . . . . . . . . 9-7
Run Built-In Functions on a GPU . . . . . . . . . . . . . . . . . . . . . . 9-8
MATLAB Functions with gpuArray Arguments . . . . . . . . . . . 9-8
Example: Functions with gpuArray Input and Output . . . . . . 9-9
Sparse Arrays on a GPU . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10
Considerations for Complex Numbers . . . . . . . . . . . . . . . . . 9-11
Run Element-wise MATLAB Code on GPU . . . . . . . . . . . . . . 9-13
MATLAB Code vs. gpuArray Objects . . . . . . . . . . . . . . . . . . 9-13
Run Your MATLAB Functions on a GPU . . . . . . . . . . . . . . 9-13