1 #ifndef VIENNACL_LINALG_OPENCL_DIRECT_SOLVE_HPP
2 #define VIENNACL_LINALG_OPENCL_DIRECT_SOLVE_HPP
47 template<
typename MatrixT1,
typename MatrixT2,
typename KernelT>
55 viennacl::traits::opencl_handle(B),
76 template<
typename NumericT,
typename SolverTagT>
83 std::string program_name;
87 KernelClass::init(ctx);
88 program_name = KernelClass::program_name();
93 KernelClass::init(ctx);
94 program_name = KernelClass::program_name();
99 KernelClass::init(ctx);
100 program_name = KernelClass::program_name();
105 KernelClass::init(ctx);
106 program_name = KernelClass::program_name();
109 std::stringstream ss;
110 ss << SolverTagT::name();
125 template<
typename NumericT,
typename SOLVERTAG>
140 viennacl::traits::opencl_handle(x),
Represents an OpenCL device within ViennaCL.
result_of::size_type< matrix_base< NumericT > >::type stride1(matrix_base< NumericT > const &s)
Represents an OpenCL kernel within ViennaCL.
Implementation of the dense matrix class.
vcl_size_t internal_size1(matrix_base< NumericT > const &mat)
Helper routine for obtaining the internal number of entries per row of a ViennaCL matrix...
size_type local_work_size(int index=0) const
Returns the local work size at the respective dimension.
vcl_size_t size1(MatrixType const &mat)
Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.)
A tag class representing a lower triangular matrix.
Manages an OpenCL context and provides the respective convenience functions for creating buffers...
vcl_size_t internal_size2(matrix_base< NumericT > const &mat)
Helper routine for obtaining the internal number of entries per column of a ViennaCL matrix...
result_of::size_type< viennacl::vector_base< T > >::type stride(viennacl::vector_base< T > const &s)
result_of::size_type< T >::type start1(T const &obj)
cl_uint get_option_for_solver_tag(viennacl::linalg::upper_tag)
OpenCL kernel file for dense matrix solves with multiple right hand side (BLAS level 3) ...
result_of::size_type< MatrixType >::type size2(MatrixType const &mat)
Generic routine for obtaining the number of columns of a matrix (ViennaCL, uBLAS, etc...
void inplace_solve_impl(MatrixT1 const &A, MatrixT2 &B, KernelT &k)
vcl_size_t size(VectorType const &vec)
Generic routine for obtaining the size of a vector (ViennaCL, uBLAS, etc.)
result_of::size_type< T >::type start2(T const &obj)
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.
A tag class representing an upper triangular matrix.
Implementation of a smart-pointer-like class for handling OpenCL handles.
result_of::size_type< T >::type start(T const &obj)
Main kernel class for the generation of matrix solve kernels.
size_type size2() const
Returns the number of columns.
result_of::size_type< matrix_base< NumericT > >::type stride2(matrix_base< NumericT > const &s)
void inplace_solve(matrix_base< NumericT > const &A, matrix_base< NumericT > &B, SolverTagT)
Direct inplace solver for dense triangular systems. Matlab notation: A \ B.
viennacl::ocl::kernel & legacy_kernel_for_matrix(matrix_base< NumericT > const &M, std::string const &kernel_name)
void enqueue(KernelType &k, viennacl::ocl::command_queue const &queue)
Enqueues a kernel in the provided queue.
Representation of an OpenCL kernel in ViennaCL.
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
A tag class representing a lower triangular matrix with unit diagonal.
size_type global_work_size(int index=0) const
Returns the global work size at the respective dimension.
A tag class representing an upper triangular matrix with unit diagonal.
Runtime generation of OpenCL kernels for matrix operations.