From da22f2fa5b73bdfc68ef7480a4d4fc820df807fb Mon Sep 17 00:00:00 2001 From: Paul Taylor <178183+trxcllnt@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:16:35 -0800 Subject: [PATCH] Pass `std::optional` instead of `thrust::optional` to RMM (#2199) Update `thrust::optional` to `std::optional` to align with https://github.com/rapidsai/rmm/pull/1464. Authors: - Paul Taylor (https://github.com/trxcllnt) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Mark Harris (https://github.com/harrism) URL: https://github.com/rapidsai/raft/pull/2199 --- cpp/include/raft/core/device_resources_manager.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/include/raft/core/device_resources_manager.hpp b/cpp/include/raft/core/device_resources_manager.hpp index 1f96a6f204..75c9428ff7 100644 --- a/cpp/include/raft/core/device_resources_manager.hpp +++ b/cpp/include/raft/core/device_resources_manager.hpp @@ -25,7 +25,7 @@ #include #include #include -#include + namespace raft { /** @@ -116,11 +116,11 @@ struct device_resources_manager { // this initial size for the pool in bytes. Must be a multiple of 256. // If nullopt, use half of the available memory on the current // device. - thrust::optional init_mem_pool_size{thrust::nullopt}; + std::optional init_mem_pool_size{std::nullopt}; // If set to any non-zero value, create a memory pool with this // maximum size. If nullopt, use up to the entire available memory of the // device - thrust::optional max_mem_pool_size{std::size_t{}}; + std::optional max_mem_pool_size{std::size_t{}}; // Limit on workspace memory for the returned device_resources object std::optional workspace_allocation_limit{std::nullopt}; // Optional specification of separate workspace memory resources for each @@ -360,7 +360,7 @@ struct device_resources_manager { if (memory_limit) { params_.max_mem_pool_size.emplace(*memory_limit); } else { - params_.max_mem_pool_size = thrust::nullopt; + params_.max_mem_pool_size = std::nullopt; } } } @@ -377,7 +377,7 @@ struct device_resources_manager { if (init_memory) { params_.init_mem_pool_size.emplace(*init_memory); } else { - params_.init_mem_pool_size = thrust::nullopt; + params_.init_mem_pool_size = std::nullopt; } } }