1 #ifndef VIENNACL_LINALG_OPENCL_BISECT_KERNEL_CALLS_HPP_
2 #define VIENNACL_LINALG_OPENCL_BISECT_KERNEL_CALLS_HPP_
48 template<
typename NumericT>
51 const unsigned int mat_size,
63 viennacl::traits::opencl_handle(input.
g_b),
64 static_cast<cl_uint>(mat_size),
65 viennacl::traits::opencl_handle(result.
vcl_g_left),
66 viennacl::traits::opencl_handle(result.
vcl_g_right),
69 static_cast<NumericT>(lg),
70 static_cast<NumericT>(ug),
71 static_cast<cl_uint>(0),
72 static_cast<cl_uint>(mat_size),
73 static_cast<NumericT>(precision)
78 template<
typename NumericT>
81 const unsigned int mat_size,
93 viennacl::traits::opencl_handle(input.
g_b),
94 static_cast<cl_uint>(mat_size),
95 static_cast<NumericT>(lg),
96 static_cast<NumericT>(ug),
97 static_cast<cl_uint>(0),
98 static_cast<cl_uint>(mat_size),
99 static_cast<NumericT>(precision),
100 viennacl::traits::opencl_handle(result.
g_num_one),
102 viennacl::traits::opencl_handle(result.
g_left_one),
103 viennacl::traits::opencl_handle(result.
g_right_one),
104 viennacl::traits::opencl_handle(result.
g_pos_one),
105 viennacl::traits::opencl_handle(result.
g_left_mult),
115 template<
typename NumericT>
118 const unsigned int mat_size,
121 unsigned int num_one_intervals = result.
g_num_one;
133 viennacl::traits::opencl_handle(input.
g_b),
134 static_cast<cl_uint>(mat_size),
135 static_cast<cl_uint>(num_one_intervals),
136 viennacl::traits::opencl_handle(result.
g_left_one),
137 viennacl::traits::opencl_handle(result.
g_right_one),
138 viennacl::traits::opencl_handle(result.
g_pos_one),
139 static_cast<NumericT>(precision)
144 template<
typename NumericT>
147 const unsigned int mat_size,
160 viennacl::traits::opencl_handle(input.
g_b),
161 static_cast<cl_uint>(mat_size),
164 viennacl::traits::opencl_handle(result.
g_left_mult),
169 viennacl::traits::opencl_handle(result.
g_pos_mult),
170 static_cast<NumericT>(precision)
static void init(viennacl::ocl::context &ctx)
void bisectLargeMultIntervals(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
viennacl::vector< NumericT > g_left_mult
left interval limits of intervals containing multiple eigenvalues after the first iteration step ...
void bisectSmall(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
#define VIENNACL_BISECT_MAX_THREADS_BLOCK
Helper structures to simplify variable handling.
viennacl::vector< NumericT > g_left_one
left interval limits of intervals containing one eigenvalue after the first iteration step ...
Represents an OpenCL kernel within ViennaCL.
size_type local_work_size(int index=0) const
Returns the local work size at the respective dimension.
viennacl::scalar< unsigned int > g_num_blocks_mult
number of (thread) blocks of intervals containing multiple eigenvalues after the first steo ...
Manages an OpenCL context and provides the respective convenience functions for creating buffers...
viennacl::vector< unsigned int > g_blocks_mult
start addresses in g_left_mult etc. of blocks of intervals containing more than one eigenvalue after ...
viennacl::vector< unsigned int > g_left_count_mult
number of eigenvalues less than the left limit of the eigenvalue intervals containing multiple eigenv...
Global configuration parameters.
const std::string BISECT_KERNEL_SMALL
const std::string BISECT_KERNEL_LARGE_ONE_INTERVALS
viennacl::vector< unsigned int > g_right_count_mult
number of eigenvalues less than the right limit of the eigenvalue intervals containing multiple eigen...
const std::string BISECT_KERNEL_LARGE
void bisectLargeOneIntervals(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
viennacl::ocl::kernel & get_kernel(std::string const &program_name, std::string const &kernel_name)
Convenience function for retrieving the kernel of a program directly from the context.
unsigned int getNumBlocksLinear(const unsigned int num_threads, const unsigned int num_threads_block)
viennacl::vector< NumericT > vcl_g_right
right interval limits at the end of the computation
viennacl::vector< NumericT > g_lambda_mult
eigenvalues that have been generated in the second step from intervals that still contained multiple ...
viennacl::vector< NumericT > vcl_g_left
left interval limits at the end of the computation
viennacl::vector< unsigned int > vcl_g_left_count
number of eigenvalues smaller than the left interval limit
viennacl::vector< unsigned int > g_pos_one
interval indices (position in sorted listed of eigenvalues) of intervals containing one eigenvalue af...
OpenCL kernels for the bisection algorithm for eigenvalues.
#define VIENNACL_BISECT_MAX_THREADS_BLOCK_SMALL_MATRIX
const std::string BISECT_KERNEL_LARGE_MULT_INTERVALS
viennacl::vector< NumericT > g_right_one
right interval limits of intervals containing one eigenvalue after the first iteration step ...
void enqueue(KernelType &k, viennacl::ocl::command_queue const &queue)
Enqueues a kernel in the provided queue.
viennacl::vector< unsigned int > g_pos_mult
eigenvalue index of intervals that have been generated in the second processing step ...
viennacl::vector< unsigned int > vcl_g_right_count
number of eigenvalues bigger than the right interval limit
In this class the data of the result for large matrices is stored.
size_type global_work_size(int index=0) const
Returns the global work size at the respective dimension.
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
In this class the data of the result for small matrices is stored.
Main kernel class for the generation of the bisection kernels and utilities.
void bisectLarge(const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
viennacl::vector< NumericT > g_right_mult
right interval limits of intervals containing multiple eigenvalues after the first iteration step ...