Refactor stream mode setup for gtests - #15337
Conversation
| * @param cmd_opts Command line options returned by parse_cudf_test_opts | ||
| * @return Memory resource adaptor | ||
| */ | ||
| inline auto make_stream_mode_adaptor(cxxopts::ParseResult const& cmd_opts) |
There was a problem hiding this comment.
I have a mild preference for actually declaring the return type here instead of using auto. Gives the caller a little more context with what's going on.
There was a problem hiding this comment.
Normally I prefer the return types as well. The type here is something created through templated RMM classes only to be passed back to an RMM function. This means RMM could change the type/name on us and would then require this code to be updated even though we don't actually rely on the type for anything--we don't make calls to it, we just pass it to set_current_device_resource. The returned object then just needs to stay alive for the life of the tests. Leaving it as auto here helps future proofs this code a bit.
|
/merge |
Description
Setting up the stream mode logic was duplicated in
testing_main.hppanderror_handing_test.cu.Refactoring the logic will help setup for a large strings test fixture in a follow-on PR.
Checklist