Skip to content

Commit

Permalink
Update the docstring to reflect the changes in the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
achirkin committed May 14, 2024
1 parent a1eb9cc commit 98f0588
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cpp/include/raft/core/detail/nvtx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ inline auto hsv2rgb(float h, float s, float v) -> uint32_t
/**
* @brief Helper method to generate 'visually distinct' colors.
* Inspired from https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
* However, if an associated tag is passed, it will look up in its history for
* any generated color against this tag and if found, just returns it, else
* generates a new color, assigns a tag to it and stores it for future usage.
* It calculates a hash of the passed string and uses the result to generate
* distinct yet deterministic colors.
* Such a thing is very useful for nvtx markers where the ranges associated
* with a specific tag should ideally get the same color for the purpose of
* visualizing it on nsight-systems timeline.
* @param tag look for any previously generated colors with this tag or
* associate the currently generated color with it
* @param tag a string used as an input to generate a distinct color.
* @return returns 32b RGB integer with alpha channel set of 0xff
*/
inline auto generate_next_color(const std::string& tag) -> uint32_t
Expand Down

0 comments on commit 98f0588

Please sign in to comment.