00001 #ifndef VIENNACL_TOOLS_MATRIX_PROD_KERNEL_CLASS_DEDUCER_HPP_
00002 #define VIENNACL_TOOLS_MATRIX_PROD_KERNEL_CLASS_DEDUCER_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00024 #include <string>
00025 #include <fstream>
00026 #include <sstream>
00027 #include "viennacl/forwards.h"
00028 #include "viennacl/linalg/kernels/matrix_prod_col_col_col_kernels.h"
00029 #include "viennacl/linalg/kernels/matrix_prod_col_col_row_kernels.h"
00030 #include "viennacl/linalg/kernels/matrix_prod_col_row_col_kernels.h"
00031 #include "viennacl/linalg/kernels/matrix_prod_col_row_row_kernels.h"
00032 #include "viennacl/linalg/kernels/matrix_prod_row_col_col_kernels.h"
00033 #include "viennacl/linalg/kernels/matrix_prod_row_col_row_kernels.h"
00034 #include "viennacl/linalg/kernels/matrix_prod_row_row_col_kernels.h"
00035 #include "viennacl/linalg/kernels/matrix_prod_row_row_row_kernels.h"
00036
00037 #include <vector>
00038 #include <map>
00039
00040 namespace viennacl
00041 {
00042 namespace tools
00043 {
00045 template <typename MatrixType1, typename MatrixType2, typename MatrixType3>
00046 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER
00047 {};
00048
00049 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00050 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00051 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00052 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT> >
00053 {
00054 typedef viennacl::linalg::kernels::matrix_prod_row_row_row<SCALARTYPE, ALIGNMENT> ResultType;
00055 };
00056
00057 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00058 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00059 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00060 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT> >
00061 {
00062 typedef viennacl::linalg::kernels::matrix_prod_row_row_col<SCALARTYPE, ALIGNMENT> ResultType;
00063 };
00064
00065 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00066 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00067 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00068 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT> >
00069 {
00070 typedef viennacl::linalg::kernels::matrix_prod_row_col_row<SCALARTYPE, ALIGNMENT> ResultType;
00071 };
00072
00073 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00074 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00075 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00076 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT> >
00077 {
00078 typedef viennacl::linalg::kernels::matrix_prod_row_col_col<SCALARTYPE, ALIGNMENT> ResultType;
00079 };
00080
00081
00082 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00083 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00084 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00085 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT> >
00086 {
00087 typedef viennacl::linalg::kernels::matrix_prod_col_row_row<SCALARTYPE, ALIGNMENT> ResultType;
00088 };
00089
00090 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00091 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00092 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT>,
00093 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT> >
00094 {
00095 typedef viennacl::linalg::kernels::matrix_prod_col_row_col<SCALARTYPE, ALIGNMENT> ResultType;
00096 };
00097
00098 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00099 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00100 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00101 viennacl::matrix<SCALARTYPE, viennacl::row_major, ALIGNMENT> >
00102 {
00103 typedef viennacl::linalg::kernels::matrix_prod_col_col_row<SCALARTYPE, ALIGNMENT> ResultType;
00104 };
00105
00106 template <typename SCALARTYPE, unsigned int ALIGNMENT>
00107 struct MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00108 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT>,
00109 viennacl::matrix<SCALARTYPE, viennacl::column_major, ALIGNMENT> >
00110 {
00111 typedef viennacl::linalg::kernels::matrix_prod_col_col_col<SCALARTYPE, ALIGNMENT> ResultType;
00112 };
00113
00114 }
00115
00116 }
00117
00118 #endif