24 #include <shared_mutex>
26 #include <string_view>
28 namespace CUDF_EXPORT
cudf {
56 bool get(std::string_view key);
65 void set(std::string_view key,
bool value);
75 std::map<std::string, bool> config_values;
76 std::shared_mutex config_mtx;
109 cudaError_t prefetch_noexcept(
110 std::string_view key,
127 template <typename T>
129 rmm::device_uvector<T> const& v,
130 rmm::cuda_stream_view stream,
133 if (v.is_empty()) {
return; }
134 prefetch(key, v.data(), v.size(), stream, device_id);
144 void enable_prefetching(std::string_view key);
151 void disable_prefetching(std::string_view key);
160 void prefetch_debugging(
bool enable);
A singleton class that manages the prefetching configuration.
bool get(std::string_view key)
Get the value of a configuration key.
static prefetch_config & instance()
Get the singleton instance of the prefetching configuration.
void set(std::string_view key, bool value)
Set the value of a configuration key.
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8...
cuda_device_id get_current_cuda_device()
void prefetch(void const *ptr, std::size_t size, rmm::cuda_device_id device, rmm::cuda_stream_view stream)