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
OpenCL Programming by Example
OpenCL Programming by Example

OpenCL Programming by Example: A comprehensive guide on OpenCL programming with examples with this book and ebook

Arrow left icon
Profile Icon Banger Profile Icon Koushik Bhattacharyya
Arrow right icon
$60.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3 (7 Ratings)
Paperback Dec 2013 304 pages 1st Edition
eBook
$9.99 $36.99
Paperback
$60.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Banger Profile Icon Koushik Bhattacharyya
Arrow right icon
$60.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3 (7 Ratings)
Paperback Dec 2013 304 pages 1st Edition
eBook
$9.99 $36.99
Paperback
$60.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $36.99
Paperback
$60.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

OpenCL Programming by Example

Chapter 2. OpenCL Architecture

Heterogeneous computing is all about exploiting computing resources in a platform to maximize performance. Many developers have begun to realize that heterogeneous multi-core computer systems can provide significant performance opportunities to a range of applications. OpenCL specification targets expert programmers who want to run their code on various heterogeneous platforms. Unlike NVIDIA® CUDA framework, which is capable of running only on NVIDIA devices, library writers can provide acceleration on any parallel hardware device using OpenCL. Thus OpenCL provides a low-level hardware abstraction and a programming model to support a variety of hardware architectures.

OpenCL describes a hierarchy of models to describe the OpenCL programming framework:

  • Platform model
  • Memory model
  • Execution model
  • Programming model

Platform model

In heterogeneous computing, knowledge about the architecture of the targeted device is critical to reap the full benefits of the hardware. We had discussed the hardware architectures from AMD, Intel, and NVIDIA in Chapter 1, Hello OpenCL. Though we will briefly discuss about the hardware from different vendors, we suggest you to take a deeper look at the underlying platform on which you will be working. In this section we will describe the OpenCL Platform model and map the AMD, NVIDIA, and Intel hardware architectures to the OpenCL Platform definitions.

Platform model

OpenCL platform model, Courtesy Khronos

An OpenCL Platform model consists of a host connected to one or more devices like CPU's, GPU's or hardware accelerators like DSP's. Each OpenCL device consists of one or more compute units, which in turn is further divided into one-to-many processing elements. Computations on a device that is the actual kernel (work item) execution occurs within these processing elements...

Platform versions

The OpenCL is designed to support devices with different capabilities under a single platform. This includes devices which conform to different versions of the OpenCL specification. While writing an OpenCL based application one needs to query the implementation about the supported version in the platform. There are mainly two different types of version identifiers to consider.

  • Platform Version: Indicates the version of the OpenCL runtime supported.
  • Device Version: Indicates the device capabilities and attributes. The conformant version info provided cannot be greater than platform version.

Query platforms

Now let's write an OpenCL program to get the platform details. Use the get_platform_property example in this chapter.

The OpenCL standard specifies API interfaces to determine the platform configuration. To query the platform versions and details of the OpenCL implementation, the following two APIs are used:

