Module Device.Buffer_spec

Buffer allocation options.

A t describes allocation constraints for a device buffer: memory location, caching policy, and optional external backing.

type t = {
  1. uncached : bool;
    (*

    true to request uncached memory.

    *)
  2. cpu_access : bool;
    (*

    true to request CPU-accessible device memory.

    *)
  3. host : bool;
    (*

    true to allocate in host memory.

    *)
  4. nolru : bool;
    (*

    true to bypass the LRU allocator cache on free.

    *)
  5. external_ptr : nativeint option;
    (*

    External backing pointer, or None to let the allocator choose. Buffers with an external pointer bypass LRU caching on free.

    *)
}

Buffer allocation options.

val default : t

default is {uncached = false; cpu_access = false; host = false; nolru = false; external_ptr = None}.