Numy v0.1.3 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.
Deep copy of all elements regardless of shape and data type.
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.
Compare elements of 2 vectors for equality
If all data is viewed as a vector, get element in certain position.
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]}
blas_dcopy(num, src, src_step, dst, dst_step)
View Sourceblas_dcopy(number(), tensor_res(), number(), tensor_res(), number()) :: number()
create_tensor(tensor_struct)
View Sourcecreate_tensor(%Numy.Lapack{nif_resource: term(), shape: term()}) :: tensor_res()
Create new tensor NIF resource.
Deep copy of all elements regardless of shape and data type.
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'
Compare elements of 2 vectors for equality
If all data is viewed as a vector, get element in certain position.