where is book.h?

I am learning CUDA by using the book “cuda by example”. A header file “…/common/book.h” is used almost for all codes. But I can’t find it anywhere in my computer after I installed CUDA toolkit and SDK. Does anyone know where this header file is? I am also wondering if function HANDLE_ERROR() is defined in this header file coz there are errors when I compile the examples from the book.

I am learning CUDA by using the book “cuda by example”. A header file “…/common/book.h” is used almost for all codes. But I can’t find it anywhere in my computer after I installed CUDA toolkit and SDK. Does anyone know where this header file is? I am also wondering if function HANDLE_ERROR() is defined in this header file coz there are errors when I compile the examples from the book.

The source code for the book is availabe for download here.

The source code for the book is availabe for download here.

Hi,

I am having the same problem with not finding book.h and the link isn’t working. Any ideas where I can download it or where I can find it?

Thanks,

Hauyee

The webpage for the book has moved. Please visit:

http://developer.nvidia.com/cuda-example-introduction-general-purpose-gpu-programming

[Later:]

The automatic redirect from the old page also works now.

May be in the CD inside the book?

I cannot find book.h, clicked on all the links provided, but I cannot download the .zip file, can you please help?

Dolf

I am also using this book now. but the link of zip file is totally useless. Can some one here offer a new link? Thanks.

Thanks for bringing this to our attention, and sorry for the inconvenience. The link to the .zip file with the code form the book has been fixed.

(1) go to http://developer.nvidia.com/content/cuda-example-introduction-general-purpose-gpu-programming-0
(2) click on “Download source code for the book’s examples (.zip)”

The download should start at that point. I just tried it and verified that I was able to successfully download and open the .zip archive.

Hello I am having the same problem and the last link doesn’twork, thanks

This is NVIDIA’s developer landing page for CUDA by example:

[url]https://developer.nvidia.com/cuda-example[/url]

On that page, you will see a link that says:

“Download source code for the book’s examples (.zip)”

Click on that link. Accept the click-through agreement. Then your download will begin.

I just tried it now, it works fine.

Thank you

I have successfully downloaded it but there are problems while compiling. For example, I tried to compiled the example in chapter 4 of the julia set and it gives me 1453 errors present in “excpt.h”, “brcypt.h” (for example it doesn’t recognize the “PUCHAR”) and in the LINK as it can’t open “glut32.lib”. Is it a recurrent problem or is it just mine?

PS I recently dowloaded the Cuda Toolkit 8.1 and I use Microsoft Visual Studio 2015. Other programmes not using “book.h” run correctly.

Yep, its pretty old code, and other folks have had problems compiling too. It’s all fixable, if you know what you are doing.

Also familiarize yourself with the published errata:

[url]https://developer.nvidia.com/cuda-example-errata-page[/url]

The glut32.lib issue may be because you don’t have glut installed. It may also be because you are building a 32-bit windows project, which is definitely not recommended anymore with CUDA 8 and beyond.

Unfortunately I am not an expert, I read the errata but I didn’t find anything useful. I tried and sent an email to cuda@nvidia.com because I don’t know what to do. Thanks for the help

You might want to try googling “cuda by example compile error” and see if anything useful turns up.

i have that problem too
i have error in 3 line
#include “device_atomic_functions.h”
#include “…/common/book.h”
#include <cpu_bitmap.h>
please help me:)