Abstract
This chapter explains how to create an executable kernel for a CUDA C code or PTX code and run that kernel on a GPU by calling it through MATLAB. Moreover, a brief introduction of CUDA C is presented. Furthermore, two classic examples, vector addition and matrix multiplication, are presented. After reading this chapter, you should be able to: •understand the basic features of a CUDA C code.•compile kernels written in CUDA C.•use compiled PTX codes to create CUDAKernel objects.•execute kernels on a GPU by calling them through MATLAB.•set properties on the CUDAKernel object to control its execution on the GPU.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.