Cuda_api.MemoryAllocate buffer for custom types with explicit element size in bytes
val free : 'a buffer -> unitval host_to_device :
src:('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t ->
dst:'c buffer ->
unitval device_to_host :
src:'a buffer ->
dst:('b, 'c, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t ->
unitval host_ptr_to_device :
src_ptr:unit Ctypes_static.ptr ->
byte_size:int ->
dst:'a buffer ->
unitTransfer from raw pointer to device buffer (for custom types)
val device_to_host_ptr :
src:'a buffer ->
dst_ptr:unit Ctypes_static.ptr ->
byte_size:int ->
unitTransfer from device buffer to raw pointer (for custom types)
val memset : 'a buffer -> int -> unitPage-locked host buffers let the driver DMA straight to/from the device without staging through an internal pageable bounce buffer, roughly doubling H2D/D2H bandwidth on PCIe-class links, and are the hard prerequisite for true async transfers (a pageable cuMemcpy*Async silently degrades to synchronous). Two shapes are exposed:
alloc_host/free_host — driver-allocated page-locked memory (cuMemAllocHost); the returned raw pointer is fed to host_ptr_to_device/device_to_host_ptr exactly like any other host pointer.register_host/unregister_host — page-lock an existing host allocation in place (cuMemHostRegister); no allocation-path change, but the caller owns page-alignment and the register/unregister cost.val alloc_host : int -> pinned_hostAllocate bytes of page-locked host memory. Must be released with free_host, never Stdlib/free.
val free_host : pinned_host -> unitPage-lock bytes at an existing host pointer (flags = 0: portable, non-mapped). Pair with unregister_host.