All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::detail Namespace Reference

Holds implementation details for functionality in the main viennacl-namespace. Not intended for direct use by library users. More...

## Namespaces

| fft
| Helper namespace for fast Fourier transforms. Not to be used directly by library users.

## Functions

template<typename CPUMatrixT , typename NumericT >
void | copy_impl (const CPUMatrixT &cpu_matrix, compressed_compressed_matrix< NumericT > &gpu_matrix, vcl_size_t nonzero_rows, vcl_size_t nonzeros)
template<typename CPUMatrixT , typename NumericT , unsigned int AlignmentV>
void | copy_impl (const CPUMatrixT &cpu_matrix, compressed_matrix< NumericT, AlignmentV > &gpu_matrix, vcl_size_t nonzeros)
| Implementation of the copy of a host-based sparse matrix to the device. More...
template<typename NumericT , typename MatrixT >
NumericT const & | matrix_access (MatrixT const &A, vcl_size_t i, vcl_size_t j)
template<typename NumericT >
NumericT const & | matrix_access (std::vector< std::vector< NumericT > > const &A, vcl_size_t i, vcl_size_t j)
template<typename NumericT , typename MatrixT >
NumericT & | matrix_access (MatrixT &A, vcl_size_t i, vcl_size_t j)
template<typename NumericT >
NumericT & | matrix_access (std::vector< std::vector< NumericT > > &A, vcl_size_t i, vcl_size_t j)
template<typename IndexT , typename ValueT >
IndexT | calc_reordered_bw (std::vector< std::map< IndexT, ValueT > > const &matrix, std::vector< bool > &dof_assigned_to_node, std::vector< IndexT > const &permutation)
template<typename IndexT >
bool | comb_inc (std::vector< IndexT > &comb, vcl_size_t n)
template<typename MatrixT , typename IndexT >
void | generate_layering (MatrixT const &matrix, std::vector< std::vector< IndexT > > &layer_list)
| Function to generate a node layering as a tree structure. More...
template<typename MatrixType >
void | generate_layering (MatrixType const &matrix, std::vector< std::vector< int > > &l, int s)
template<typename MatrixT , typename IndexT >
void | nodes_of_strongly_connected_component (MatrixT const &matrix, std::vector< IndexT > &node_list)
| Fills the provided nodelist with all nodes of the same strongly connected component as the nodes in the node_list. More...
bool | cuthill_mckee_comp_func (std::vector< int > const &a, std::vector< int > const &b)
template<typename IndexT >
bool | cuthill_mckee_comp_func_pair (std::pair< IndexT, IndexT > const &a, std::pair< IndexT, IndexT > const &b)
template<typename IndexT , typename ValueT >
vcl_size_t | cuthill_mckee_on_strongly_connected_component (std::vector< std::map< IndexT, ValueT > > const &matrix, std::deque< IndexT > &node_assignment_queue, std::vector< bool > &dof_assigned_to_node, std::vector< IndexT > &permutation, vcl_size_t current_dof)
| Runs the Cuthill-McKee algorithm on a strongly connected component of a graph. More...
int | calc_layering_width (std::vector< std::vector< int > > const &l)
template<typename MatrixType >
std::vector< std::vector< int > > | gps_rg_components (MatrixType const &matrix, int n, std::vector< int > const &rg)

## Detailed Description

Holds implementation details for functionality in the main viennacl-namespace. Not intended for direct use by library users.

## Function Documentation

int viennacl::detail::calc_layering_width | ( | std::vector< std::vector< int > > const & | l | ) |

inline

Definition at line 47 of file gibbs_poole_stockmeyer.hpp.

template<typename IndexT , typename ValueT >

IndexT viennacl::detail::calc_reordered_bw | ( | std::vector< std::map< IndexT, ValueT > > const & | matrix,
|  | std::vector< bool > & | dof_assigned_to_node,
|  | std::vector< IndexT > const & | permutation
| ) |  |

Examples:
  bandwidth-reduction.cpp.

Definition at line 47 of file cuthill_mckee.hpp.

template<typename IndexT >

bool viennacl::detail::comb_inc | ( | std::vector< IndexT > & | comb,
|  | vcl_size_t | n
| ) |  |

Definition at line 89 of file cuthill_mckee.hpp.

template<typename CPUMatrixT , typename NumericT >

void viennacl::detail::copy_impl | ( | const CPUMatrixT & | cpu_matrix,
|  | compressed_compressed_matrix< NumericT > & | gpu_matrix,
|  | vcl_size_t | nonzero_rows,
|  | vcl_size_t | nonzeros
| ) |  |

