Skip to content

Commit

Permalink
Fixes #698: Added a device::default_() function for obtaining the d…
Browse files Browse the repository at this point in the history
…efault CUDA device
  • Loading branch information
eyalroz committed Nov 18, 2024
1 parent 7efdbab commit dc4b0d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cuda/api/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,11 @@ inline device_t get(id_t id)
return wrap(id);
}

inline device_t default_()
{
return get(cuda::device::default_device_id);
}

/**
* A named constructor idiom for a "dummy" CUDA device representing the CPU.
*
Expand Down

0 comments on commit dc4b0d9

Please sign in to comment.