We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b89a5c9 commit cfff6cdCopy full SHA for cfff6cd
3 files changed
vortex-cuda/ffi/src/lib.rs
@@ -34,8 +34,10 @@ use vortex_ffi::vx_session_ref;
34
const VX_CUDA_OK: c_int = 0;
35
const VX_CUDA_ERR: c_int = 1;
36
37
-/// Return a session with a [`CudaSession`], creating one with [`CudaSession::try_default`] if
38
-/// missing.
+/// Return a Vortex session with a [`CudaSession`] session variable.
+///
39
+/// If `session` already has CUDA support, this returns a clone of it. Otherwise it
40
+/// returns a new session cloned from `session` with a default [`CudaSession`] attached.
41
fn session_with_cuda(session: &VortexSession) -> VortexResult<VortexSession> {
42
if session.get_opt::<CudaSession>().is_some() {
43
return Ok(session.clone());
0 commit comments