ViennaCL - The Vienna Computing Library  1.5.1
viennacl/linalg/hankel_matrix_operations.hpp
Go to the documentation of this file.
00001 #ifndef VIENNACL_LINALG_HANKEL_MATRIX_OPERATIONS_HPP_
00002 #define VIENNACL_LINALG_HANKEL_MATRIX_OPERATIONS_HPP_
00003 
00004 /* =========================================================================
00005    Copyright (c) 2010-2014, Institute for Microelectronics,
00006                             Institute for Analysis and Scientific Computing,
00007                             TU Wien.
00008    Portions of this software are copyright by UChicago Argonne, LLC.
00009 
00010                             -----------------
00011                   ViennaCL - The Vienna Computing Library
00012                             -----------------
00013 
00014    Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
00015 
00016    (A list of authors and contributors can be found in the PDF manual)
00017 
00018    License:         MIT (X11), see file LICENSE in the base directory
00019 ============================================================================= */
00020 
00025 #include "viennacl/forwards.h"
00026 #include "viennacl/ocl/backend.hpp"
00027 #include "viennacl/scalar.hpp"
00028 #include "viennacl/vector.hpp"
00029 #include "viennacl/tools/tools.hpp"
00030 #include "viennacl/fft.hpp"
00031 #include "viennacl/linalg/toeplitz_matrix_operations.hpp"
00032 
00033 namespace viennacl
00034 {
00035   namespace linalg
00036   {
00037 
00038     // A * x
00039 
00048     template<class SCALARTYPE, unsigned int ALIGNMENT>
00049     void prod_impl(const viennacl::hankel_matrix<SCALARTYPE, ALIGNMENT> & mat,
00050                    const viennacl::vector_base<SCALARTYPE> & vec,
00051                          viennacl::vector_base<SCALARTYPE> & result)
00052     {
00053       assert(mat.size1() == result.size());
00054       assert(mat.size2() == vec.size());
00055 
00056       prod_impl(mat.elements(), vec, result);
00057       viennacl::detail::fft::reverse(result);
00058     }
00059 
00060   } //namespace linalg
00061 
00062 
00063 } //namespace viennacl
00064 
00065 
00066 #endif