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_VANDERMONDE_MATRIX_OPERATIONS_HPP_
#define VIENNACL_LINALG_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/scalar.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/fft.hpp"
#include "viennacl/linalg/opencl/vandermonde_matrix_operations.hpp"
namespace viennacl
{
namespace linalg
{
// A * x
template<class SCALARTYPE, unsigned int ALIGNMENT>
void prod_impl(const viennacl::vandermonde_matrix<SCALARTYPE, ALIGNMENT> & mat,
const viennacl::vector_base<SCALARTYPE> & vec,
viennacl::vector_base<SCALARTYPE> & result)
{
assert(mat.size1() == result.size());
assert(mat.size2() == vec.size());
switch (viennacl::traits::handle(mat).get_active_handle_id())
{
case viennacl::OPENCL_MEMORY:
viennacl::linalg::opencl::prod_impl(mat, vec, result);
break;
default:
throw std::runtime_error("not implemented");
}
}
} //namespace linalg
} //namespace viennacl
#endif
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
tools.hpp
Various little tools used here and there in ViennaCL.
viennacl::OPENCL_MEMORY
Definition: forwards.h:349
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::vector_base
Common base class for dense vectors, vector ranges, and vector slices.
Definition: vector_def.hpp:104
vector.hpp
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
viennacl::vector_base::size
size_type size() const
Returns the length of the vector (cf. std::vector)
Definition: vector_def.hpp:118
fft.hpp
All routines related to the Fast Fourier Transform. Experimental.
viennacl::vandermonde_matrix::size2
vcl_size_t size2() const
Returns the number of columns of the matrix.
Definition: vandermonde_matrix.hpp:100
vandermonde_matrix_operations.hpp
Implementations of operations using vandermonde_matrix.
viennacl::linalg::prod_impl
void prod_impl(const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
Carries out matrix-vector multiplication.
Definition: matrix_operations.hpp:438
viennacl::traits::handle
viennacl::backend::mem_handle & handle(T &obj)
Returns the generic memory handle of an object. Non-const version.
Definition: handle.hpp:41
viennacl::vandermonde_matrix::size1
vcl_size_t size1() const
Returns the number of rows of the matrix.
Definition: vandermonde_matrix.hpp:95
scalar.hpp
Implementation of the ViennaCL scalar class.
viennacl::backend::mem_handle::get_active_handle_id
memory_types get_active_handle_id() const
Returns an ID for the currently active memory buffer. Other memory buffers might contain old or no da...
Definition: mem_handle.hpp:118