Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
OpenCL Programming by Example

You're reading from   OpenCL Programming by Example A comprehensive guide on OpenCL programming with examples with this book and ebook

Arrow left icon
Product type Paperback
Published in Dec 2013
Publisher Packt
ISBN-13 9781849692342
Length 304 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
 Banger Banger
Author Profile Icon Banger
Banger
Koushik Bhattacharyya Koushik Bhattacharyya
Author Profile Icon Koushik Bhattacharyya
Koushik Bhattacharyya
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Hello OpenCL FREE CHAPTER 2. OpenCL Architecture 3. OpenCL Buffer Objects 4. OpenCL Images 5. OpenCL Program and Kernel Objects 6. Events and Synchronization 7. OpenCL C Programming 8. Basic Optimization Techniques with Case Studies 9. Image Processing and OpenCL 10. OpenCL-OpenGL Interoperation 11. Case studies – Regressions, Sort, and KNN Index

Creating program objects

An OpenCL application can execute a function in parallel on a device using the kernel objects. There may be more than one kernel functions, which run in parallel in an application based on the hardware you have. An application can create multiple program objects each for a different context. Each of these program objects can have more than one kernel object. Each kernel in a program source string is identified by a __kernel qualifier. Let us first create a cl_program object.

Creating and building program objects

The OpenCL kernel programs needs to be built and linked at runtime. In OpenCL a program object can be created using the functions, clCreateProgramWithSource or clCreateProgramWithBinary. A program object is created once for a context in execution. Input to these functions is a source text string in ASCII or in binary format respectively. The program object is created for the devices associated with the OpenCL context. The clCreateProgramWithSource function...

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
OpenCL Programming by Example
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime
Modal Close icon
Modal Close icon