The current documentation for cudaHostGetDevicePointer
is here.
From the documentation:
flags
provides for future releases. For now, it must be set to 0.
That means it is just a placeholder. In some future CUDA release (beyond CUDA 7.0), there may be a use for that value. Currently it doesn't cause any behavioral change, but you are still required to specify it as zero. Specifying it as zero should enable compatibility (no behavioral change) in any future CUDA release, even if the non-zero values result in a difference in behavior.
Regarding the use of the the cudaHostGetDevicePointer
function:
It is used with zero-copy mapped memory, which is accessible from both host and device. To access it from device, you need the device pointer, which may be different from the host pointer in a non-UVA environment. This function provides the device pointer associated with a previously allocated/pinned/mapped host pointer.
Here is a usage example.