cccl icon indicating copy to clipboard operation
cccl copied to clipboard

[BUG]: inconsistent use of macros to suppress doxygen document generation

Open ericniebler opened this issue 1 year ago • 1 comments

Is this a duplicate?

  • [x] I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct

Type of Bug

Something else

Component

Not sure

Describe the bug

In CCCL, I see uses of the following macros to control what parts of the code are processed by doxygen:

  • DOXYGEN_SHOULD_SKIP_THIS
  • THRUST_DOXYGEN
  • _LIBCUDACXX_DOXYGEN_INVOKED

From docs/repo.toml, it looks like the following are defined while doxygen is processing the code:

  • DOXYGEN_SHOULD_SKIP_THIS
  • DOXYGEN_ACTIVE

... and those only seem to be defined for the CUB and Thrust projects, not libcudacxx. This needs to be cleaned up and made consistent.

I suggest we switch everything to a _CCCL_DOXYGEN_INVOKED macro.

How to Reproduce

n/a

Expected behavior

n/a

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

ericniebler avatar Sep 04 '24 16:09 ericniebler

I am happy about any solution that it is easily comprehendible in code. Currently, we use this a lot:

#ifndef DOXYGEN_SHOULD_SKIP_THIS
...
#endif

and if there weren't a trailing comment // Do not document I would not understand whether it skips the section or not (because the #ifndef is a negation).

bernhardmgruber avatar Sep 04 '24 16:09 bernhardmgruber