/// Create a new Vec where first bytes memory address has an alignment of 64 bytes, as described
/// by arrow spec.
/// Read more:
/// https://github.com/rust-ndarray/ndarray/issues/771
Create a new Vec where first bytes memory address has an alignment of 64 bytes, as described
by arrow spec.
Create a new Vec where first bytes memory address has an alignment of 64 bytes as described by arrow spec .
pub fn with_capacity_aligned(size: usize) -> Self {
        // Can only have a zero copy to arrow memory if address of first byte % 64 == 0
        let t_size = std::mem::size_of::<T>();
        let capacity = size * t_size;
        let ptr = memory::allocate_aligned(capacity) as *mut T;
        let v = unsafe { Vec::from_raw_parts(ptr, 0, capacity) };
        AlignedVec {
            inner: v,
            capacity,
            taken: false,
        }
    }
pub fn with_capacity_aligned ( size : usize ) -> Self { // Can only have a zero copy to arrow memory if address of first byte % 64 == 0 let t_size = std :: mem :: size_of :: < T > ( ) ; let capacity = size * t_size ; let ptr = memory :: allocate_aligned ( capacity ) as * mut T ; let v = unsafe { Vec :: from_raw_parts ( ptr , 0 , capacity ) } ; AlignedVec { inner : v , capacity , taken : false , } }
Create a new Vec where first bytes memory address has an alignment of 64 bytes, as described
by arrow spec.
Create a new Vec where first bytes memory address has an alignment of 64 bytes as described by arrow spec .
size
usize