Charms.Pointer (charms v0.1.2)

Intrinsic module to work with pointers.

Summary

Functions

Allocates a single element of the given elem_type, returning a pointer to it.

Allocates an array of size elements of the given elem_type, returning a pointer to it.

Gets the element pointer of elem_type for the given base pointer ptr and index n.

Loads a value of type from the given pointer ptr.

Stores a value val at the given pointer ptr.

t()

Return the pointer type

Functions

allocate(elem_type)

Allocates a single element of the given elem_type, returning a pointer to it.

allocate(elem_type, size)

Allocates an array of size elements of the given elem_type, returning a pointer to it.

element_ptr(elem_type, ptr, n)

Gets the element pointer of elem_type for the given base pointer ptr and index n.

load(type, ptr)

Loads a value of type from the given pointer ptr.

store(val, ptr)

Stores a value val at the given pointer ptr.

t()

Return the pointer type