ViennaCL - The Vienna Computing Library  1.4.2
viennacl/tools/matrix_kernel_class_deducer.hpp
Go to the documentation of this file.
00001 #ifndef VIENNACL_TOOLS_MATRIX_KERNEL_CLASS_DEDUCER_HPP_
00002 #define VIENNACL_TOOLS_MATRIX_KERNEL_CLASS_DEDUCER_HPP_
00003 
00004 /* =========================================================================
00005    Copyright (c) 2010-2013, 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 <string>
00026 #include <fstream>
00027 #include <sstream>
00028 #include "viennacl/forwards.h"
00029 #include "viennacl/linalg/kernels/matrix_col_kernels.h"
00030 #include "viennacl/linalg/kernels/matrix_row_kernels.h"
00031 
00032 #include <vector>
00033 #include <map>
00034 
00035 namespace viennacl
00036 {
00037   namespace tools
00038   {
00040     template <typename MatrixType1>
00041     struct MATRIX_KERNEL_CLASS_DEDUCER
00042     {
00043       typedef typename MatrixType1::ERROR_INVALID_ARGUMENT_FOR_KERNEL_CLASS_DEDUCER    ResultType;
00044     };
00045     
00047     template <typename SCALARTYPE>
00048     struct MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix_base<SCALARTYPE, viennacl::row_major> >
00049     {
00050       typedef viennacl::linalg::kernels::matrix_row<SCALARTYPE, 1>     ResultType;
00051     };
00052     
00053     template <typename SCALARTYPE>
00054     struct MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix_base<SCALARTYPE, viennacl::column_major> >
00055     {
00056       typedef viennacl::linalg::kernels::matrix_col<SCALARTYPE, 1>     ResultType;
00057     };
00058 
00060   }
00061 
00062 }
00063 
00064 #endif