Skip to content

float.float64 #

fn alike #

fn alike(a f64, b f64) bool

fn all_nan #

fn all_nan(x []f64) bool

all_nan returns true if x contains only nan values, and false otherwise.

fn arrays_tolerance #

fn arrays_tolerance(data1 []f64, data2 []f64, tol f64) bool

fn axpy_inc #

fn axpy_inc(alpha f64, x []f64, mut y []f64, n u32, incX u32, incY u32, ix u32, iy u32)

axpy_inc

fn axpy_inc_to #

fn axpy_inc_to(mut dst []f64, incdst u32, idst u32, alpha f64, x []f64, y []f64, n u32, incX u32, incY u32, ix u32, iy u32)

axpy_inc_to

fn axpy_unitary #

fn axpy_unitary(alpha f64, x []f64, mut y []f64)

axpy_unitary

fn axpy_unitary_to #

fn axpy_unitary_to(mut dst []f64, alpha f64, x []f64, y []f64)

axpy_unitary_to

fn close #

fn close(a f64, b f64) bool

fn dot_inc #

fn dot_inc(x []f64, y []f64, n u32, incX u32, incY u32, ix u32, iy u32) f64

dot_inc

fn dot_unitary #

fn dot_unitary(x []f64, y []f64) f64

dot_unitary

fn equal_strided #

fn equal_strided(ref []f64, x []f64, inc int) bool

equal_strided returns true if the strided vector x contains elements of the dense vector ref at indices i*inc, false otherwise.

fn gemv_n #

fn gemv_n(m u32, n u32, alpha f64, a []f64, lda u32, x []f64, incx u32, beta f64, mut y []f64, incy u32)

gemv_n computes y = alpha * A * x + beta * y where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.

fn gemv_t #

fn gemv_t(m u32, n u32, alpha f64, a []f64, lda u32, x []f64, incx u32, beta f64, mut y []f64, incy u32)

gemv_t computes y = alpha * Aᵀ * x + beta * y where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.

fn ger #

fn ger(m u32, n u32, alpha f64, x []f64, incx u32, y []f64, incy u32, mut a []f64, lda u32)

ger performs the rank-one operation A += alpha * x * yᵀ where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.

fn guard_inc_vector #

fn guard_inc_vector(vec []f64, gd_val f64, inc int, gd_len int) []f64

guard_inc_vector copies the source vector (vec) into a new incremented slice with guards. End guards will be length gd_len. Internal and end guards will be filled with sigil value gd_val.

fn guard_vector #

fn guard_vector(vec []f64, gd_val f64, gd_ln int) []f64

guard_vector copies the source vector (vec) into a new slice with guards. Guards guarded[..gd_ln] and guarded[len-gd_ln..] will be filled with sigil value gd_val.

fn is_valid_guard #

fn is_valid_guard(vec []f64, gd_val f64, gd_ln int) bool

is_valid_guard will test for violated guards, generated by guard_vector.

fn is_valid_inc_guard #

fn is_valid_inc_guard(vec []f64, gd_val f64, inc int, gd_ln int) bool

is_valid_inc_guard will test for violated guards, generated by guard_inc_vector.

fn l2_distance_unitary #

fn l2_distance_unitary(x []f64, y []f64) f64

l2_distance_unitary returns the L2-norm of x-y.

fn l2_norm_inc #

fn l2_norm_inc(x []f64, n u32, incx u32) f64

l2_norm_inc returns the L2-norm of x.

fn l2_norm_unitary #

fn l2_norm_unitary(x []f64) f64

l2_norm_unitary returns the L2-norm of x.

fn new_guarded_vector #

fn new_guarded_vector(data []f64, inc int) ([]f64, []f64, []f64)

new_guarded_vector allocates a new slice and returns it as three subslices. v is a strided vector that contains elements of data at indices i*inc and nan elsewhere. frontGuard and backGuard are filled with nan values, and their backing arrays are directly adjacent to v in memory. The three slices can be used to detect invalid memory reads and writes.

fn non_strided_write #

fn non_strided_write(x []f64, inc int) bool

non_strided_write returns false if all elements of x at non-stride indices are equal to nan, true otherwise.

fn random_slice #

fn random_slice(n int, inc int) []f64

fn same #

fn same(a f64, b f64) bool

same returns true when the inputs have the same value, allowing NaN equality.

fn scal_inc #

fn scal_inc(alpha f64, mut x []f64, n u32, incx u32)

scal_inc

fn scal_inc_to #

fn scal_inc_to(mut dst []f64, incdst u32, alpha f64, x []f64, n u32, incx u32)

scal_inc_to

fn scal_unitary #

fn scal_unitary(alpha f64, mut x []f64)

scal_unitary

fn scal_unitary_to #

fn scal_unitary_to(mut dst []f64, alpha f64, x []f64)

scal_unitary_to

fn soclose #

fn soclose(a f64, b f64, e_ f64) bool

fn tolerance #

fn tolerance(a f64, b f64, tol f64) bool

fn veryclose #

fn veryclose(a f64, b f64) bool

fn IncSet.new #

fn IncSet.new(inc ...int) []IncSet

IncSet.new will generate all (x,y) combinations of the input increment set.

fn IncToSet.new #

fn IncToSet.new(inc ...int) []IncToSet

IncToSet.new will generate all (dst,x,y) combinations of the input increment set.