00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 template<typename glue_type, typename T1>
00028 struct depth_lhs
00029 {
00030 static const u32 num = 0;
00031 };
00032
00033 template<typename glue_type, typename T1, typename T2>
00034 struct depth_lhs< glue_type, Glue<T1,T2,glue_type> >
00035 {
00036 static const u32 num = 1 + depth_lhs<glue_type, T1>::num;
00037 };
00038
00039
00040
00041 template<u32 N>
00042 struct glue_times_redirect
00043 {
00044 template<typename T1, typename T2>
00045 inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_times>& X);
00046 };
00047
00048
00049 template<>
00050 struct glue_times_redirect<3>
00051 {
00052 template<typename T1, typename T2, typename T3>
00053 inline static void apply(Mat<typename T1::elem_type>& out, const Glue< Glue<T1,T2,glue_times>,T3,glue_times>& X);
00054 };
00055
00056
00057 template<>
00058 struct glue_times_redirect<4>
00059 {
00060 template<typename T1, typename T2, typename T3, typename T4>
00061 inline static void apply(Mat<typename T1::elem_type>& out, const Glue< Glue< Glue<T1,T2,glue_times>, T3, glue_times>, T4, glue_times>& X);
00062 };
00063
00064
00065
00066
00067 class glue_times
00068 {
00069 public:
00070
00071
00072 template<typename T1, typename T2>
00073 inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_times>& X);
00074
00075
00076 template<typename T1>
00077 inline static void apply_inplace(Mat<typename T1::elem_type>& out, const T1& X);
00078
00079 template<typename T1, typename T2>
00080 arma_hot inline static void apply_inplace_plus(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue_times>& X, const s32 sign);
00081
00082 template<typename eT1, typename eT2>
00083 inline static void apply_mixed(Mat<typename promote_type<eT1,eT2>::result>& out, const Mat<eT1>& X, const Mat<eT2>& Y);
00084
00085
00086 template<typename eT>
00087 arma_inline static u32 mul_storage_cost(const Mat<eT>& A, const Mat<eT>& B, const bool do_trans_A, const bool do_trans_B);
00088
00089 template<typename eT>
00090 arma_hot inline static void apply(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const eT val, const bool do_trans_A, const bool do_trans_B, const bool do_scalar_times);
00091
00092 template<typename eT>
00093 inline static void apply(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const Mat<eT>& C, const eT val, const bool do_trans_A, const bool do_trans_B, const bool do_trans_C, const bool do_scalar_times);
00094
00095 template<typename eT>
00096 inline static void apply(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const Mat<eT>& C, const Mat<eT>& D, const eT val, const bool do_trans_A, const bool do_trans_B, const bool do_trans_C, const bool do_trans_D, const bool do_scalar_times);
00097
00098 };
00099
00100
00101
00102 class glue_times_diag
00103 {
00104 public:
00105
00106 template<typename T1, typename T2>
00107 arma_hot inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue_times_diag>& X);
00108
00109 };
00110
00111
00112
00113
00114