I learnt today that in NVIDIA GPUs there are in the vertex unit special hardware functions for calculating linear interpolation in a 3D regular grid. I wonder if there are more of this kind and more important, if people really use them when they do GPGPU to accelerate codes
There are a number of functions that are implemented in hardware. The term you're looking for are "CUDA intrinsic functions." The linear interpolation is handled by textures, which is something similar.
See here: http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Programming_Guide.pdf
The intrinsic functions are typically spelled with leading double underscores, like __sin, or enabled globally with the --use_fast_math nvcc option.
And yes, they're actually used quite often. :) They are slightly more inaccurate from a numerical perspective, so passing the results of one intrinsic into another repeatedly can have unacceptable error, depending on your use case. Testing is key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With