Discontinuous Galerkin Library
#include "dg/algorithm.h"
blas1.h File Reference
#include "backend/predicate.h"
#include "backend/tensor_traits.h"
#include "backend/tensor_traits_scalar.h"
#include "backend/tensor_traits_thrust.h"
#include "backend/tensor_traits_cusp.h"
#include "backend/tensor_traits_std.h"
#include "backend/blas1_dispatch_scalar.h"
#include "backend/blas1_dispatch_shared.h"
#include "backend/mpi_vector.h"
#include "backend/blas1_dispatch_mpi.h"
#include "backend/blas1_dispatch_vector.h"
#include "backend/blas1_dispatch_map.h"
#include "subroutines.h"

Go to the source code of this file.

Namespaces

namespace  dg
 This is the namespace for all functions and classes defined and used by the discontinuous Galerkin library.
 
namespace  dg::blas1
 BLAS Level 1 routines.
 

Functions

template<class ContainerType1 , class ContainerType2 >
get_value_type< ContainerType1 > dg::blas1::dot (const ContainerType1 &x, const ContainerType2 &y)
 \( x^T y\) Binary reproducible Euclidean dot product between two vectors More...
 
template<class ContainerType , class OutputType , class BinaryOp , class UnaryOp = IDENTITY>
OutputType dg::blas1::reduce (const ContainerType &x, OutputType zero, BinaryOp binary_op, UnaryOp unary_op=UnaryOp())
 \( f(x_0) \otimes f(x_1) \otimes \dots \otimes f(x_{N-1}) \) Custom (transform) reduction More...
 
template<class ContainerTypeIn , class ContainerTypeOut >
void dg::blas1::copy (const ContainerTypeIn &source, ContainerTypeOut &target)
 \( y=x \) More...
 
template<class ContainerType >
void dg::blas1::scal (ContainerType &x, get_value_type< ContainerType > alpha)
 \( x = \alpha x\) More...
 
template<class ContainerType >
void dg::blas1::plus (ContainerType &x, get_value_type< ContainerType > alpha)
 \( x = x + \alpha \) More...
 
template<class ContainerType , class ContainerType1 >
void dg::blas1::axpby (get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, ContainerType &y)
 \( y = \alpha x + \beta y\) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 >
void dg::blas1::axpbypgz (get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, const ContainerType2 &y, get_value_type< ContainerType > gamma, ContainerType &z)
 \( z = \alpha x + \beta y + \gamma z\) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 >
void dg::blas1::axpby (get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, const ContainerType2 &y, ContainerType &z)
 \( z = \alpha x + \beta y\) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 >
void dg::blas1::pointwiseDot (get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
 \( y = \alpha x_1 x_2 + \beta y\) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 >
void dg::blas1::pointwiseDot (const ContainerType1 &x1, const ContainerType2 &x2, ContainerType &y)
 \( y = x_1 x_2 \) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 , class ContainerType3 >
void dg::blas1::pointwiseDot (get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, const ContainerType3 &x3, get_value_type< ContainerType > beta, ContainerType &y)
 \( y = \alpha x_1 x_2 x_3 + \beta y\) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 >
void dg::blas1::pointwiseDivide (get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
 \( y = \alpha x_1/ x_2 + \beta y \) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 >
void dg::blas1::pointwiseDivide (const ContainerType1 &x1, const ContainerType2 &x2, ContainerType &y)
 \( y = x_1/ x_2\) More...
 
template<class ContainerType , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerType4 >
void dg::blas1::pointwiseDot (get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &y1, get_value_type< ContainerType > beta, const ContainerType3 &x2, const ContainerType4 &y2, get_value_type< ContainerType > gamma, ContainerType &z)
 \( z = \alpha x_1y_1 + \beta x_2y_2 + \gamma z\) More...
 
template<class ContainerType , class ContainerType1 , class UnaryOp >
void dg::blas1::transform (const ContainerType1 &x, ContainerType &y, UnaryOp op)
 \( y = op(x)\) More...
 
template<class ContainerType , class BinarySubroutine , class Functor , class ContainerType0 , class ... ContainerTypes>
void dg::blas1::evaluate (ContainerType &y, BinarySubroutine f, Functor g, const ContainerType0 &x0, const ContainerTypes &...xs)
 \( f(g(x_0,x_1,...), y)\) More...
 
template<class Subroutine , class ContainerType , class ... ContainerTypes>
void dg::blas1::subroutine (Subroutine f, ContainerType &&x, ContainerTypes &&... xs)
 \( f(x_0, x_1, ...)\); Customizable and generic blas1 function More...
 
template<class from_ContainerType , class ContainerType , class ... Params>
void dg::assign (const from_ContainerType &from, ContainerType &to, Params &&... ps)
 Generic way to assign the contents of a from_ContainerType object to a ContainerType object optionally given additional parameters. More...
 
template<class ContainerType , class from_ContainerType , class ... Params>
ContainerType dg::construct (const from_ContainerType &from, Params &&... ps)
 Generic way to construct an object of ContainerType given a from_ContainerType object and optional additional parameters. More...
 

Detailed Description

Basic linear algebra level 1 functions (functions that only involve vectors and not matrices)