mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 14:45:40 +01:00
Constify
This commit is contained in:
parent
0c4b226c78
commit
05eeb09f36
@ -73,7 +73,7 @@ namespace FasTC {
|
|||||||
|
|
||||||
// Matrix multiplication
|
// Matrix multiplication
|
||||||
template<typename _T, const int nTarget>
|
template<typename _T, const int nTarget>
|
||||||
MatrixBase<T, nRows, nTarget> operator*(const MatrixBase<_T, nCols, nTarget> &m) {
|
MatrixBase<T, nRows, nTarget> MultiplyMatrix(const MatrixBase<_T, nCols, nTarget> &m) const {
|
||||||
MatrixBase<T, nRows, nTarget> result;
|
MatrixBase<T, nRows, nTarget> result;
|
||||||
for(int r = 0; r < nRows; r++)
|
for(int r = 0; r < nRows; r++)
|
||||||
for(int c = 0; c < nTarget; c++) {
|
for(int c = 0; c < nTarget; c++) {
|
||||||
|
@ -198,7 +198,7 @@ namespace FasTC {
|
|||||||
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
||||||
: m_A(a), m_B(b) { }
|
: m_A(a), m_B(b) { }
|
||||||
|
|
||||||
ResultType GetMultiplication() { return m_A * m_B; }
|
ResultType GetMultiplication() const { return m_A * m_B; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename TypeOne, typename TypeTwo>
|
template<typename TypeOne, typename TypeTwo>
|
||||||
@ -216,7 +216,7 @@ namespace FasTC {
|
|||||||
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
||||||
: m_A(a), m_B(b) { }
|
: m_A(a), m_B(b) { }
|
||||||
|
|
||||||
ResultType GetMultiplication() { return ScalarMultiply(m_B, m_A); }
|
ResultType GetMultiplication() const { return ScalarMultiply(m_B, m_A); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename TypeOne, typename TypeTwo>
|
template<typename TypeOne, typename TypeTwo>
|
||||||
@ -234,7 +234,7 @@ namespace FasTC {
|
|||||||
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
||||||
: m_A(a), m_B(b) { }
|
: m_A(a), m_B(b) { }
|
||||||
|
|
||||||
ResultType GetMultiplication() { return ScalarMultiply(m_A, m_B); }
|
ResultType GetMultiplication() const { return ScalarMultiply(m_A, m_B); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename TypeOne, typename TypeTwo>
|
template<typename TypeOne, typename TypeTwo>
|
||||||
@ -252,7 +252,7 @@ namespace FasTC {
|
|||||||
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
MultSwitch(const TypeOne &a, const TypeTwo &b)
|
||||||
: m_A(a), m_B(b) { }
|
: m_A(a), m_B(b) { }
|
||||||
|
|
||||||
ResultType GetMultiplication() { return m_A.Dot(m_B); }
|
ResultType GetMultiplication() const { return m_A.Dot(m_B); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename TypeOne, typename TypeTwo>
|
template<typename TypeOne, typename TypeTwo>
|
||||||
|
Loading…
Reference in New Issue
Block a user