@@ -69,18 +69,6 @@ DEFINE_MATRIX_TRAITS_TEMPLATE_SPECIALIZATION(3, 4)
69
69
70
70
#undef DEFINE_MATRIX_TRAITS_TEMPLATE_SPECIALIZATION
71
71
72
- template<typename T, int N, int M, int O>
73
- struct mul_output<emulated_matrix<T, N, M>, emulated_matrix<T, M, O> >
74
- {
75
- using type = emulated_matrix<T, N, O>;
76
- };
77
-
78
- template<typename T, int N, int M>
79
- struct mul_output<emulated_matrix<T, N, M>, emulated_vector_t<T, N> >
80
- {
81
- using type = emulated_vector_t<T, N>;
82
- };
83
-
84
72
namespace cpp_compat_intrinsics_impl
85
73
{
86
74
template<typename T, int N, int M>
@@ -99,18 +87,18 @@ struct mul_helper<emulated_matrix<ComponentT, N, M>, emulated_matrix<ComponentT,
99
87
{
100
88
using LhsT = emulated_matrix<ComponentT, N, M>;
101
89
using RhsT = emulated_matrix<ComponentT, M, O>;
102
- using OutputT = typename mul_output<LhsT, RhsT>::type ;
90
+ using return_t = emulated_matrix<ComponentT, N, O> ;
103
91
104
- static inline OutputT __call (LhsT lhs, RhsT rhs)
92
+ static inline return_t __call (LhsT lhs, RhsT rhs)
105
93
{
106
94
typename matrix_traits<RhsT>::transposed_type rhsTransposed = rhs.getTransposed ();
107
- const uint32_t outputRowCount = matrix_traits<OutputT >::RowCount;
108
- const uint32_t outputColumnCount = matrix_traits<OutputT >::ColumnCount;
109
- using OutputVecType = typename matrix_traits<OutputT >::row_type;
95
+ const uint32_t outputRowCount = matrix_traits<return_t >::RowCount;
96
+ const uint32_t outputColumnCount = matrix_traits<return_t >::ColumnCount;
97
+ using OutputVecType = typename matrix_traits<return_t >::row_type;
110
98
111
99
nbl::hlsl::array_set<OutputVecType, typename vector_traits<OutputVecType>::scalar_type> setter;
112
100
113
- OutputT output;
101
+ return_t output;
114
102
for (int r = 0 ; r < outputRowCount; ++r)
115
103
{
116
104
for (int c = 0 ; c < outputColumnCount; ++c)
@@ -126,14 +114,14 @@ struct mul_helper<emulated_matrix<ComponentT, RowCount, ColumnCount>, emulated_v
126
114
{
127
115
using MatT = emulated_matrix<ComponentT, RowCount, ColumnCount>;
128
116
using VecT = emulated_vector_t<ComponentT, ColumnCount>;
129
- using OutVecT = emulated_vector_t<ComponentT, RowCount>;
117
+ using return_t = emulated_vector_t<ComponentT, RowCount>;
130
118
131
- static inline OutVecT __call (MatT mat, VecT vec)
119
+ static inline return_t __call (MatT mat, VecT vec)
132
120
{
133
121
nbl::hlsl::array_get<VecT, typename vector_traits<VecT>::scalar_type> getter;
134
122
nbl::hlsl::array_set<VecT, typename vector_traits<VecT>::scalar_type> setter;
135
123
136
- OutVecT output;
124
+ return_t output;
137
125
for (int i = 0 ; i < RowCount; ++i)
138
126
setter (output, i, nbl::hlsl::dot<VecT>(mat.rows[i], vec));
139
127
0 commit comments