#![warn(missing_docs)]
#![warn(clippy::all)]
#![allow(clippy::module_name_repetitions)]
pub mod aligned;
pub mod bandwidth_profiler;
pub mod buffer_view;
pub mod copy;
pub mod copy_2d3d;
pub mod device_buffer;
pub mod host_buffer;
pub mod host_registered;
pub mod managed_hints;
pub mod memory_info;
pub mod peer_copy;
#[cfg(feature = "pool")]
pub mod pool;
pub mod pool_stats;
pub mod unified;
pub mod virtual_memory;
pub mod zero_copy;
pub use bandwidth_profiler::{
BandwidthBenchmarkConfig, BandwidthMeasurement, BandwidthProfiler, BandwidthSummary,
DirectionSummary, TransferDirection, bandwidth_utilization, describe_bandwidth,
estimate_transfer_time, format_bytes, theoretical_peak_bandwidth,
};
pub use buffer_view::{BufferView, BufferViewMut};
pub use copy_2d3d::{Memcpy2DParams, Memcpy3DParams};
pub use device_buffer::{DeviceBuffer, DeviceSlice};
pub use host_buffer::PinnedBuffer;
pub use host_registered::{
RegisterFlags, RegisteredMemory, RegisteredMemoryType, RegisteredPointerInfo,
query_registered_pointer_info, register, register_slice, register_vec,
};
pub use managed_hints::{ManagedMemoryHints, MigrationPolicy, PrefetchPlan};
pub use memory_info::{MemAdvice, MemoryInfo, mem_advise, mem_prefetch, memory_info};
pub use unified::UnifiedBuffer;
pub use virtual_memory::{
AccessFlags, PhysicalAllocation, VirtualAddressRange, VirtualMemoryManager,
};
pub use zero_copy::MappedBuffer;
pub use aligned::{
AlignedBuffer, Alignment, AlignmentInfo, check_alignment, coalesce_alignment,
optimal_alignment_for_type, round_up_to_alignment, validate_alignment,
};
pub use pool_stats::{AllocationHistogram, FragmentationMetrics, PoolReport, PoolStatsTracker};
#[cfg(feature = "pool")]
pub use pool::{MemoryPool, PoolStats, PooledBuffer};
pub mod prelude {
pub use crate::aligned::{AlignedBuffer, Alignment, AlignmentInfo};
pub use crate::buffer_view::{BufferView, BufferViewMut};
pub use crate::copy::{
copy_dtod, copy_dtod_async, copy_dtoh, copy_dtoh_async_raw, copy_htod, copy_htod_async_raw,
};
pub use crate::copy_2d3d::{
Memcpy2DParams, Memcpy3DParams, copy_2d_dtod, copy_2d_dtoh, copy_2d_htod, copy_3d_dtod,
};
pub use crate::device_buffer::{DeviceBuffer, DeviceSlice};
pub use crate::host_buffer::PinnedBuffer;
pub use crate::host_registered::{
RegisterFlags, RegisteredMemory, RegisteredMemoryType, RegisteredPointerInfo,
query_registered_pointer_info, register, register_slice, register_vec,
};
pub use crate::managed_hints::{ManagedMemoryHints, MigrationPolicy, PrefetchPlan};
pub use crate::memory_info::{MemAdvice, MemoryInfo, mem_advise, mem_prefetch, memory_info};
pub use crate::unified::UnifiedBuffer;
pub use crate::virtual_memory::{AccessFlags, VirtualAddressRange, VirtualMemoryManager};
}
pub mod features {
pub const HAS_POOL: bool = cfg!(feature = "pool");
pub const HAS_GPU_TESTS: bool = cfg!(feature = "gpu-tests");
}