openclKernels.hpp
Go to the documentation of this file.
31using spmv_blocked_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int,
33using spmv_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int,
35using residual_blocked_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int,
37using residual_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int,
39using ilu_apply1_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const cl::Buffer&,
41using ilu_apply2_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&,
43using stdwell_apply_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&,
47using ilu_decomp_kernel_type = cl::KernelFunctor<const unsigned int, const unsigned int, cl::Buffer&, cl::Buffer&, cl::Buffer&,
49using isaiL_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&,
51using isaiU_kernel_type = cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&,
62 static std::size_t preferred_workgroup_size_multiple; // stores CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
64 static std::unique_ptr<cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int, cl::LocalSpaceArg> > dot_k;
65 static std::unique_ptr<cl::KernelFunctor<cl::Buffer&, cl::Buffer&, const unsigned int, cl::LocalSpaceArg> > norm_k;
66 static std::unique_ptr<cl::KernelFunctor<cl::Buffer&, const Scalar, cl::Buffer&, const unsigned int> > axpy_k;
67 static std::unique_ptr<cl::KernelFunctor<cl::Buffer&, const Scalar, const unsigned int> > scale_k;
68 static std::unique_ptr<cl::KernelFunctor<const Scalar, cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int> > vmul_k;
69 static std::unique_ptr<cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const Scalar, const Scalar, const unsigned int> > custom_k;
70 static std::unique_ptr<cl::KernelFunctor<const cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int> > full_to_pressure_restriction_k;
71 static std::unique_ptr<cl::KernelFunctor<cl::Buffer&, cl::Buffer&, const unsigned int, const unsigned int> > add_coarse_pressure_correction_k;
72 static std::unique_ptr<cl::KernelFunctor<const cl::Buffer&, cl::Buffer&, const cl::Buffer&, const unsigned int> > prolongate_vector_k;
116 static void init(cl::Context *context, cl::CommandQueue *queue, std::vector<cl::Device>& devices, int verbosity);
123 static void custom(cl::Buffer& p, cl::Buffer& v, cl::Buffer& r, const Scalar omega, const Scalar beta, int N);
124 static void full_to_pressure_restriction(const cl::Buffer& fine_y, cl::Buffer& weights, cl::Buffer& coarse_y, int Nb);
125 static void add_coarse_pressure_correction(cl::Buffer& coarse_x, cl::Buffer& fine_x, int pressure_idx, int Nb);
126 static void prolongate_vector(const cl::Buffer& in, cl::Buffer& out, const cl::Buffer& cols, int N);
127 static void spmv(cl::Buffer& vals, cl::Buffer& cols, cl::Buffer& rows, const cl::Buffer& x, cl::Buffer& b, int Nb, unsigned int block_size, bool reset = true, bool add = false);
128 static void residual(cl::Buffer& vals, cl::Buffer& cols, cl::Buffer& rows, cl::Buffer& x, const cl::Buffer& rhs, cl::Buffer& out, int Nb, unsigned int block_size);
130 static void ILU_apply1(cl::Buffer& rowIndices, cl::Buffer& vals, cl::Buffer& cols, cl::Buffer& rows, cl::Buffer& diagIndex,
131 const cl::Buffer& y, cl::Buffer& x, cl::Buffer& rowsPerColor, int color, int Nb, unsigned int block_size);
133 static void ILU_apply2(cl::Buffer& rowIndices, cl::Buffer& vals, cl::Buffer& cols, cl::Buffer& rows, cl::Buffer& diagIndex,
134 cl::Buffer& invDiagVals, cl::Buffer& x, cl::Buffer& rowsPerColor, int color, int Nb, unsigned int block_size);
136 static void ILU_decomp(int firstRow, int lastRow, cl::Buffer& rowIndices, cl::Buffer& vals, cl::Buffer& cols, cl::Buffer& rows,
139 static void apply_stdwells(cl::Buffer& d_Cnnzs_ocl, cl::Buffer &d_Dnnzs_ocl, cl::Buffer &d_Bnnzs_ocl,
143 static void isaiL(cl::Buffer& diagIndex, cl::Buffer& colPointers, cl::Buffer& mapping, cl::Buffer& nvc,
144 cl::Buffer& luIdxs, cl::Buffer& xxIdxs, cl::Buffer& dxIdxs, cl::Buffer& LUvals, cl::Buffer& invLvals, unsigned int Nb);
146 static void isaiU(cl::Buffer& diagIndex, cl::Buffer& colPointers, cl::Buffer& rowIndices, cl::Buffer& mapping,
147 cl::Buffer& nvc, cl::Buffer& luIdxs, cl::Buffer& xxIdxs, cl::Buffer& dxIdxs, cl::Buffer& LUvals,
Definition: openclKernels.hpp:56 static Scalar norm(cl::Buffer &in, cl::Buffer &out, int N) static const std::string ILU_apply2_fm_str Definition: openclKernels.hpp:109 static const std::string ILU_apply1_fm_str Definition: openclKernels.hpp:108 static void residual(cl::Buffer &vals, cl::Buffer &cols, cl::Buffer &rows, cl::Buffer &x, const cl::Buffer &rhs, cl::Buffer &out, int Nb, unsigned int block_size) static void apply_stdwells(cl::Buffer &d_Cnnzs_ocl, cl::Buffer &d_Dnnzs_ocl, cl::Buffer &d_Bnnzs_ocl, cl::Buffer &d_Ccols_ocl, cl::Buffer &d_Bcols_ocl, cl::Buffer &d_x, cl::Buffer &d_y, int dim, int dim_wells, cl::Buffer &d_val_pointers_ocl, int num_std_wells) static const std::string prolongate_vector_str Definition: openclKernels.hpp:97 static const std::string add_coarse_pressure_correction_str Definition: openclKernels.hpp:96 static void spmv(cl::Buffer &vals, cl::Buffer &cols, cl::Buffer &rows, const cl::Buffer &x, cl::Buffer &b, int Nb, unsigned int block_size, bool reset=true, bool add=false) static const std::string vmul_str Definition: openclKernels.hpp:91 static const std::string custom_str Definition: openclKernels.hpp:94 static const std::string residual_blocked_str Definition: openclKernels.hpp:102 static const std::string ILU_decomp_str Definition: openclKernels.hpp:112 static void ILU_decomp(int firstRow, int lastRow, cl::Buffer &rowIndices, cl::Buffer &vals, cl::Buffer &cols, cl::Buffer &rows, cl::Buffer &diagIndex, cl::Buffer &invDiagVals, int Nb, unsigned int block_size) static void ILU_apply1(cl::Buffer &rowIndices, cl::Buffer &vals, cl::Buffer &cols, cl::Buffer &rows, cl::Buffer &diagIndex, const cl::Buffer &y, cl::Buffer &x, cl::Buffer &rowsPerColor, int color, int Nb, unsigned int block_size) static Scalar dot(cl::Buffer &in1, cl::Buffer &in2, cl::Buffer &out, int N) static const std::string spmv_blocked_str Definition: openclKernels.hpp:98 static void init(cl::Context *context, cl::CommandQueue *queue, std::vector< cl::Device > &devices, int verbosity) static void vmul(const Scalar alpha, cl::Buffer &in1, cl::Buffer &in2, cl::Buffer &out, int N) static const std::string isaiU_str Definition: openclKernels.hpp:114 static void add_coarse_pressure_correction(cl::Buffer &coarse_x, cl::Buffer &fine_x, int pressure_idx, int Nb) static const std::string axpy_str Definition: openclKernels.hpp:89 static const std::string scale_str Definition: openclKernels.hpp:90 static void isaiU(cl::Buffer &diagIndex, cl::Buffer &colPointers, cl::Buffer &rowIndices, cl::Buffer &mapping, cl::Buffer &nvc, cl::Buffer &luIdxs, cl::Buffer &xxIdxs, cl::Buffer &dxIdxs, cl::Buffer &LUvals, cl::Buffer &invDiagVals, cl::Buffer &invUvals, unsigned int Nb) static const std::string stdwell_apply_str Definition: openclKernels.hpp:111 static const std::string norm_str Definition: openclKernels.hpp:93 static void full_to_pressure_restriction(const cl::Buffer &fine_y, cl::Buffer &weights, cl::Buffer &coarse_y, int Nb) static const std::string spmv_blocked_add_str Definition: openclKernels.hpp:99 static const std::string spmv_str Definition: openclKernels.hpp:100 static const std::string isaiL_str Definition: openclKernels.hpp:113 static void axpy(cl::Buffer &in, const Scalar a, cl::Buffer &out, int N) static void ILU_apply2(cl::Buffer &rowIndices, cl::Buffer &vals, cl::Buffer &cols, cl::Buffer &rows, cl::Buffer &diagIndex, cl::Buffer &invDiagVals, cl::Buffer &x, cl::Buffer &rowsPerColor, int color, int Nb, unsigned int block_size) static void isaiL(cl::Buffer &diagIndex, cl::Buffer &colPointers, cl::Buffer &mapping, cl::Buffer &nvc, cl::Buffer &luIdxs, cl::Buffer &xxIdxs, cl::Buffer &dxIdxs, cl::Buffer &LUvals, cl::Buffer &invLvals, unsigned int Nb) static const std::string spmv_noreset_str Definition: openclKernels.hpp:101 static void prolongate_vector(const cl::Buffer &in, cl::Buffer &out, const cl::Buffer &cols, int N) static const std::string residual_str Definition: openclKernels.hpp:103 static const std::string full_to_pressure_restriction_str Definition: openclKernels.hpp:95 static const std::string dot_1_str Definition: openclKernels.hpp:92 static void custom(cl::Buffer &p, cl::Buffer &v, cl::Buffer &r, const Scalar omega, const Scalar beta, int N) static void scale(cl::Buffer &in, const Scalar a, int N) Definition: amgclSolverBackend.hpp:44 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, cl::Buffer &, const cl::Buffer &, cl::Buffer &, cl::LocalSpaceArg > residual_kernel_type Definition: openclKernels.hpp:38 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int > isaiL_kernel_type Definition: openclKernels.hpp:50 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const unsigned int, cl::Buffer &, cl::LocalSpaceArg, cl::LocalSpaceArg, cl::LocalSpaceArg > stdwell_apply_kernel_type Definition: openclKernels.hpp:46 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const unsigned int, cl::LocalSpaceArg > ilu_apply1_kernel_type Definition: openclKernels.hpp:40 cl::KernelFunctor< const unsigned int, const unsigned int, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const int, cl::LocalSpaceArg > ilu_decomp_kernel_type Definition: openclKernels.hpp:48 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const unsigned int, cl::LocalSpaceArg > ilu_apply2_kernel_type Definition: openclKernels.hpp:42 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const cl::Buffer &, cl::Buffer &, const unsigned int, cl::LocalSpaceArg > spmv_blocked_kernel_type Definition: openclKernels.hpp:32 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const cl::Buffer &, cl::Buffer &, cl::LocalSpaceArg > spmv_kernel_type Definition: openclKernels.hpp:34 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, cl::Buffer &, const cl::Buffer &, cl::Buffer &, const unsigned int, cl::LocalSpaceArg > residual_blocked_kernel_type Definition: openclKernels.hpp:36 cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int > isaiU_kernel_type Definition: openclKernels.hpp:52 |