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,
62 const NumericT lg,
const NumericT ug,
const NumericT precision)
84 template<
typename NumericT>
87 const unsigned int mat_size)
89 bool bCompareResult =
true;
93 std::vector<NumericT> lambda_mult(mat_size);
96 std::vector<unsigned int> pos_mult(mat_size);
99 std::vector<unsigned int> blocks_mult_sum(mat_size);
102 unsigned int num_one_intervals = result.
g_num_one;
103 unsigned int sum_blocks_mult = mat_size - num_one_intervals;
108 std::vector<NumericT> left_one(mat_size);
109 std::vector<NumericT> right_one(mat_size);
110 std::vector<unsigned int> pos_one(mat_size);
118 for (
unsigned int i = 0; i < sum_blocks_mult; ++i)
120 if (pos_mult[i] != 0)
126 bCompareResult =
false;
131 unsigned int index = 0;
133 for (
unsigned int i = 0; i < num_one_intervals; ++i, ++index)
138 return bCompareResult;
143 #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.
viennacl::vector< NumericT > g_left_one
Kernel calls for the bisection algorithm.
Global configuration parameters.
viennacl::vector< NumericT > g_lambda_mult
bool processResultDataLargeMatrix(ResultDataLarge< NumericT > &result, const unsigned int mat_size)
viennacl::vector< unsigned int > g_pos_one
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
viennacl::vector< unsigned int > g_pos_mult
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
viennacl::scalar< unsigned int > g_num_one
number of intervals containing one eigenvalue after the first step