Algorithms for the DenseVector container.
More...
|
template<typename ExecSpace , typename Vector1 , typename Vector2 > |
Vector2::value_type | Morpheus::dot (typename Vector1::size_type n, const Vector1 &x, const Vector2 &y) |
| Computes the dot product of two vectors. More...
|
|
template<typename ExecSpace , typename Vector > |
Vector::value_type | Morpheus::reduce (const Vector &in, typename Vector::size_type size) |
| Performs a sum reduction on the contents of a vector. More...
|
|
template<typename ExecSpace , typename Vector1 , typename Vector2 , typename Vector3 > |
void | Morpheus::waxpby (const size_t n, const typename Vector1::value_type alpha, const Vector1 &x, const typename Vector2::value_type beta, const Vector2 &y, Vector3 &w) |
| Computes the update of a vector with the sum of two scaled vectors where: w = alpha*x + beta*y. More...
|
|
Algorithms for the DenseVector container.
◆ dot()
template<typename ExecSpace , typename Vector1 , typename Vector2 >
Vector2::value_type Morpheus::dot |
( |
typename Vector1::size_type |
n, |
|
|
const Vector1 & |
x, |
|
|
const Vector2 & |
y |
|
) |
| |
|
inline |
Computes the dot product of two vectors.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
Vector1 | Type of vector x |
Vector2 | Type of vector y |
- Parameters
-
n | The number of vector elements to run the operation for |
x | The first input vector |
y | The second input vector |
- Returns
- Vector2::value_type Scalar value of the result
◆ reduce()
template<typename ExecSpace , typename Vector >
Vector::value_type Morpheus::reduce |
( |
const Vector & |
in, |
|
|
typename Vector::size_type |
size |
|
) |
| |
Performs a sum reduction on the contents of a vector.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
Vector | Type of input vector |
- Parameters
-
in | The input vector |
size | The number of vector elements to run the operation for |
- Returns
- Vector::value_type Scalar value of the result
◆ waxpby()
template<typename ExecSpace , typename Vector1 , typename Vector2 , typename Vector3 >
void Morpheus::waxpby |
( |
const size_t |
n, |
|
|
const typename Vector1::value_type |
alpha, |
|
|
const Vector1 & |
x, |
|
|
const typename Vector2::value_type |
beta, |
|
|
const Vector2 & |
y, |
|
|
Vector3 & |
w |
|
) |
| |
|
inline |
Computes the update of a vector with the sum of two scaled vectors where: w = alpha*x + beta*y.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
Vector1 | Type of vector x |
Vector2 | Type of vector y |
Vector3 | Type of vector w |
- Parameters
-
n | The number of vector elements to run the operation for |
alpha | Scalar applied to x |
x | The first input vector |
beta | Scalar applied to y |
y | The second input vector |
w | The output vector |