Crates.io | async-cuda-npp |
lib.rs | async-cuda-npp |
version | 0.4.0 |
source | src |
created_at | 2023-06-12 11:43:22.101713 |
updated_at | 2023-08-10 13:27:13.630938 |
description | Async NVIDIA Performance Primitives for Rust. |
homepage | |
repository | https://github.com/oddity-ai/async-cuda |
max_upload_size | |
id | 888114 |
size | 94,487 |
async-cuda-npp
Asynchronous wrapper for the NVIDIA 2D Image And Signal Performance Primitives library.
async-cuda-npp
is an async wrapper for NVIDIA's NPP library.
It is part of the async-cuda
family of libraries.
This project is still a work-in-progress, and will contain bugs. Some parts of the API have not been flushed out yet. Use with caution.
Make sure you have the necessary dependencies installed:
Then, add the following to your dependencies in Cargo.toml
:
async-cuda-npp = "0.1"
This crate is intentionally unsafe. Due to the limitations of how async Rust currently works, usage of the async interface of this crate can cause undefined behavior in some rare cases. It is up to the user of this crate to prevent this from happening by following these rules:
std::mem::forget
or
otherwise).Internally, the Future
type in this crate schedules a CUDA call on a separate runtime thread. To
make the API as ergonomic as possible, the lifetime bounds of the closure (that is sent to the
runtime) are tied to the future object. To enforce this bound, the future will block and wait if it
is dropped. This mechanism relies on the future being driven to completion, and not forgotten. This
is not necessarily guaranteed. Unsafety may arise if either the runtime gives up on or forgets the
future, or the caller manually polls the future, then forgets it.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.