ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::scheduler::detail Namespace Reference

Implementation details for the scheduler. More...

Functions

void execute_composite (statement const &s, statement_node const &root_node)
 Deals with x = RHS where RHS is an expression and x is either a scalar, a vector, or a matrix. More...
 
void execute_single (statement const &, statement_node const &root_node)
 Deals with x = y for a scalar/vector/matrix x, y. More...
 
void execute_impl (statement const &s, statement_node const &root_node)
 
void execute_axbx (statement const &s, statement_node const &root_node)
 Deals with x = (y) +- (z) where y and z are either data objects or expressions. More...
 
void element_op (lhs_rhs_element result, lhs_rhs_element const &x, operation_node_type op_type)
 
void element_op (lhs_rhs_element result, lhs_rhs_element const &x, lhs_rhs_element const &y, operation_node_type op_type)
 
template<typename ScalarType1 >
void ax (lhs_rhs_element &x1, lhs_rhs_element const &x2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void axbx (lhs_rhs_element &x1, lhs_rhs_element const &x2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &x3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void axbx_x (lhs_rhs_element &x1, lhs_rhs_element const &x2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &x3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 >
void am (lhs_rhs_element &mat1, lhs_rhs_element const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void ambm (lhs_rhs_element &mat1, lhs_rhs_element const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void ambm_m (lhs_rhs_element &mat1, lhs_rhs_element const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping. More...
 
void assign_trans (lhs_rhs_element const &A, lhs_rhs_element const &B)
 Scheduler unwrapper for A =/+=/-= trans(B) More...
 
bool matrix_prod_temporary_required (statement const &s, lhs_rhs_element const &elem)
 
void matrix_matrix_prod (statement const &s, lhs_rhs_element result, lhs_rhs_element const &A, lhs_rhs_element const &B, double alpha, double beta)
 
void matrix_vector_prod (statement const &s, lhs_rhs_element result, lhs_rhs_element const &A, lhs_rhs_element const &x)
 
template<typename ScalarType1 >
void as (lhs_rhs_element &s1, lhs_rhs_element const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void asbs (lhs_rhs_element &s1, lhs_rhs_element const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void asbs_s (lhs_rhs_element &s1, lhs_rhs_element const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping. More...
 
lhs_rhs_element const & extract_representative_vector (statement const &s, lhs_rhs_element const &element)
 
float convert_to_float (float f)
 
float convert_to_float (double d)
 
float convert_to_float (lhs_rhs_element const &el)
 
double convert_to_double (float d)
 
double convert_to_double (double d)
 
double convert_to_double (lhs_rhs_element const &el)
 
viennacl::context extract_context (statement_node const &root_node)
 Helper routine for extracting the context in which a statement is executed. More...
 
void new_element (lhs_rhs_element &new_elem, lhs_rhs_element const &old_element, viennacl::context const &ctx)
 
void delete_element (lhs_rhs_element &elem)
 
template<typename ScalarType1 >
void av (lhs_rhs_element &vec1, lhs_rhs_element const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void avbv (lhs_rhs_element &vec1, lhs_rhs_element const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping. More...
 
template<typename ScalarType1 , typename ScalarType2 >
void avbv_v (lhs_rhs_element &vec1, lhs_rhs_element const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping. More...
 
void norm_impl (lhs_rhs_element const &x, lhs_rhs_element const &s, operation_node_type op_type)
 Dispatcher interface for computing s = norm_1(x) More...
 
void inner_prod_impl (lhs_rhs_element const &x, lhs_rhs_element const &y, lhs_rhs_element const &s)
 Dispatcher interface for computing s = inner_prod(x, y) More...
 
std::string to_string (viennacl::scheduler::op_element op_elem)
 Helper routine for converting the operation enums to string. More...
 
std::string to_string (viennacl::scheduler::lhs_rhs_element element)
 Helper routine converting the enum and union values inside a statement node to a string. More...
 
void print_node (std::ostream &os, viennacl::scheduler::statement const &s, vcl_size_t node_index, vcl_size_t indent=0)
 Recursive worker routine for printing a whole statement. More...
 

Detailed Description

Implementation details for the scheduler.

Function Documentation

template<typename ScalarType1 >
void viennacl::scheduler::detail::am ( lhs_rhs_element mat1,
lhs_rhs_element const &  mat2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping.

Definition at line 42 of file execute_matrix_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::ambm ( lhs_rhs_element mat1,
lhs_rhs_element const &  mat2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  mat3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping.

Definition at line 73 of file execute_matrix_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::ambm_m ( lhs_rhs_element mat1,
lhs_rhs_element const &  mat2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  mat3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping.

Definition at line 114 of file execute_matrix_dispatcher.hpp.

template<typename ScalarType1 >
void viennacl::scheduler::detail::as ( lhs_rhs_element s1,
lhs_rhs_element const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping.

Definition at line 42 of file execute_scalar_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::asbs ( lhs_rhs_element s1,
lhs_rhs_element const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  s3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping.

Definition at line 68 of file execute_scalar_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::asbs_s ( lhs_rhs_element s1,
lhs_rhs_element const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  s3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping.

Definition at line 98 of file execute_scalar_dispatcher.hpp.

void viennacl::scheduler::detail::assign_trans ( lhs_rhs_element const &  A,
lhs_rhs_element const &  B 
)
inline

Scheduler unwrapper for A =/+=/-= trans(B)

Definition at line 154 of file execute_matrix_dispatcher.hpp.

template<typename ScalarType1 >
void viennacl::scheduler::detail::av ( lhs_rhs_element vec1,
lhs_rhs_element const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping.

Definition at line 42 of file execute_vector_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::avbv ( lhs_rhs_element vec1,
lhs_rhs_element const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  vec3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping.

Definition at line 68 of file execute_vector_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::avbv_v ( lhs_rhs_element vec1,
lhs_rhs_element const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  vec3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping.

Definition at line 98 of file execute_vector_dispatcher.hpp.

template<typename ScalarType1 >
void viennacl::scheduler::detail::ax ( lhs_rhs_element x1,
lhs_rhs_element const &  x2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Wrapper for viennacl::linalg::av(), taking care of the argument unwrapping.

Definition at line 44 of file execute_generic_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::axbx ( lhs_rhs_element x1,
lhs_rhs_element const &  x2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  x3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping.

Definition at line 67 of file execute_generic_dispatcher.hpp.

template<typename ScalarType1 , typename ScalarType2 >
void viennacl::scheduler::detail::axbx_x ( lhs_rhs_element x1,
lhs_rhs_element const &  x2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
lhs_rhs_element const &  x3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Wrapper for viennacl::linalg::avbv_v(), taking care of the argument unwrapping.

Definition at line 99 of file execute_generic_dispatcher.hpp.

double viennacl::scheduler::detail::convert_to_double ( float  d)
inline

Definition at line 89 of file execute_util.hpp.

double viennacl::scheduler::detail::convert_to_double ( double  d)
inline

Definition at line 90 of file execute_util.hpp.

double viennacl::scheduler::detail::convert_to_double ( lhs_rhs_element const &  el)
inline

Definition at line 91 of file execute_util.hpp.

float viennacl::scheduler::detail::convert_to_float ( float  f)
inline

Definition at line 76 of file execute_util.hpp.

float viennacl::scheduler::detail::convert_to_float ( double  d)
inline

Definition at line 77 of file execute_util.hpp.

float viennacl::scheduler::detail::convert_to_float ( lhs_rhs_element const &  el)
inline

Definition at line 78 of file execute_util.hpp.

void viennacl::scheduler::detail::delete_element ( lhs_rhs_element elem)
inline

Definition at line 266 of file execute_util.hpp.

void viennacl::scheduler::detail::element_op ( lhs_rhs_element  result,
lhs_rhs_element const &  x,
operation_node_type  op_type 
)
inline

Definition at line 39 of file execute_elementwise.hpp.

void viennacl::scheduler::detail::element_op ( lhs_rhs_element  result,
lhs_rhs_element const &  x,
lhs_rhs_element const &  y,
operation_node_type  op_type 
)
inline

Definition at line 176 of file execute_elementwise.hpp.

void viennacl::scheduler::detail::execute_axbx ( statement const &  s,
statement_node const &  root_node 
)
inline

Deals with x = (y) +- (z) where y and z are either data objects or expressions.

Definition at line 40 of file execute_axbx.hpp.

void viennacl::scheduler::detail::execute_composite ( statement const &  s,
statement_node const &  root_node 
)
inline

Deals with x = RHS where RHS is an expression and x is either a scalar, a vector, or a matrix.

Definition at line 42 of file execute.hpp.

void viennacl::scheduler::detail::execute_impl ( statement const &  s,
statement_node const &  root_node 
)
inline

Definition at line 255 of file execute.hpp.

void viennacl::scheduler::detail::execute_single ( statement const &  ,
statement_node const &  root_node 
)
inline

Deals with x = y for a scalar/vector/matrix x, y.

Definition at line 228 of file execute.hpp.

viennacl::context viennacl::scheduler::detail::extract_context ( statement_node const &  root_node)
inline

Helper routine for extracting the context in which a statement is executed.

As all statements are of the type x = EXPR, it is sufficient to extract the context from x.

Definition at line 105 of file execute_util.hpp.

lhs_rhs_element const& viennacl::scheduler::detail::extract_representative_vector ( statement const &  s,
lhs_rhs_element const &  element 
)
inline

Definition at line 41 of file execute_util.hpp.

void viennacl::scheduler::detail::inner_prod_impl ( lhs_rhs_element const &  x,
lhs_rhs_element const &  y,
lhs_rhs_element const &  s 
)
inline

Dispatcher interface for computing s = inner_prod(x, y)

Definition at line 172 of file execute_vector_dispatcher.hpp.

void viennacl::scheduler::detail::matrix_matrix_prod ( statement const &  s,
lhs_rhs_element  result,
lhs_rhs_element const &  A,
lhs_rhs_element const &  B,
double  alpha,
double  beta 
)
inline

Definition at line 57 of file execute_matrix_prod.hpp.

bool viennacl::scheduler::detail::matrix_prod_temporary_required ( statement const &  s,
lhs_rhs_element const &  elem 
)
inline

Definition at line 44 of file execute_matrix_prod.hpp.

void viennacl::scheduler::detail::matrix_vector_prod ( statement const &  s,
lhs_rhs_element  result,
lhs_rhs_element const &  A,
lhs_rhs_element const &  x 
)
inline

Definition at line 180 of file execute_matrix_prod.hpp.

void viennacl::scheduler::detail::new_element ( lhs_rhs_element new_elem,
lhs_rhs_element const &  old_element,
viennacl::context const &  ctx 
)
inline

Definition at line 204 of file execute_util.hpp.

void viennacl::scheduler::detail::norm_impl ( lhs_rhs_element const &  x,
lhs_rhs_element const &  s,
operation_node_type  op_type 
)
inline

Dispatcher interface for computing s = norm_1(x)

Definition at line 128 of file execute_vector_dispatcher.hpp.

void viennacl::scheduler::detail::print_node ( std::ostream &  os,
viennacl::scheduler::statement const &  s,
vcl_size_t  node_index,
vcl_size_t  indent = 0 
)
inline

Recursive worker routine for printing a whole statement.

Definition at line 231 of file io.hpp.

std::string viennacl::scheduler::detail::to_string ( viennacl::scheduler::op_element  op_elem)
inline

Helper routine for converting the operation enums to string.

Definition at line 42 of file io.hpp.

std::string viennacl::scheduler::detail::to_string ( viennacl::scheduler::lhs_rhs_element  element)
inline

Helper routine converting the enum and union values inside a statement node to a string.

Definition at line 110 of file io.hpp.