View Source EXLA.DeviceBuffer (EXLA v0.9.2)

An EXLA DeviceBuffer for data allocated in the device.

Summary

Functions

Copies buffer to device with given device ID.

Deallocates the underlying buffer.

Places the given binary data on the given device using client.

Reads size from the underlying buffer ref.

Functions

Link to this function

copy_to_device(device_buffer, client, device_id)

View Source

Copies buffer to device with given device ID.

Link to this function

deallocate(device_buffer)

View Source

Deallocates the underlying buffer.

Returns :ok | :already_deallocated.

Link to this function

place_on_device(data, typespec, client, device_id)

View Source

Places the given binary data on the given device using client.

Link to this function

read(device_buffer, size \\ -1)

View Source

Reads size from the underlying buffer ref.

This copies the underlying device memory into a binary without destroying it. If size is negative, then it reads the whole buffer.