Skip to main content

Module zero_copy

Module zero_copy 

Source
Expand description

Zero-copy data loading utilities for efficient memory management

This module provides zero-copy tensor operations and memory management utilities for high-performance data processing pipelines. It enables efficient handling of large datasets without unnecessary memory allocations.

§Features

  • Zero-copy tensors: Work directly with existing memory without copying
  • Memory pools: Reuse allocated tensors to reduce allocation overhead
  • Buffer management: Efficient buffer reuse in data pipelines
  • Memory mapping: Direct access to file data without loading into memory
  • Thread-safe operations: Concurrent access to shared memory pools

Structs§

BufferManager
Buffer manager for efficient buffer reuse in data pipelines
MemoryMappedLoader
Memory-mapped data loader for large datasets
TensorPool
Memory pool for reusing allocated tensors to avoid allocation/deallocation overhead
ZeroCopyTensor
Zero-copy tensor wrapper that avoids unnecessary memory allocation

Functions§

create_buffer_manager
Convenience function to create a buffer manager
create_tensor_pool
Convenience function to create a tensor pool
zero_copy_from_slice
Convenience function to create a zero-copy tensor from a slice
zero_copy_from_vec
Convenience function to create a zero-copy tensor from a vector