Skip to content

Commit

Permalink
async-cuda-npp: fixed call that should have been on runtime (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
gerwin3 committed Aug 10, 2023
1 parent af6b964 commit 19a8d67
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/async-cuda-npp/src/stream.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::sync::Arc;

use async_cuda_core::runtime::Future;

use crate::ffi::context::Context;

/// Represents an NPP stream.
Expand Down Expand Up @@ -27,7 +29,7 @@ impl Stream {
#[inline]
pub fn null() -> Self {
Self {
context: Arc::new(Context::from_stream(async_cuda_core::Stream::null())),
context: Arc::new(Context::from_null_stream()),
}
}

Expand All @@ -36,8 +38,10 @@ impl Stream {
/// This type is a wrapper around the actual CUDA stream type: [`async_cuda_core::Stream`].
#[inline]
pub async fn new() -> std::result::Result<Self, async_cuda_core::Error> {
let stream = async_cuda_core::Stream::new().await?;
let context = Future::new(move || Context::from_stream(stream)).await;
Ok(Self {
context: Arc::new(Context::from_stream(async_cuda_core::Stream::new().await?)),
context: Arc::new(context),
})
}

Expand Down

0 comments on commit 19a8d67

Please sign in to comment.