GPU Programming in MATLAB

GPU Programming in MATLAB

1st Edition - July 28, 2016

Write a review

  • Authors: Nikolaos Ploskas, Nikolaos Samaras
  • Paperback ISBN: 9780128051320
  • eBook ISBN: 9780128051337

Purchase options

Purchase options
DRM-free (EPub, PDF, Mobi)
Sales tax will be calculated at check-out

Institutional Subscription

Free Global Shipping
No minimum order


GPU programming in MATLAB is intended for scientists, engineers, or students who develop or maintain applications in MATLAB and would like to accelerate their codes using GPU programming without losing the many benefits of MATLAB. The book starts with coverage of the Parallel Computing Toolbox and other MATLAB toolboxes for GPU computing, which allow applications to be ported straightforwardly onto GPUs without extensive knowledge of GPU programming. The next part covers built-in, GPU-enabled features of MATLAB, including options to leverage GPUs across multicore or different computer systems. Finally, advanced material includes CUDA code in MATLAB and optimizing existing GPU applications. Throughout the book, examples and source codes illustrate every concept so that readers can immediately apply them to their own development.

Key Features

  • Provides in-depth, comprehensive coverage of GPUs with MATLAB, including the parallel computing toolbox and built-in features for other MATLAB toolboxes
  • Explains how to accelerate computationally heavy applications in MATLAB without the need to re-write them in another language
  • Presents case studies illustrating key concepts across multiple fields
  • Includes source code, sample datasets, and lecture slides


Scientists working in MATLAB who wish to leverage GPUs; high performance computing engineers wishing to incorporate MATLAB; students studying these topics

Table of Contents

    • Dedication
    • About the Authors
    • Foreword
    • Preface
    • Chapter 1: Introduction
      • Abstract
      • 1.1 Parallel Programming
      • 1.2 GPU Programming
      • 1.3 CUDA Architecture
      • 1.4 Why GPU Programming in MATLAB? When to Use GPU Programming?
      • 1.5 Our Approach: Organization of the Book
      • 1.6 Chapter Review
    • Chapter 2: Getting started
      • Abstract
      • Chapter Objectives
      • 2.1 Hardware Requirements
      • 2.2 Software Requirements
      • 2.2.1 NVIDIA CUDA Toolkit
      • 2.3 Chapter Review
    • Chapter 3: Parallel Computing Toolbox
      • Abstract
      • 3.1 Product Description and Objectives
      • 3.2 Parallel for-Loops (parfor)
      • 3.3 Single Program Multiple Data (spmd)
      • 3.4 Distributed and Codistributed Arrays
      • 3.5 Interactive Parallel Development (pmode)
      • 3.6 GPU Computing
      • 3.7 Clusters and Job Scheduling
      • 3.8 Chapter Review
    • Chapter 4: Introduction to GPU programming in MATLAB
      • Abstract
      • 4.1 GPU Programming Features in MATLAB
      • 4.2 GPU Arrays
      • 4.3 Built-in MATLAB Functions for GPUs
      • 4.4 Element-Wise MATLAB Code on GPUs
      • 4.5 Chapter Review
    • Chapter 5: GPU programming on MATLAB toolboxes
      • Abstract
      • 5.1 Communications System Toolbox
      • 5.2 Image Processing Toolbox
      • 5.3 Neural Network Toolbox
      • 5.4 Phased Array System Toolbox
      • 5.5 Signal Processing Toolbox
      • 5.6 Statistics and Machine Learning Toolbox
      • 5.7 Chapter Review
    • Chapter 6: Multiple GPUs
      • Abstract
      • 6.1 Identify and Run Code on a Specific GPU Device
      • 6.2 Examples Using Multiple GPUs
      • 6.3 Chapter Review
    • Chapter 7: Run CUDA or PTX code
      • Abstract
      • 7.1 A Brief Introduction to CUDA C
      • 7.2 Steps to Run CUDA or PTX Code on a GPU Through MATLAB
      • 7.3 Example: Vector Addition
      • 7.4 Example: Matrix Multiplication
      • 7.5 Chapter Review
    • Chapter 8: MATLAB MEX functions containing CUDA code
      • Abstract
      • 8.1 A Brief Introduction to MATLAB MEX Files
      • 8.2 Steps to Run MATLAB MEX Functions on GPU
      • 8.3 Example: Vector Addition
      • 8.4 Example: Matrix Multiplication
      • 8.5 Chapter Review
    • Chapter 9: CUDA-accelerated libraries
      • Abstract
      • 9.1 Introduction
      • 9.2 cuBLAS
      • 9.3 cuFFT
      • 9.4 cuRAND
      • 9.5 cuSOLVER
      • 9.6 cuSPARSE
      • 9.7 NPP
      • 9.8 Thrust
      • 9.9 Chapter Review
    • Chapter 10: Profiling code and improving GPU performance
      • Abstract
      • 10.1 MATLAB Profiling
      • 10.2 CUDA Profiling
      • 10.3 Best Practices for Improving GPU Performance
      • 10.4 Chapter Review
    • References
    • List of Examples
    • Index

Product details

  • No. of pages: 318
  • Language: English
  • Copyright: © Morgan Kaufmann 2016
  • Published: July 28, 2016
  • Imprint: Morgan Kaufmann
  • Paperback ISBN: 9780128051320
  • eBook ISBN: 9780128051337

About the Authors

Nikolaos Ploskas

Nikolaos Ploskas is a Postdoctoral Researcher at the Department of Chemical Engineering, Carnegie Mellon University, USA. He received his Bachelor of Science degree, Master’s degree, and Ph.D. in Computer Systems from the Department of Applied Informatics of the University of Macedonia, Greece. His primary research

interests are in:

Operations research,

Mathematical programming,

Linear programming,

Parallel programming,

GPU programming,

Decision support systems.

Dr. Ploskas has participated in several international and national research projects. He is the author or co-author of writings in more than 40 publications, including high-impact journals and book chapters, and conference publications. He has also served as a reviewer for many scientific journals. He received an honorary award from HELORS (Hellenic Operations Research Society) for the best doctoral dissertation in operations research (2014).

Affiliations and Expertise

Department of Applied Informatics, School of Information Sciences, University of Macedonia, Greece

Nikolaos Samaras

Nikolaos Samaras is a Professor at the Department of Applied Informatics, School of Information Sciences, University of Macedonia, Greece. Professor Samaras’s current-research interests are at the interface between computer science and operations research, which apply to a variety of engineering and scientific systems:

Linear/Non Linear optimization: theory, algorithms, and software

Network optimization: theory, algorithms, and software

Scientific computing: HPC, and GPU-programming

He has served on the editorial board of the Operations Research: An International Journal, and as a reviewer in many scientific journals. He has also held numerous positions within HELORS (Hellenic Operations Research Society). He was awarded with the Thomson ISI/ASIS&T Citation Analysis Research Grant (2005).

Dr. Samaras has published more than 35 journal papers in high-impact journals, including Computational Optimization and Applications, Computers and Operations Research, European Journal of Operational Research, Annals of Operations Research, Journal of Artificial Intelligence Research, Discrete Optimization, Applied Mathematics and Computation, International Journal of Computer Mathematics, Electronics Letters, Computer Applications in Engineering Education, Journal of Computational Science, and Applied Thermal Engineering. He has also published more than 85 conference papers.

Affiliations and Expertise

Department of Applied Informatics, School of Information Sciences, University of Macedonia, Greece

Ratings and Reviews

Write a review

There are currently no reviews for "GPU Programming in MATLAB"