1 #ifndef VIENNACL_LINALG_CUDA_BISECT_KERNEL_LARGE_ONEI_HPP_
2 #define VIENNACL_LINALG_CUDA_BISECT_KERNEL_LARGE_ONEI_HPP_
56 template<
typename NumericT>
60 unsigned int num_intervals,
66 const unsigned int gtid = (blockDim.x * blockIdx.x) + threadIdx.x;
76 unsigned int right_count;
78 unsigned int converged = 0;
82 unsigned int mid_count = 0;
85 if (gtid < num_intervals)
88 right = g_right[gtid];
89 right_count = g_pos[gtid];
94 __shared__
unsigned int converged_all_threads;
99 converged_all_threads = 0;
108 converged_all_threads = 1;
111 if ((gtid < num_intervals) && (0 == converged))
118 mid, gtid, num_intervals,
126 if ((gtid < num_intervals) && (0 == converged))
130 if (right_count == mid_count)
141 NumericT t1 =
max(abs(right), abs(left)) * precision;
143 if (t0 <
min(precision, t1))
153 converged_all_threads = 0;
159 if (1 == converged_all_threads)
170 if (gtid < num_intervals)
180 #endif // #ifndef VIENNACL_LINALG_CUDA_BISECT_KERNEL_LARGE_ONEI_HPP_
#define VIENNACL_BISECT_MAX_THREADS_BLOCK
Global configuration parameters.
__device__ NumericT computeMidpoint(const NumericT left, const NumericT right)
NumericT max(std::vector< NumericT > const &v1)
__global__ void bisectKernelLarge_OneIntervals(const NumericT *g_d, const NumericT *g_s, const unsigned int n, unsigned int num_intervals, NumericT *g_left, NumericT *g_right, unsigned int *g_pos, NumericT precision)
__device__ unsigned int computeNumSmallerEigenvalsLarge(const NumericT *g_d, const NumericT *g_s, const unsigned int n, const NumericT x, const unsigned int tid, const unsigned int num_intervals_active, NumericT *s_d, NumericT *s_s, unsigned int converged)
NumericT min(std::vector< NumericT > const &v1)