00001 #ifndef VIENNACL_TOOLS_MATRIX_KERNEL_CLASS_DEDUCER_HPP_ 00002 #define VIENNACL_TOOLS_MATRIX_KERNEL_CLASS_DEDUCER_HPP_ 00003 00004 /* ========================================================================= 00005 Copyright (c) 2010-2011, Institute for Microelectronics, 00006 Institute for Analysis and Scientific Computing, 00007 TU Wien. 00008 00009 ----------------- 00010 ViennaCL - The Vienna Computing Library 00011 ----------------- 00012 00013 Project Head: Karl Rupp rupp@iue.tuwien.ac.at 00014 00015 (A list of authors and contributors can be found in the PDF manual) 00016 00017 License: MIT (X11), see file LICENSE in the base directory 00018 ============================================================================= */ 00019 00024 #include <string> 00025 #include <fstream> 00026 #include <sstream> 00027 #include "viennacl/forwards.h" 00028 #include "viennacl/linalg/kernels/matrix_col_kernels.h" 00029 #include "viennacl/linalg/kernels/matrix_row_kernels.h" 00030 00031 #include <vector> 00032 #include <map> 00033 00034 namespace viennacl 00035 { 00036 namespace tools 00037 { 00039 template <typename MatrixType1> 00040 struct MATRIX_KERNEL_CLASS_DEDUCER 00041 {}; 00042 00043 template <typename SCALARTYPE, unsigned int ALIGNMENT> 00044 struct MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT> > 00045 { 00046 typedef viennacl::linalg::kernels::matrix_row<SCALARTYPE, ALIGNMENT> ResultType; 00047 }; 00048 00049 template <typename SCALARTYPE, unsigned int ALIGNMENT> 00050 struct MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT> > 00051 { 00052 typedef viennacl::linalg::kernels::matrix_col<SCALARTYPE, ALIGNMENT> ResultType; 00053 }; 00054 00055 //support for matrix range: 00056 template <typename T> 00057 struct MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix_range<T> > 00058 { 00059 typedef typename MATRIX_KERNEL_CLASS_DEDUCER<T>::ResultType ResultType; 00060 }; 00061 00062 00063 } 00064 00065 } 00066 00067 #endif