cpp/tests/utilities/base_fixture.hpp
inline std::unique_ptr<rmm::mr::device_memory_resource> create_memory_resource(std::string const& allocation_mode)
{
    if( allocation_mode == "cuda" )
        return std::make_unique<rmm::mr::cuda_memory_resource>();
    if( allocation_mode == "pool" )
        return std::make_unique<rmm::mr::cnmem_memory_resource>();
    if( allocation_mode == "managed" )
        return std::make_unique<rmm::mr::managed_memory_resource>();
    CUDF_FAIL("Invalid RMM allocation mode: " + allocation_mode);
}
/**
 * @brief Creates a memory resource for the unit test environment
 * given the name of the allocation mode.
 * 
 * The returned resource instance must be kept alive for the duration of
 * the tests. Attaching the resource to a TestEnvironment causes
 * issues since the environment objects are not destroyed until
 * after the runtime is shutdown.
 * 
 * @throw cudf::logic_error if the `allocation_mode` is unsupported.
 *
 * @param allocation_mode String identifies which resource type.
 *        Accepted types are "pool", "cuda", and "managed" only.
 * @return Memory resource instance
 */
@brief Creates a memory resource for the unit test environment
given the name of the allocation mode.

The returned resource instance must be kept alive for the duration of
the tests. Attaching the resource to a TestEnvironment causes
issues since the environment objects are not destroyed until
after the runtime is shutdown.

@throw cudf::logic_error if the `allocation_mode` is unsupported.

@param allocation_mode String identifies which resource type.
@brief Creates a memory resource for the unit test environment given the name of the allocation mode . The returned resource instance must be kept alive for the duration of the tests . Attaching the resource to a TestEnvironment causes issues since the environment objects are not destroyed until after the runtime is shutdown . @throw cudf :: logic_error if the ` allocation_mode ` is unsupported . @param allocation_mode String identifies which resource type .
inline std::unique_ptr<rmm::mr::device_memory_resource> create_memory_resource(std::string const& allocation_mode)
{
    if( allocation_mode == "cuda" )
        return std::make_unique<rmm::mr::cuda_memory_resource>();
    if( allocation_mode == "pool" )
        return std::make_unique<rmm::mr::cnmem_memory_resource>();
    if( allocation_mode == "managed" )
        return std::make_unique<rmm::mr::managed_memory_resource>();
    CUDF_FAIL("Invalid RMM allocation mode: " + allocation_mode);
}
inline std :: unique_ptr < rmm :: mr :: device_memory_resource > create_memory_resource ( std :: string const & allocation_mode ) { if ( allocation_mode == " " ) return std :: make_unique < rmm :: mr :: cuda_memory_resource > ( ) ; if ( allocation_mode == " " ) return std :: make_unique < rmm :: mr :: cnmem_memory_resource > ( ) ; if ( allocation_mode == " " ) return std :: make_unique < rmm :: mr :: managed_memory_resource > ( ) ; CUDF_FAIL ( " " + allocation_mode ) ; }
@brief Creates a memory resource for the unit test environment
 given the name of the allocation mode.
@brief Creates a memory resource for the unit test environment given the name of the allocation mode .