New CUDA context handling

For !84 (merged), and revise of !66 (merged)

  • Introduce ContextRef struct to handle non-owned reference to CUcontext
    • CUDA API allows us to get CUcontext from pointers to CUDA managed memory, which is needed by !84 (merged)
  • Rename Context into ContextOwned, and Arc<Context> into Context
  • Take a reference to Arc instead of moved value:
    fn create(ctx: Arc<Context>) { ... }
    new API based on Context = Arc<ContextOwned>
    fn create(ctx: &Context) { ... }
  • Introduce accel_derive::Contexted proc-macro to derive updated Contexted trait
Edited by termoshtt

Merge request reports

Loading