Definition at line 41 of file compressed_compressed_matrix.hpp.

template<typename CPUMatrixT , typename NumericT , unsigned int AlignmentV>

void viennacl::detail::copy_impl | ( | const CPUMatrixT & | cpu_matrix,
|  | compressed_matrix< NumericT, AlignmentV > & | gpu_matrix,
|  | vcl_size_t | nonzeros
| ) |  |

Implementation of the copy of a host-based sparse matrix to the device.

See convenience copy() routines for type requirements of CPUMatrixT

Definition at line 50 of file compressed_matrix.hpp.

bool viennacl::detail::cuthill_mckee_comp_func | ( | std::vector< int > const & | a,
|  | std::vector< int > const & | b
| ) |  |

inline

Definition at line 263 of file cuthill_mckee.hpp.

template<typename IndexT >

bool viennacl::detail::cuthill_mckee_comp_func_pair | ( | std::pair< IndexT, IndexT > const & | a,
|  | std::pair< IndexT, IndexT > const & | b
| ) |  |

Definition at line 270 of file cuthill_mckee.hpp.

template<typename IndexT , typename ValueT >

vcl_size_t viennacl::detail::cuthill_mckee_on_strongly_connected_component | ( | std::vector< std::map< IndexT, ValueT > > const & | matrix,
|  | std::deque< IndexT > & | node_assignment_queue,
|  | std::vector< bool > & | dof_assigned_to_node,
|  | std::vector< IndexT > & | permutation,
|  | vcl_size_t | current_dof
| ) |  |

Runs the Cuthill-McKee algorithm on a strongly connected component of a graph.

Parameters

  matrix | The matrix describing the full graph
  node_assignment_queue | A queue prepopulated with the root nodes
  dof_assigned_to_node | Boolean flag array indicating whether a dof got assigned to a certain node
  permutation | The permutation array to write the result to
  current_dof | The first dof to be used for assignment

Returns
  The next free dof available

Definition at line 287 of file cuthill_mckee.hpp.

template<typename MatrixT , typename IndexT >

void viennacl::detail::generate_layering | ( | MatrixT const & | matrix,
|  | std::vector< std::vector< IndexT > > & | layer_list
| ) |  |

Function to generate a node layering as a tree structure.

Definition at line 122 of file cuthill_mckee.hpp.

template<typename MatrixType >

void viennacl::detail::generate_layering | ( | MatrixType const & | matrix,
|  | std::vector< std::vector< int > > & | l,
|  | int | s
| ) |  |

Definition at line 170 of file cuthill_mckee.hpp.

template<typename MatrixType >

std::vector< std::vector<int> > viennacl::detail::gps_rg_components | ( | MatrixType const & | matrix,
|  | int | n,
|  | std::vector< int > const & | rg
| ) |  |

Definition at line 63 of file gibbs_poole_stockmeyer.hpp.

template<typename NumericT , typename MatrixT >

NumericT const& viennacl::detail::matrix_access | ( | MatrixT const & | A,
|  | vcl_size_t | i,
|  | vcl_size_t | j
| ) |  |

Definition at line 39 of file matrix_proxy.hpp.

template<typename NumericT >

NumericT const& viennacl::detail::matrix_access | ( | std::vector< std::vector< NumericT > > const & | A,
|  | vcl_size_t | i,
|  | vcl_size_t | j
| ) |  |

Definition at line 45 of file matrix_proxy.hpp.

template<typename NumericT , typename MatrixT >

NumericT& viennacl::detail::matrix_access | ( | MatrixT & | A,
|  | vcl_size_t | i,
|  | vcl_size_t | j
| ) |  |

Definition at line 53 of file matrix_proxy.hpp.

template<typename NumericT >

NumericT& viennacl::detail::matrix_access | ( | std::vector< std::vector< NumericT > > & | A,
|  | vcl_size_t | i,
|  | vcl_size_t | j
| ) |  |

Definition at line 59 of file matrix_proxy.hpp.

template<typename MatrixT , typename IndexT >

void viennacl::detail::nodes_of_strongly_connected_component | ( | MatrixT const & | matrix,
|  | std::vector< IndexT > & | node_list
| ) |  |

Fills the provided nodelist with all nodes of the same strongly connected component as the nodes in the node_list.

If more than one node is provided, all nodes should be from the same strongly connected component.

Definition at line 215 of file cuthill_mckee.hpp.