The rank lists and rank structs benchmarks do not pass the bool percentage parameter to cudf::rank. But they do pass a MR*, and since pointers can be implicitly converted to bool, the MR goes unused and percentage is taken as true.
Note that passing a MR without passing a stream should not compile, and if the parameter before stream were something that a pointer can't be converted to, it wouldn't.
This is another good reason to avoid bool parameters. :)
The rank lists and rank structs benchmarks do not pass the
bool percentage
parameter tocudf::rank
. But they do pass a MR*, and since pointers can be implicitly converted to bool, the MR goes unused andpercentage
is taken astrue
.https://github.com/rapidsai/cudf/blob/58799d698d861866b5650d368f5195174fc9644e/cpp/benchmarks/sort/rank_lists.cpp#L35-L40
and
https://github.com/rapidsai/cudf/blob/58799d698d861866b5650d368f5195174fc9644e/cpp/benchmarks/sort/rank_structs.cpp#L33-L38
The prototype for
rank
is:Note that passing a MR without passing a stream should not compile, and if the parameter before
stream
were something that a pointer can't be converted to, it wouldn't.This is another good reason to avoid bool parameters. :)