1 #ifndef VIENNACL_LINALG_DETAIL_BISECT_BISECT_LARGE_HPP_
2 #define VIENNACL_LINALG_DETAIL_BISECT_BISECT_LARGE_HPP_
58 template<
typename NumericT>
61 const unsigned int mat_size,
86 template<
typename NumericT>
89 const unsigned int mat_size)
91 bool bCompareResult =
true;
94 std::vector<NumericT> lambda_mult(mat_size);
97 std::vector<unsigned int> pos_mult(mat_size);
100 std::vector<unsigned int> blocks_mult_sum(mat_size);
103 unsigned int num_one_intervals = result.
g_num_one;
104 unsigned int sum_blocks_mult = mat_size - num_one_intervals;
109 std::vector<NumericT> left_one(mat_size);
110 std::vector<NumericT> right_one(mat_size);
111 std::vector<unsigned int> pos_one(mat_size);
119 for (
unsigned int i = 0; i < sum_blocks_mult; ++i)
121 if (pos_mult[i] != 0)
126 throw memory_exception(
"Invalid array index! Are there more than 256 equal eigenvalues?");
131 unsigned int index = 0;
133 for (
unsigned int i = 0; i < num_one_intervals; ++i, ++index)
137 return bCompareResult;
142 #endif //VIENNACL_LINALG_DETAIL_BISECT_LARGE_HPP_
void bisectLarge_MultIntervals(const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
void bisectLarge(const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
Helper structures to simplify variable handling.
Exception class in case of memory errors.
viennacl::vector< NumericT > g_left_one
left interval limits of intervals containing one eigenvalue after the first iteration step ...
Kernel calls for the bisection algorithm.
Global configuration parameters.
viennacl::vector< NumericT > g_lambda_mult
eigenvalues that have been generated in the second step from intervals that still contained multiple ...
bool processResultDataLargeMatrix(ResultDataLarge< NumericT > &result, const unsigned int mat_size)
viennacl::vector< unsigned int > g_pos_one
interval indices (position in sorted listed of eigenvalues) of intervals containing one eigenvalue af...
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)
void bisectLarge_OneIntervals(const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
viennacl::vector< NumericT > g_right_one
right interval limits of intervals containing one eigenvalue after the first iteration step ...
viennacl::vector< unsigned int > g_pos_mult
eigenvalue index of intervals that have been generated in the second processing step ...
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) ...
In this class the data of the result for large matrices is stored.
viennacl::vector< unsigned int > g_blocks_mult_sum
accumulated number of intervals in g_left_mult etc. of blocks of intervals containing more than one e...
viennacl::scalar< unsigned int > g_num_one
number of intervals containing one eigenvalue after the first step