Skip to main content

Module memcpy2d

Module memcpy2d 

Source
Expand description

Runtime-API 2-D memory copies + pitched device allocations.

Mirrors [baracuda_driver::memcpy2d]. PitchedBuffer<T> owns a 2-D device allocation with driver-chosen row stride; free functions handle host ↔ pitched-device copies.

Structs§

PitchedBuffer
A pitched device allocation — height × width_elems grid of Ts with driver-chosen pitch_bytes ≥ width_elems * size_of::<T>().

Functions§

copy_d_to_h_2d
Synchronous pitched-device → host 2-D copy.
copy_h_to_d_2d
Synchronous host → pitched-device 2-D copy. src holds height rows of width_elems Ts starting src_host_pitch_bytes apart.
copy_h_to_d_2d_async
Async variant of copy_h_to_d_2d.
memset_2d
2-D memset: fill a pitched region with byte value.
memset_2d_async
Async 2-D memset on stream.