All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vandermonde_matrix_operations.hpp
Go to the documentation of this file.
#ifndef VIENNACL_LINALG_OPENCL_VANDERMONDE_MATRIX_OPERATIONS_HPP_
#define VIENNACL_LINALG_OPENCL_VANDERMONDE_MATRIX_OPERATIONS_HPP_
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
-----------------
ViennaCL - The Vienna Computing Library
-----------------
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
(A list of authors and contributors can be found in the manual)
License: MIT (X11), see file LICENSE in the base directory
============================================================================= */
#include "viennacl/forwards.h"
#include "viennacl/ocl/backend.hpp"
#include "viennacl/scalar.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/fft.hpp"
#include "viennacl/linalg/opencl/kernels/fft.hpp"
namespace viennacl
{
namespace linalg
{
namespace opencl
{
template<typename NumericT, unsigned int AlignmentV>
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())));
}
} //namespace opencl
} //namespace linalg
} //namespace viennacl
#endif
fft.hpp
OpenCL kernel file for FFT operations.
viennacl::linalg::opencl::prod_impl
void prod_impl(const matrix_base< NumericT > &mat, bool trans_A, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
Carries out matrix-vector multiplication.
Definition: matrix_operations.hpp:620
viennacl::ocl::kernel
Represents an OpenCL kernel within ViennaCL.
Definition: kernel.hpp:58
tools.hpp
Various little tools used here and there in ViennaCL.
viennacl::linalg::opencl::kernels::fft
Main kernel class for generating OpenCL kernels for the fast Fourier transform.
Definition: fft.hpp:260
viennacl::ocl::context
Manages an OpenCL context and provides the respective convenience functions for creating buffers...
Definition: context.hpp:55
forwards.h
This file provides the forward declarations for the main types used within ViennaCL.
viennacl::vandermonde_matrix
A Vandermonde matrix class.
Definition: forwards.h:418
viennacl::ocl::context::get_kernel
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.
Definition: context.hpp:605
viennacl::vector_base< NumericT >
backend.hpp
Implementations of the OpenCL backend, where all contexts are stored in.
viennacl::ocl::enqueue
void enqueue(KernelType &k, viennacl::ocl::command_queue const &queue)
Enqueues a kernel in the provided queue.
Definition: enqueue.hpp:50
vector.hpp
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
fft.hpp
All routines related to the Fast Fourier Transform. Experimental.
viennacl::vandermonde_matrix::size1
vcl_size_t size1() const
Returns the number of rows of the matrix.
Definition: vandermonde_matrix.hpp:95
viennacl::linalg::opencl::kernels::fft::init
static void init(viennacl::ocl::context &ctx)
Definition: fft.hpp:267
scalar.hpp
Implementation of the ViennaCL scalar class.