1 #ifndef VIENNACL_LINALG_HOST_BASED_MISC_OPERATIONS_HPP_
2 #define VIENNACL_LINALG_HOST_BASED_MISC_OPERATIONS_HPP_
41 template<
typename NumericT>
50 NumericT * vec_buf = viennacl::linalg::host_based::detail::extract_raw_pointer<NumericT>(vec.
handle());
52 unsigned int const * elim_row_index = viennacl::linalg::host_based::detail::extract_raw_pointer<unsigned int>(row_index_array);
53 unsigned int const * elim_row_buffer = viennacl::linalg::host_based::detail::extract_raw_pointer<unsigned int>(row_buffer);
54 unsigned int const * elim_col_buffer = viennacl::linalg::host_based::detail::extract_raw_pointer<unsigned int>(col_buffer);
55 NumericT const * elim_elements = viennacl::linalg::host_based::detail::extract_raw_pointer<NumericT>(element_buffer);
57 #ifdef VIENNACL_WITH_OPENMP
58 #pragma omp parallel for
60 for (
long row=0; row < static_cast<long>(num_rows); ++
row)
62 unsigned int eq_row = elim_row_index[
row];
63 unsigned int row_end = elim_row_buffer[
row+1];
64 NumericT vec_entry = vec_buf[eq_row];
67 vec_entry -= vec_buf[elim_col_buffer[j]] * elim_elements[j];
69 vec_buf[eq_row] = vec_entry;
This file provides the forward declarations for the main types used within ViennaCL.
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Common routines for single-threaded or OpenMP-enabled execution on CPU.
vector_expression< const matrix_base< NumericT, F >, const unsigned int, op_row > row(const matrix_base< NumericT, F > &A, unsigned int i)
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
Main abstraction class for multiple memory domains. Represents a buffer in either main RAM...
void level_scheduling_substitute(vector< NumericT > &vec, viennacl::backend::mem_handle const &row_index_array, viennacl::backend::mem_handle const &row_buffer, viennacl::backend::mem_handle const &col_buffer, viennacl::backend::mem_handle const &element_buffer, vcl_size_t num_rows)
Implementation of the ViennaCL scalar class.
const handle_type & handle() const
Returns the memory handle.