Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find CUDA's cutil_math.h?

Tags:

cuda

The CUDA FAQ says:

CUDA defines vector types such as float4, but doesn't include any operators on them by default. However, you can define your own operators using standard C++. The CUDA SDK includes a header "cutil_math.h" that defines some common operations on the vector types.

However I can not find this using CUDA SDK 5.0. Has it been removed/renamed?

I've found a version of the header here. How is it related to the one that's supposed to come with SDK?

like image 943
shinjin Avatar asked Feb 17 '13 09:02

shinjin


1 Answers

The cutil functionality was deleted from the CUDA 5.0 Samples (i.e. the "SDK"). You can still download a previous SDK and compile it under CUDA 5, you should then have everything that came with previous SDK's.

The official notice was given by nvidia in the CUDA 5.0 release notes (CUDA_Samples_Release_Notes.pdf, installed with the samples). As to why, I imagine that the nvidia sentiment regarding cutil probably was something like what is expressed here "not suitable for use in a real application. It is completely unsupported" but people were using it in real applications. So one way to try put a stop to that is to delete it, I suppose. That's just speculation.

Note some additional useful info provided in the release notes:

CUTIL has been removed with the CUDA Samples in CUDA 5.0, and replaced with helper functions found in NVIDIA_CUDA-5.0/common/inc: helper_cuda.h, helper_cuda_gl.h, helper_cuda_drvapi.h, helper_functions.h, helper_image.h, helper_math.h, helper_string.h, helper_timer.h

These helper functions handle CUDA device initialization, CUDA error checking, string parsing, image file loading and saving, and timing functions. The CUDA Samples projects no longer have references and dependencies to CUTIL, and now use these helper functions going forward.

So you may find useful functions in some of those header files.

like image 97
Robert Crovella Avatar answered Nov 04 '22 16:11

Robert Crovella