Interface to BLAS routines. More...
Functions | |
template<typename ArrayType > | |
int | cusp::blas::amax (const ArrayType &x) |
index of the largest element in a array More... | |
template<typename ArrayType > | |
cusp::norm_type< typename ArrayType::value_type >::type | cusp::blas::asum (const ArrayType &x) |
sum of absolute value of all entries in array More... | |
template<typename ArrayType1 , typename ArrayType2 , typename ScalarType > | |
void | cusp::blas::axpy (const ArrayType1 &x, ArrayType2 &y, const ScalarType alpha) |
scaled vector addition (y = alpha * x + y) More... | |
template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 , typename ScalarType1 , typename ScalarType2 > | |
void | cusp::blas::axpby (const ArrayType1 &x, const ArrayType2 &y, ArrayType3 &z, ScalarType1 alpha, ScalarType2 beta) |
compute linear combination of two vectors (z = alpha * x + beta * y) More... | |
template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 , typename ArrayType4 , typename ScalarType1 , typename ScalarType2 , typename ScalarType3 > | |
void | cusp::blas::axpbypcz (const ArrayType1 &x, const ArrayType2 &y, const ArrayType3 &z, ArrayType4 &w, ScalarType1 alpha, ScalarType2 beta, ScalarType3 gamma) |
compute linear combination of three vectors (output = alpha * x + beta * y + gamma * z) More... | |
template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 > | |
void | cusp::blas::xmy (const ArrayType1 &x, const ArrayType2 &y, ArrayType3 &z) |
elementwise multiplication of two vectors (z[i] = x[i] * y[i]) More... | |
template<typename ArrayType1 , typename ArrayType2 > | |
void | cusp::blas::copy (const ArrayType1 &x, ArrayType2 &y) |
vector copy (y = x) More... | |
template<typename ArrayType1 , typename ArrayType2 > | |
ArrayType1::value_type | cusp::blas::dot (const ArrayType1 &x, const ArrayType2 &y) |
dot product (x^T * y) More... | |
template<typename ArrayType1 , typename ArrayType2 > | |
ArrayType1::value_type | cusp::blas::dotc (const ArrayType1 &x, const ArrayType2 &y) |
conjugate dot product (conjugate(x)^T * y) More... | |
template<typename ArrayType , typename ScalarType > | |
void | cusp::blas::fill (ArrayType &x, const ScalarType alpha) |
vector fill (x[i] = alpha) More... | |
template<typename ArrayType > | |
cusp::norm_type< typename ArrayType::value_type >::type | cusp::blas::nrm1 (const ArrayType &x) |
vector 1-norm (sum abs(x[i])) More... | |
template<typename ArrayType > | |
cusp::norm_type< typename ArrayType::value_type >::type | cusp::blas::nrm2 (const ArrayType &x) |
vector 2-norm (sqrt(sum x[i] * x[i] ) More... | |
template<typename ArrayType > | |
cusp::norm_type< typename ArrayType::value_type >::type | cusp::blas::nrmmax (const ArrayType &x) |
vector infinity norm More... | |
template<typename ArrayType , typename ScalarType > | |
void | cusp::blas::scal (ArrayType &x, const ScalarType alpha) |
scale vector (x[i] = alpha * x[i]) More... | |
template<typename Array2d1 , typename Array1d1 , typename Array1d2 > | |
void | cusp::blas::gemv (const Array2d1 &A, const Array1d1 &x, Array1d2 &y) |
Computes a matrix-vector product using a general matrix. More... | |
template<typename Array1d1 , typename Array1d2 , typename Array2d1 > | |
void | cusp::blas::ger (const Array1d1 &x, const Array1d2 &y, Array2d1 &A) |
Performs a rank-1 update of a general matrix. More... | |
template<typename Array2d1 , typename Array1d1 , typename Array1d2 > | |
void | cusp::blas::symv (const Array2d1 &A, const Array1d1 &x, Array1d2 &y) |
Computes a matrix-vector product using a symmetric matrix. More... | |
template<typename Array1d , typename Array2d > | |
void | cusp::blas::syr (const Array1d &x, Array2d &A) |
Performs a rank-1 update of a symmetric matrix. More... | |
template<typename Array2d , typename Array1d > | |
void | cusp::blas::trmv (const Array2d &A, Array1d &x) |
Computes a matrix-vector product using a triangular matrix. More... | |
template<typename Array2d , typename Array1d > | |
void | cusp::blas::trsv (const Array2d &A, Array1d &x) |
Solve a triangular matrix equation. More... | |
template<typename Array2d1 , typename Array2d2 , typename Array2d3 > | |
void | cusp::blas::gemm (const Array2d1 &A, const Array2d2 &B, Array2d3 &C) |
Computes a matrix-matrix product with general matrices. More... | |
template<typename Array2d1 , typename Array2d2 , typename Array2d3 > | |
void | cusp::blas::symm (const Array2d1 &A, const Array2d2 &B, Array2d3 &C) |
Computes a matrix-matrix product where one input matrix is symmetric. More... | |
template<typename Array2d1 , typename Array2d2 > | |
void | cusp::blas::syrk (const Array2d1 &A, Array2d2 &B) |
Performs a symmetric rank-k update. More... | |
template<typename Array2d1 , typename Array2d2 , typename Array2d3 > | |
void | cusp::blas::syr2k (const Array2d1 &A, const Array2d2 &B, Array2d3 &C) |
Performs a symmetric rank-2k update. More... | |
template<typename Array2d1 , typename Array2d2 > | |
void | cusp::blas::trmm (const Array2d1 &A, Array2d2 &B) |
Computes a matrix-matrix product where one input matrix is triangular. More... | |
template<typename Array2d1 , typename Array2d2 > | |
void | cusp::blas::trsm (const Array2d1 &A, Array2d2 &B) |
Solve a triangular matrix equation. More... | |
int cusp::blas::amax | ( | const ArrayType & | x | ) |
index of the largest element in a array
ArrayType | Type of the input array |
x | The input array to find max value |
cusp::norm_type<typename ArrayType::value_type>::type cusp::blas::asum | ( | const ArrayType & | x | ) |
sum of absolute value of all entries in array
ArrayType | Type of the input array |
x | The input array to compute sum of absolute values |
void cusp::blas::axpby | ( | const ArrayType1 & | x, |
const ArrayType2 & | y, | ||
ArrayType3 & | z, | ||
ScalarType1 | alpha, | ||
ScalarType2 | beta | ||
) |
compute linear combination of two vectors (z = alpha * x + beta * y)
ArrayType1 | Type of the first input array |
ArrayType2 | Type of the second input array |
ArrayType3 | Type of the third input array |
ScalarType1 | Type of the first scale factor |
ScalarType2 | Type of the second scale factor |
x | The first input array |
y | The second input array |
z | The output array to store the result |
alpha | The scale factor applied to array x |
beta | The scale factor applied to array y |
void cusp::blas::axpbypcz | ( | const ArrayType1 & | x, |
const ArrayType2 & | y, | ||
const ArrayType3 & | z, | ||
ArrayType4 & | w, | ||
ScalarType1 | alpha, | ||
ScalarType2 | beta, | ||
ScalarType3 | gamma | ||
) |
compute linear combination of three vectors (output = alpha * x + beta * y + gamma * z)
ArrayType1 | Type of the first input array |
ArrayType2 | Type of the second input array |
ArrayType3 | Type of the third input array |
ArrayType4 | Type of the input/output array |
ScalarType1 | Type of the first scale factor |
ScalarType2 | Type of the second scale factor |
ScalarType3 | Type of the third scale factor |
x | The first input array |
y | The second input array |
z | The third input array |
w | The output array to store the result |
alpha | The scale factor applied to array x |
beta | The scale factor applied to array y |
gamma | The scale factor applied to array z |
void cusp::blas::axpy | ( | const ArrayType1 & | x, |
ArrayType2 & | y, | ||
const ScalarType | alpha | ||
) |
scaled vector addition (y = alpha * x + y)
ArrayType1 | Type of the first input array |
ArrayType2 | Type of the second input array |
ScalarType | Type of the scale factor |
x | The input array |
y | The output array to store the result |
alpha | The scale factor applied to array x |
void cusp::blas::copy | ( | const ArrayType1 & | x, |
ArrayType2 & | y | ||
) |
vector copy (y = x)
ArrayType1 | Type of the input array |
ArrayType2 | Type of the output array |
x | The input array |
y | The output array |
ArrayType1::value_type cusp::blas::dot | ( | const ArrayType1 & | x, |
const ArrayType2 & | y | ||
) |
dot product (x^T * y)
ArrayType1 | Type of the first input array |
ArrayType2 | Type of the second input array |
x | The first input array |
y | The second input array |
ArrayType1::value_type cusp::blas::dotc | ( | const ArrayType1 & | x, |
const ArrayType2 & | y | ||
) |
conjugate dot product (conjugate(x)^T * y)
ArrayType1 | Type of the first input array |
ArrayType2 | Type of the second input array |
x | The first input array |
y | The second input array |
void cusp::blas::fill | ( | ArrayType & | x, |
const ScalarType | alpha | ||
) |
vector fill (x[i] = alpha)
ArrayType | Type of the input array |
ScalarType | Type of the fill value |
x | The input array to fill |
alpha | Value to fill array x |
void cusp::blas::gemm | ( | const Array2d1 & | A, |
const Array2d2 & | B, | ||
Array2d3 & | C | ||
) |
Computes a matrix-matrix product with general matrices.
Array2d1 | Type of the first input matrix |
Array2d2 | Type of the second input matrix |
Array2d3 | Type of the output matrix |
A | First input matrix |
B | Second input matrix |
C | Output matrix |
void cusp::blas::gemv | ( | const Array2d1 & | A, |
const Array1d1 & | x, | ||
Array1d2 & | y | ||
) |
Computes a matrix-vector product using a general matrix.
Array2d1 | Type of the input matrix |
Array1d1 | Type of the input vector |
Array1d2 | Type of the output vector |
A | General matrix |
x | Input vector |
x | Output vector |
void cusp::blas::ger | ( | const Array1d1 & | x, |
const Array1d2 & | y, | ||
Array2d1 & | A | ||
) |
Performs a rank-1 update of a general matrix.
Array1d1 | Type of the first input array |
Array1d2 | Type of the second input array |
Array2d1 | Type of the output matrix |
x | First n-element array |
y | Second n-element array |
A | An n-by-n general matrix |
cusp::norm_type<typename ArrayType::value_type>::type cusp::blas::nrm1 | ( | const ArrayType & | x | ) |
vector 1-norm (sum abs(x[i]))
ArrayType | Type of the input array |
x | The input array to find 2-norm |
cusp::norm_type<typename ArrayType::value_type>::type cusp::blas::nrm2 | ( | const ArrayType & | x | ) |
vector 2-norm (sqrt(sum x[i] * x[i] )
ArrayType | Type of the input array |
x | The input array to find 2-norm |
cusp::norm_type<typename ArrayType::value_type>::type cusp::blas::nrmmax | ( | const ArrayType & | x | ) |
vector infinity norm
ArrayType | Type of the input array |
x | The input array to find infinity norm |
void cusp::blas::scal | ( | ArrayType & | x, |
const ScalarType | alpha | ||
) |
scale vector (x[i] = alpha * x[i])
ArrayType | Type of the input array |
ScalarType | Type of the scalar value |
x | The input array to scale |
alpha | The scale factor |
void cusp::blas::symm | ( | const Array2d1 & | A, |
const Array2d2 & | B, | ||
Array2d3 & | C | ||
) |
Computes a matrix-matrix product where one input matrix is symmetric.
Array2d1 | Type of the first symmetric input matrix |
Array2d2 | Type of the second input matrix |
Array2d3 | Type of the output matrix |
A | First symmetric input matrix |
B | Second input matrix |
C | Output matrix |
void cusp::blas::symv | ( | const Array2d1 & | A, |
const Array1d1 & | x, | ||
Array1d2 & | y | ||
) |
Computes a matrix-vector product using a symmetric matrix.
Array2d1 | Type of the input matrix |
Array1d1 | Type of the input vector |
Array1d2 | Type of the output vector |
A | Symmetric matrix |
x | Input vector |
x | Output vector |
void cusp::blas::syr | ( | const Array1d & | x, |
Array2d & | A | ||
) |
Performs a rank-1 update of a symmetric matrix.
Array1d | Type of the input array |
Array2d | Type of the output matrix |
x | An n-element array |
A | An n-by-n symmetric matrix |
void cusp::blas::syr2k | ( | const Array2d1 & | A, |
const Array2d2 & | B, | ||
Array2d3 & | C | ||
) |
Performs a symmetric rank-2k update.
Array2d1 | Type of the first input matrix |
Array2d2 | Type of the second input matrix |
Array2d3 | Type of the output matrix |
A | First input matrix |
B | Second input matrix |
C | Output matrix |
void cusp::blas::syrk | ( | const Array2d1 & | A, |
Array2d2 & | B | ||
) |
Performs a symmetric rank-k update.
Array2d1 | Type of the first input matrix |
Array2d2 | Type of the second input matrix |
Array2d3 | Type of the output matrix |
A | First input matrix |
B | Second input matrix |
C | Output matrix |
void cusp::blas::trmm | ( | const Array2d1 & | A, |
Array2d2 & | B | ||
) |
Computes a matrix-matrix product where one input matrix is triangular.
Array2d1 | Type of the first triangular input matrix |
Array2d2 | Type of the second input matrix |
Array2d3 | Type of the output matrix |
A | First triangular input matrix |
B | Second input matrix |
C | Output matrix |
void cusp::blas::trmv | ( | const Array2d & | A, |
Array1d & | x | ||
) |
Computes a matrix-vector product using a triangular matrix.
Array2d1 | Type of the input matrix |
Array1d1 | Type of the input vector |
Array1d2 | Type of the output vector |
A | Triangular matrix |
x | Input vector |
x | Output vector |
void cusp::blas::trsm | ( | const Array2d1 & | A, |
Array2d2 & | B | ||
) |
Solve a triangular matrix equation.
Array2d1 | Type of the first input matrix |
Array2d2 | Type of the output matrix |
A | Contains the upper or lower triangle of a symmetric matrix |
B | Contains block of right-hand side vectors |
void cusp::blas::trsv | ( | const Array2d & | A, |
Array1d & | x | ||
) |
Solve a triangular matrix equation.
Array2d | Type of the symmetric input matrix |
Array1d | Type of the input right-hand side |
A | Upper or lower triangle of a symmetric matrix |
x | Right-hand side vector |
void cusp::blas::xmy | ( | const ArrayType1 & | x, |
const ArrayType2 & | y, | ||
ArrayType3 & | z | ||
) |
elementwise multiplication of two vectors (z[i] = x[i] * y[i])
ArrayType1 | Type of the first input array |
ArrayType2 | Type of the second input array |
ArrayType3 | Type of the output array |
x | The first input array |
y | The second input array |
z | The output array |