GPU Centre Of Excellence Award

Extra CUDA libraries / header files

Developing and maintaining libraries and function definitions in header files takes a lot of effort, and NVIDIA has to make decisions about which software to develop and support.

This means that there is some software developed by NVIDIA which does not get supported but is nevertheless very useful:

  • helper_math.h header file defining operator-overloading operations for CUDA intrinsic vector datatypes such as float4 
  • dbldbl.h header file defining double-double arithmetic for quad-precision (developed by NVIDIA, but published independently under the terms of the BSD license)

helper_math.h is also available in the CUDA SDK, usually found in /usr/local/cuda/samples/common/inc. You will find a number of other header files here too, for various applications including matrix and quaternion operations.  There is also a header file called helper_cuda.h which has some helpful error-checking utilities.

For those working with complex variables, there are two alternatives:

  • cuComplex.h in the /usr/localcuda/include dirctory in the toolkit which defines the basics (+, -, *, /)
  • cuda_complex.hpp which defines additional operations (e.g. exp, log) but isn't compatible with cuComplex.h

If there are other libraries or header files which you have used and found useful, please tell me (mike.giles@maths.ox.ac.uk) and I will add them to this page.