FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
99 stars 19 forks source link

Incorrectly located docstrings attribtuted to namespaces #1149

Closed ptheywood closed 5 months ago

ptheywood commented 7 months ago

From the API docs, some docstrings are being associated to the namespace rather than the class / file they are for.

e.g. on https://docs.flamegpu.com/api/namespace_flamegpu.html

Detailed Description Collection of cuda related utility methods for internal use. Mostly to allow for graceful handling of device resets when cuda is called by dtors

This header exists to allow a convenient way to switch between curand implementations

The main cuRVE header file for the CUDA Runtime Struct Variable Environment (cuRVE) Based off the following article http:// www.gamasutra.com/view/news/127915/InDepth_Quasi_CompileTime_String_Hashing.php This file contains definitions common to HostCurve and DeviceCurve

CUDA does not implement atomicAdd(double*, double) for pre-pascal GPUs, which do not have the underlying hardware instruction. A CAS based software implementation is required instead, which will be much slower. This implementation is based on the reference implementation prodived by the CUDA toolkit documentation.

THIS CLASS SHOULD NOT BE INCLUDED DIRECTLY Include File AgentVector.h instead Use AgentVector::CAgent instead of Class AgentVector_CAgent Use AgentVector::Agent instead of Class AgentVector_Agent

Prodvides a utility method to cleanup after flamegpu. Currently for the only implementation (CUDA) this resets all devices.

Utility namespace for handling of NVTX profiling markers/ranges, uses if constexpr to avoid runtime cost when disabled

Macro FLAMEGPU_USE_NVTX is defined via CMake to set the member constexpr

E.g. the first part of that comes from

https://github.com/FLAMEGPU/FLAMEGPU2/blob/e606d4c2bd3db24d548729339896d8e1a7196fd1/include/flamegpu/detail/cuda.cuh#L4-L8

Which is prior to the flamegpu namespace, rather than the nested cuda namspace.

Moving that docstring to before the namespace cuda declaration would correctly associate it with the namespace.

https://github.com/FLAMEGPU/FLAMEGPU2/blob/e606d4c2bd3db24d548729339896d8e1a7196fd1/include/flamegpu/detail/cuda.cuh#L15-L16.

We probably do want to have a docstring somewhere for the flamepgu namspace though to populate that page with a general comment. Could be in any file but flamepgu.h would be the best place?


There will likely also be other occurences of this, and other docstring issues, which we might want to resolve. Might just need to do a pass of the api docs at some point if time allows.