Charms.Pointer (charms v0.1.4)

Intrinsic module to work with pointers.

Charms.Pointer should be the "smart pointer" not just comes with lifetime management, but also SIMD and Tensor support.

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.

copy(source, destination, bytes_count)

element_ptr(ptr, n)

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

element_ptr(elem_type, ptr, n)

element_type(ptr)

load(ptr)

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

t(elem_t)