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 Sourceblas_dcopy(number(), tensor_res(), number(), tensor_res(), number()) :: number()
Link to this function
create_tensor(tensor_struct)
View Sourcecreate_tensor(%Numy.Lapack{nif_resource: term(), shape: term()}) :: tensor_res()
Create new tensor NIF resource.
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]
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.
Examples
iex> Numy.NIF.Lapack.numy_version
'0.1.0'