Buffer

Flat mutable Int buffers for ``@llvm`` / ``@gpu`` kernels. Names are prefixed (``buf_*``) so they do not clash with linear ``Array`` ``get``/``set`` when both libraries are open. The LLVM lowerer treats these names as aliases of the buffer builtins.
Table of Contents

Types

Buffer

(type)
type Buffer

Functions

buf_get

def buf_get (xs : Buffer) (i : Int) : Int

buf_set

def buf_set (xs : Buffer) (i : Int) (v : Int) : Buffer

buf_alloc

``bytes`` is the allocation size in bytes (``n_ints * 4``).
def buf_alloc (bytes : Int) : Buffer

buf_free

def buf_free (xs : Buffer) : Unit