Skip to content

Commit cfff6cd

Browse files
committed
cleanup
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
1 parent b89a5c9 commit cfff6cd

3 files changed

Lines changed: 161 additions & 78 deletions

File tree

vortex-cuda/ffi/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ use vortex_ffi::vx_session_ref;
3434
const VX_CUDA_OK: c_int = 0;
3535
const VX_CUDA_ERR: c_int = 1;
3636

37-
/// Return a session with a [`CudaSession`], creating one with [`CudaSession::try_default`] if
38-
/// missing.
37+
/// Return a Vortex session with a [`CudaSession`] session variable.
38+
///
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.
3941
fn session_with_cuda(session: &VortexSession) -> VortexResult<VortexSession> {
4042
if session.get_opt::<CudaSession>().is_some() {
4143
return Ok(session.clone());

0 commit comments

Comments
 (0)