Numy v0.1.1 Numy.Lapack View Source

NIF wrapper around LAPACK.

Link to this section Summary

Functions

Numy.Lapack structure defines a tensor. Having tensor as NIF resource helps to bring computation to the data.

Create new tensor NIF resource.

Fill tensor with a scalar.

res = generate_plane_rotation(1,2)
Keyword.fetch(res, :r | :z | :c | :s)

Callback on module's load. Loads NIF shared library.

Get string with Elixir Numy version at the moment of NIF compilation. Use it for sanity check.

Link to this section Types

Link to this section Functions

Numy.Lapack structure defines a tensor. Having tensor as NIF resource helps to bring computation to the data.

iex> tensor = %Numy.Lapack{shape: [3,2]}
Link to this function

blas_dcopy(num, src, src_step, dst, dst_step)

View Source
blas_dcopy(number(), tensor_res(), number(), tensor_res(), number()) :: number()
Link to this function

blas_drotg(a, b)

View Source
blas_drotg(float(), float()) :: {float(), float(), float(), float()}
Link to this function

create_tensor(tensor_struct)

View Source
create_tensor(%Numy.Lapack{nif_resource: term(), shape: term()}) :: tensor_res()

Create new tensor NIF resource.

Link to this function

data(tensor, nelm \\ -1)

View Source

Fill tensor with a scalar.

Examples

iex(1)> tensor = Numy.Lapack.new_tensor([2,3])
iex(2)> Numy.Lapack.fill(tensor, 3.14)
iex(3)> Numy.Lapack.data(tensor)
[3.14, 3.14, 3.14, 3.14, 3.14, 3.14]
Link to this function

fill_tensor(tensor, fill_val)

View Source
Link to this function

generate_plane_rotation(a, b)

View Source
generate_plane_rotation(number(), number()) :: :error | Keyword.t()
res = generate_plane_rotation(1,2)
Keyword.fetch(res, :r | :z | :c | :s)
Link to this function

lapack_dgels(tensor_a, tensor_b)

View Source

Callback on module's load. Loads NIF shared library.

Link to this function

new_tensor(tensor_struct)

View Source
Link to this function

nif_numy_version()

View Source
nif_numy_version() :: String.t()

Get string with Elixir Numy version at the moment of NIF compilation. Use it for sanity check.

Examples

iex> Numy.NIF.Lapack.numy_version
'0.1.0'
Link to this function

tensor_assign(tensor, list)

View Source
Link to this function

tensor_data(tensor, nelm)

View Source