1 #ifndef VIENNACL_LINALG_BISECT_GPU
2 #define VIENNACL_LINALG_BISECT_GPU
58 template<
typename NumericT>
59 bool bisect(std::vector<NumericT>
const & diagonal, std::vector<NumericT>
const & superdiagonal, std::vector<NumericT> & eigenvalues)
61 assert(diagonal.size() == superdiagonal.size() &&
62 diagonal.size() == eigenvalues.size() &&
63 bool(
"Input vectors do not have the same sizes!"));
68 NumericT precision = NumericT(0.00001);
69 const unsigned int mat_size =
static_cast<unsigned int>(diagonal.size());
74 NumericT lg = FLT_MAX;
75 NumericT ug = -FLT_MAX;
120 template<
typename NumericT>
123 assert(diagonal.
size() == superdiagonal.
size() &&
124 diagonal.
size() == eigenvalues.
size() &&
125 bool(
"Input vectors do not have the same sizes!"));
126 bool bResult =
false;
129 NumericT precision = 0.00001;
130 const unsigned int mat_size = diagonal.
size();
135 NumericT lg = FLT_MAX;
136 NumericT ug = -FLT_MAX;
std::vector< NumericT > std_eigenvalues
eigenvalues (host side)
Helper structures to simplify variable handling.
Implementation of the dense matrix class.
Computation of eigenvalues of a large symmetric, tridiagonal matrix.
void computeGerschgorin(std::vector< NumericT > &d, std::vector< NumericT > &s, unsigned int n, NumericT &lg, NumericT &ug)
std::vector< typename viennacl::result_of::cpu_value_type< typename VectorT::value_type >::type > bisect(VectorT const &alphas, VectorT const &betas)
Implementation of the bisect-algorithm for the calculation of the eigenvalues of a tridiagonal matrix...
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Computation of eigenvalues of a small symmetric, tridiagonal matrix.
Computation of Gerschgorin interval for symmetric, tridiagonal matrix.
bool processResultDataLargeMatrix(ResultDataLarge< NumericT > &result, const unsigned int mat_size)
std::vector< NumericT > std_eigenvalues
eigenvalues
void computeEigenvaluesLargeMatrix(InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
#define VIENNACL_BISECT_MAX_SMALL_MATRIX
void computeEigenvaluesSmallMatrix(const InputData< NumericT > &input, ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
void processResultSmallMatrix(ResultDataSmall< NumericT > &result, const unsigned int mat_size)
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
void copy(std::vector< NumericT > &cpu_vec, circulant_matrix< NumericT, AlignmentV > &gpu_mat)
Copies a circulant matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU) ...
size_type size() const
Returns the length of the vector (cf. std::vector)
In this class the data of the result for large matrices is stored.
Implementation of the ViennaCL scalar class.
In this class the data of the result for small matrices is stored.