refactor(linux/cuda): take the CUDA function table callback as std::function

This commit is contained in:
Niewiarowski committed 2026-11-05 14:06:44 -05:00
1 parent 5bb027798c
commit a04da1da55
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -660,7 +660,7 @@ namespace cuda {
*/
vulkan_shared_memory_t(const vulkan_calls_t &vulkan_calls, cuda_functions_fn cuda_functions):
vk {vulkan_calls},
cu_functions {cuda_functions} {
cu_functions {std::move(cuda_functions)} {
}
bool supported() override {
@@ -995,7 +995,7 @@ namespace cuda {
* @return The driver.
*/
std::unique_ptr<shared_memory_driver_t> make_vulkan_shared_memory(const vulkan_calls_t &calls, cuda_functions_fn cuda_functions) {
return std::make_unique<vulkan_shared_memory_t>(calls, cuda_functions);
return std::make_unique<vulkan_shared_memory_t>(calls, std::move(cuda_functions));
}
#endif
+1 -1
View File
@@ -255,7 +255,7 @@ namespace cuda {
/**
* @brief Function returning the CUDA function table.
*/
using cuda_functions_fn = const ::CudaFunctions *(*)();
using cuda_functions_fn = std::function<const ::CudaFunctions *()>;
/**
* @brief Create a driver that shares plane memory through Vulkan.