cl_int clGetPlatformIDs (cl_uint num_entries,
  cl_platform_id...

Execution model

The two main execution units in OpenCL are the kernels and the host program. The kernels execute on the so called OpenCL device and the host program runs on the host computer. The main purpose of the host program is to create and query the platform and device attributes, define a context for the kernels, build the kernel, and manage the execution of these kernels.

On submission of the kernel by the host to the device, an N dimensional index space is created. N is at least 1 and not greater than 3. Each kernel instance is created at each of the coordinates of this index space. This instance is called as the "work item" and the index space is called as the NDRange. In the following screenshot we have shown the three scenarios for 1, 2 and 3 dimensional NDRange:

Execution model

OpenCL NDRange

In the saxpy example which we discussed in the previous chapter, we have taken a global size of 1024 and a local size of 64. Each work item computes the corresponding:

C[local id] = alpha* A[local...

Memory model

The OpenCL Memory model guarantees a relaxed memory consistency between devices. This means that different work items may see a different view of global memory as the computation progresses. This leads to a bigger challenge for the developers to partition data and splitting computation tasks into different work items. Synchronization is required to ensure data consistency within the work items of a work group. One needs to make sure that the data the work item is accessing is always correct. This makes the application developers task a little complicated to write applications with relaxed consistency, and hence explicit synchronization mechanisms are required.

The x86/x86_64 CPU cache coherent architecture is different from the OpenCL relaxed memory architecture. In cache coherent systems, data that resides in the local processor caches is guaranteed to be consistent across processors. The programmer need not worry about the data partitioning in cache coherent architectures...

OpenCL ICD

The OpenCL function clGetPlatformIDs is used to determine the different OpenCL implementations available in the platform. There can be multiple OpenCL implementations installed in the system. Let's define an OpenCL platform.

An OpenCL platform is a host computing machine and a collection of heterogeneous devices managed by OpenCL implementations, which allow an application to share hardware resources and execute kernels on different devices in the platform. Devices from different vendors will have their own OpenCL runtimes in the platform. Let's consider a system with an AMD graphics card and an NVIDIA graphics card. Now an AMD OpenCL implementation is not going to work on NVIDIA OpenCL devices. Remember only the code is portable not the underlying OpenCL runtime. So how does an application solve this problem of using the multiple OpenCL runtimes or use multiple platforms. The answer is OpenCL ICD.

What is an OpenCL ICD?

The OpenCL Installable Client Driver (ICD) is a...

Platform model


In heterogeneous computing, knowledge about the architecture of the targeted device is critical to reap the full benefits of the hardware. We had discussed the hardware architectures from AMD, Intel, and NVIDIA in Chapter 1, Hello OpenCL. Though we will briefly discuss about the hardware from different vendors, we suggest you to take a deeper look at the underlying platform on which you will be working. In this section we will describe the OpenCL Platform model and map the AMD, NVIDIA, and Intel hardware architectures to the OpenCL Platform definitions.

OpenCL platform model, Courtesy Khronos

An OpenCL Platform model consists of a host connected to one or more devices like CPU's, GPU's or hardware accelerators like DSP's. Each OpenCL device consists of one or more compute units, which in turn is further divided into one-to-many processing elements. Computations on a device that is the actual kernel (work item) execution occurs within these processing elements. We just coined...

Platform versions


The OpenCL is designed to support devices with different capabilities under a single platform. This includes devices which conform to different versions of the OpenCL specification. While writing an OpenCL based application one needs to query the implementation about the supported version in the platform. There are mainly two different types of version identifiers to consider.

  • Platform Version: Indicates the version of the OpenCL runtime supported.

  • Device Version: Indicates the device capabilities and attributes. The conformant version info provided cannot be greater than platform version.

Query platforms

Now let's write an OpenCL program to get the platform details. Use the get_platform_property example in this chapter.

The OpenCL standard specifies API interfaces to determine the platform configuration. To query the platform versions and details of the OpenCL implementation, the following two APIs are used:

cl_int clGetPlatformIDs (cl_uint num_entries,
  cl_platform_id *platforms...
Left arrow icon Right arrow icon

Key benefits

  • Learn about all of the OpenCL Architecture and major APIs.
  • Learn OpenCL programming with simple examples from Image Processing, Pattern Recognition and Statistics with detailed code explanation.
  • Explore several aspects of optimization techniques, with code examples to guide you through the process
  • Understand how to use OpenCL in your problem domains

Description

Research in parallel programming has been a mainstream topic for a decade, and will continue to be so for many decades to come. Many parallel programming standards and frameworks exist, but only take into account one type of hardware architecture. Today computing platforms come with many heterogeneous devices. OpenCL provides royalty free standard to program heterogeneous hardware. This guide offers you a compact coverage of all the major topics of OpenCL programming. It explains optimization techniques and strategies in-depth, using illustrative examples and also provides case studies from diverse fields. Beginners and advanced application developers will find this book very useful. Beginning with the discussion of the OpenCL models, this book explores their architectural view, programming interfaces and primitives. It slowly demystifies the process of identifying the data and task parallelism in diverse algorithms. It presents examples from different domains to show how the problems within different domains can be solved more efficiently using OpenCL. You will learn about parallel sorting, histogram generation, JPEG compression, linear and parabolic regression and k-nearest neighborhood, a clustering algorithm in pattern recognition. Following on from this, optimization strategies are explained with matrix multiplication examples. You will also learn how to do an interoperation of OpenGL and OpenCL. "OpenCL Programming by Example" explains OpenCL in the simplest possible language, which beginners will find it easy to understand. Developers and programmers from different domains who want to achieve acceleration for their applications will find this book very useful.

Who is this book for?

If you are a beginner in parallel programming and would like to quickly accelerate your algorithms using OpenCL, this book is perfect for you! You will find the diverse topics and case studies in this book interesting and informative. You will only require a good knowledge of C programming for this book, and an understanding of parallel implementations will be useful, but not necessary.

What you will learn

  • Understand OpenCL Platform Model, Execution Model, Memory Model, and Programming Model
  • Explore the different OpenCL objects, APIs for building kernel, memory allocation, data transfer, synchronization, and many more
  • Get to grips with API explanations, featuring simple examples
  • Create image processing examples such as Image histogram and Image convolution
  • Learn optimization techniques with Matrix Multiplication and Histogram examples.
  • Develop Bitonic sort in OpenCL
  • Build JPEG decoder using OpenCL
  • Construct linear and parabolic regression equation in OpenCL
  • Compose k-nearest neighborhood clustering algorithm from pattern recognition
  • Use OpenCL with OpenGL interoperability
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 23, 2013
Length: 304 pages
Edition : 1st
Language : English
ISBN-13 : 9781849692342
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Dec 23, 2013
Length: 304 pages
Edition : 1st
Language : English
ISBN-13 : 9781849692342
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 176.97
OpenGL Development Cookbook
$54.99
OpenGL 4 Shading Language Cookbook, Second Edition
$60.99
OpenCL Programming by Example
$60.99
Total $ 176.97 Stars icon

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3
(7 Ratings)
5 star 28.6%
4 star 28.6%
3 star 0%
2 star 28.6%
1 star 14.3%
Filter icon Filter
Top Reviews

Filter reviews by




Robin T. Wernick Mar 18, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Due to the war between the GPUs reaching a terminal phase this may be the last comprehensive book published for OpenCL. Nvidia's dominance in the field of GPU programming and the prevalence of CUDA code examples are overshadowing OpenCL.However, there are many systems out there still using AMD's products and the mobile market is still OpenCL accessible. The ARM chariman says so and Sony's Experia can use it. Also, Nexus 10 and 4 devices have drivers for it. So, tablet designers attention! If you want to manage eye-popping animations or twisty-curley 3D simulations or detector displays, then pay attention to this manual.You will have to search the internet and fire up your Android NDK in some cases to maximize your mobile device to manage a display of 10,000 airplane tracks on a map of the US or merge six voice channels into one conference call.For the rest of us, it's a piece of cake, drivers for all the Nvidia and ATI cards are available. Every computing device with a supported GPU can run this code. I even ran the OpenCL starfield simulation on my MSI portable at 112 times the speed of the CPU and it was running on an Nvidia GTX 570GTM internal chip!This book will show you how to take all those simulation ideas and run any computer with a decent graphics card 100 times faster than any current CPU can manage. The book covers all the aspects of using OpenCL from buffer loading, kernel creating and executing, to synchronization and performance evaluation.OK, at 277 pages, its a bit thin for the price. But, what is the cost of fame and fortune? So, buck up and get your head wrapped around this information. The sky is the limit to your imagination here.
Amazon Verified review Amazon
lefaucheux Jul 16, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Couvre les besoins pour bien comprendre OpenCL et même plus ...Facile à assimiler que l'on soit développeurs avancés ou débutants
Amazon Verified review Amazon
milesrf Jun 17, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Looks like it will be useful once I get started with a compatible C++ compiler.
Amazon Verified review Amazon
Paul T. Miller Mar 16, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
OpenCL Programming by Example, published by Packt Publishing, is geared toward the OpenCL beginner, so if you already have experience with OpenCL the book doesn’t offer much, though I did learn some nice tips and the OpenCL 1.2 information is useful.The book starts off with some nicely detailed background information on GPU architectures – no surprise as the authors work for AMD. Information is provided on getting the necessary OpenCL libraries and runtimes installed and read for use, so there shouldn’t be any confusion about how to get started. Then comes the nicely detail sample code, which is abundant and well documented.The book covers both basic and more complex GPU algorithms, including basic image processing with OpenCL images, computing histograms with reductions, implementing JPEG compression, and even goes into advanced case studies of speeding up curve-fitting and bitonic sort. The explanations and examples are very complete.I had a few minor issues with the book though. The early chapters are nicely edited but later on there are many grammatical errors and editing mistakes. A lot of boilerplate code is repeated in the examples; it would have been nice if the authors had developed a little wrapper or framework to hide some of the more mundane stuff. And as someone who uses OpenCL for image processing, I would like to have seen more examples in that area. The image processing examples were fairly mundane and well covered elsewhere.Gripes aside, I would definitely recommend this book to a programmer who wants to learn OpenCL. This is probably the most complete book I’ve read yet on the subject. Finally, I’d encourage everyone to check out Packt’s steadily growing library of technical books. The breadth of topics there will surprise you.
Amazon Verified review Amazon
Liad Weinberger Apr 15, 2014
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
First and foremost, a proper disclosure: I was originally signed by Packt Publishing to write this book. Having failed to meet their schedule, Packt re-signed the book with the current authors and asked me to review the book during writing. I have reviewed the first couple of chapters and returned my comments, none of which were integrated in the book, nor have I received any additional chapters for review. My Amazon customer review may therefore seem biased, but I do hope the advised reader will take note and deduce, on her own accord, whether or not that is the case.And now my Amazon customer review:In the preface of the book, the section dubbed "Errata" starts with the following sentence: "Although we have taken every care to ensure the accuracy of our content, mistakes do happen". This is a rather standard statement in many technical books, and should be taken into account whenever a reader finds a mistake in the content. I find it hard to treat the book seriously though, having gone through the process of reviewing the first two chapters prior to the books publication, and ending up reading almost the exact same text in the published material, as what I have received for review and commented on.An example of such mistake that appears in the published book appears at the middle of chapter 1. In the section dubbed "Implement the SAXPY routine in OpenCL", the authors provide a code listing for an ANSI-C implementation of saxpy:void saxpy(int n, float a, float *b, float *c){ for (int i = 0; i < n; ++i) y[i] = a*x[i] + y[i];}I'm not trying to nitpick here, but this code will not compile under any C compiler, unless x and y are globally defined elsewhere, in which case the function will probably not accomplish the intended purpose. Of course it is clear that this is an editorial error, where x and y should have been b and c (or vise verse), but the fact that I commented on this while reviewing the chapter, and the error prevailed to the published version, sheds the promise of "we have taken every care to ensure the accuracy of our content" in a bad light.I would have been OK with the book if this was the only type of errors I found in it, but unfortunately they're not. The book contains a lot of information that newcomers to OpenCL, and to parallel programming in general will find interesting. It is too bad however that this information is flawed, and in some cases gives the impression that the authors, although undoubtedly used and are using OpenCL, fail to fully grasp some of the concepts or delicacies presented by the standard. Add to that the rather poor English grammar conveyed in the book (Packt's English editors were especially sloppy here), and you got yourself a recipe for producing misguided beginner programmers.Some examples are required to emphasis this claim. I'll give some from the 1st chapter, because if this early such mistakes are made, the following is of lesser importance.The 2nd paragraph in chapter 1 draws from Wikipedia's definition of parallel computing. It concludes with the following phrasing: "... large problems can often be divided into smaller ones, which are then solved concurrently (in parallel)". It is important to distinguish between the terms "parallel" and "concurrent". Although one would strive that her different "smaller" tasks run concurrently, that isn't always feasible, even as these are parallel tasks. Parallel is a logical term, describing the state of two (or more) task, having the theoretical ability of being executed at the same time. Concurrency is a physical term describing the target hardware's ability to execute parallel tasks. Parallel computing therefore, by no means, suggests that these parallel tasks will be executed concurrently.I will skip a few paragraphs, namely the rather odd list of parallel programming models in which the authors makes several errors regarding the "pros" and "cons" he chooses to list for each, and his decisions to put these models in comparison when they inherently target different levels of parallelism (local, heterogeneous systems, and distributed systems), and when these models are usually used in conjunction to one another, and complement one another, rather than compete.In the section dubbed "Introduction to OpenCL" the authors claim "OpenCL gives developers a common set of easy-to-use tools...". This is false. OpenCL provides two things, and two things only: an API (divided into two layers) which allows a host processor to manage and coordinate computations across different target devices within the system, and a programming language named OpenCL C, which the developer uses in order to write the code that will be executed on these devices. No tools. More than that, the authors are clearly confused as in a later section dubbed "OpenCL program flow" he falsely writes " An OpenCL C host code does the following...". As mentioned above, OpenCL C is used for programming the devices, whereas the host utilized the OpenCL API.I can actually list more problems found in chapter 1, but I hope that at this point you got the point. This actually gets worse in the following chapters where the authors describe the 4 models presented by the OpenCL standard. Just a small example for a mistake in the text: the authors claim "For high performance every OpenCL device has an associated local memory. This is the memory closest to the OpenCL processing element". This is false, as OpenCL does not define how local memory is to be implemented, and therefore some vendors choose to implement it over the same physical banks of their global memory (which means it operates at the same latency as global memory - providing no performance gains). Local memory with regards to OpenCL, has no performance considerations. These are the domain of device-specific targeting. As you may by now suspect, the list of false claims is much longer, but I will not indulge in it at this time.On a positive note, the set of examples provided in the book (and some are actually pretty good) allows the authors to demonstrate the usage of key concepts in OpenCL programming, which leads me to believe the authors are indeed experienced users of OpenCL, although lack a deep understanding of the different aspects of the standard (they should be, as the lead author is an AMD employee, working on OpenCL code optimizations).The bottom line is simple: if you are serious about learning OpenCL programming - keep away from this book. Not because it doesn't give good examples, but because it is filled with misguided, and at times simply wrong information, both in background topics, but also, and perhaps more concerning, the actual matter of the OpenCL standard. Do yourself a favor and pick a copy of "OpenCL in Action" (published by: Manning Publications), or "Heterogeneous Computing with OpenCL" (published by: Morgan Kaufmann), or even "The OpenCL Programming Guide" (published by: Addison-Wesley Professional), which closely resembles the standard (written by some of the standard editors...), before you pick this book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon