コード例 #1
0
void prod_impl(viennacl::vandermonde_matrix<NumericT, AlignmentV> const & A,
               viennacl::vector_base<NumericT> const & x,
               viennacl::vector_base<NumericT>       & y)
{
  viennacl::ocl::context & ctx = const_cast<viennacl::ocl::context &>(viennacl::traits::opencl_handle(A).context());
  viennacl::linalg::opencl::kernels::fft<NumericT>::init(ctx);

  viennacl::ocl::kernel & kernel = ctx.get_kernel(viennacl::linalg::opencl::kernels::fft<NumericT>::program_name(), "vandermonde_prod");
  viennacl::ocl::enqueue(kernel(viennacl::traits::opencl_handle(A),
                                viennacl::traits::opencl_handle(x),
                                viennacl::traits::opencl_handle(y),
                                static_cast<cl_uint>(A.size1())));
}
コード例 #2
0
        void prod_impl(const viennacl::vandermonde_matrix<SCALARTYPE, ALIGNMENT> & mat,
                      const viennacl::vector_base<SCALARTYPE> & vec,
                            viennacl::vector_base<SCALARTYPE> & result)
        {
          viennacl::ocl::context & ctx = const_cast<viennacl::ocl::context &>(viennacl::traits::opencl_handle(mat).context());
          viennacl::linalg::opencl::kernels::fft<SCALARTYPE>::init(ctx);

          viennacl::ocl::kernel & kernel = ctx.get_kernel(viennacl::linalg::opencl::kernels::fft<SCALARTYPE>::program_name(), "vandermonde_prod");
          viennacl::ocl::enqueue(kernel(viennacl::traits::opencl_handle(mat),
                                        viennacl::traits::opencl_handle(vec),
                                        viennacl::traits::opencl_handle(result),
                                        static_cast<cl_uint>(mat.size1())));
        }
コード例 #3
0
 void prod_impl(const viennacl::vandermonde_matrix<SCALARTYPE, ALIGNMENT> & mat, 
               const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT> & vec,
                     viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT> & result)
 {
   viennacl::linalg::kernels::fft<SCALARTYPE, 1>::init();
   
   viennacl::ocl::kernel& kernel = viennacl::ocl::current_context()
                                     .get_program(viennacl::linalg::kernels::fft<SCALARTYPE, 1>::program_name())
                                     .get_kernel("vandermonde_prod");
   viennacl::ocl::enqueue(kernel(viennacl::traits::opencl_handle(mat),
                                 viennacl::traits::opencl_handle(vec),
                                 viennacl::traits::opencl_handle(result),
                                 static_cast<cl_uint>(mat.size1())));
 }