HIP icon indicating copy to clipboard operation
HIP copied to clipboard

Documentation inconsistent about preprocessor macros identifying AMD or NVIDIA platform

Open Noerr opened this issue 1 year ago • 2 comments

HIP_PLATFORM_AMD or __HIP_PLATFORM_AMD__ ? HIP_PLATFORM_NVIDIA or __HIP_PLATFORM_NVIDIA__ ?

The paragraph Identifying HIP Target Platform should be more explicit in use of "is defined".

If talking about a preprocessor macro definition, then these names without double underscore are inconsistent with the following paragraph.

If talking about an environment variable set, then say "is defined in the environment". ( I suspect this is not the case, what would define such a variable )

This HIP FAQ by AMD suggests the right macro is no double underscores.

Noerr avatar Apr 04 '23 22:04 Noerr