ViennaCL - The Vienna Computing Library
1.5.2
|
00001 #ifndef VIENNACL_LINALG_VANDERMONDE_MATRIX_OPERATIONS_HPP_ 00002 #define VIENNACL_LINALG_VANDERMONDE_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/scalar.hpp" 00027 #include "viennacl/vector.hpp" 00028 #include "viennacl/tools/tools.hpp" 00029 #include "viennacl/fft.hpp" 00030 #include "viennacl/linalg/opencl/vandermonde_matrix_operations.hpp" 00031 00032 namespace viennacl 00033 { 00034 namespace linalg 00035 { 00036 00037 // A * x 00038 00047 template<class SCALARTYPE, unsigned int ALIGNMENT> 00048 void prod_impl(const viennacl::vandermonde_matrix<SCALARTYPE, ALIGNMENT> & mat, 00049 const viennacl::vector_base<SCALARTYPE> & vec, 00050 viennacl::vector_base<SCALARTYPE> & result) 00051 { 00052 assert(mat.size1() == result.size()); 00053 assert(mat.size2() == vec.size()); 00054 00055 switch (viennacl::traits::handle(mat).get_active_handle_id()) 00056 { 00057 case viennacl::OPENCL_MEMORY: 00058 viennacl::linalg::opencl::prod_impl(mat, vec, result); 00059 break; 00060 default: 00061 throw "not implemented"; 00062 } 00063 } 00064 00065 } //namespace linalg 00066 00067 00068 } //namespace viennacl 00069 00070 00071 #endif