Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part 1: Foundations of OpenCL programmin... > Kernel programming: data types and d...

4. Kernel programming: data types and device memory

This chapter covers

  • Introducing a simple OpenCL kernel

  • Using OpenCL’s scalar and vector data types

  • Understanding the OpenCL device model


In this chapter, we’re going to put aside the scaffolding that creates and deploys kernels, and start coding the kernels themselves. We’ll examine the data types available in OpenCL kernels, and that means we’ll finally get to discuss vectors. When you process data with vectors, you put aside boring, decades-old data types like char, float, and int, and use new, exciting data types like char16, int3, and float4. Now we’re cooking!


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint