10

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?

shinjin
  • 2,858
  • 5
  • 29
  • 44
  • 1
    The cutil functionality was deleted from the CUDA 5.0 Samples (i.e. the "SDK"). You can still [download a previous SDK](https://developer.nvidia.com/cuda-toolkit-archive) and compile it under CUDA 5, you should then have everything that came with previous SDK's. – Robert Crovella Feb 17 '13 at 21:31
  • Thanks, I'll take it for an answer. Any ideas why it got discontinued? – shinjin Feb 18 '13 at 02:15
  • 1
    It is replaced by other header files like math_helper.h and they are still in samples\common\inc directory. – phoad Aug 18 '14 at 09:12

2 Answers2

13

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.

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
0

in latest SDK helper_math.h implement most of required operator, however its still missing logical operators like OR or AND

BaraBashkaD
  • 144
  • 3
  • 10