mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2026-03-20 09:00:25 +01:00
Restored generic (non-SIMD) code
This commit is contained in:
@@ -171,6 +171,7 @@ void idMatX::CopyLowerToUpperTriangle() {
|
||||
assert( ( GetNumColumns() & 3 ) == 0 );
|
||||
assert( GetNumColumns() >= GetNumRows() );
|
||||
|
||||
#ifdef ID_WIN_X86_SSE_INTRIN
|
||||
|
||||
const int n = GetNumColumns();
|
||||
const int m = GetNumRows();
|
||||
@@ -307,6 +308,20 @@ void idMatX::CopyLowerToUpperTriangle() {
|
||||
_mm_store_ps( basePtr + n0, r0 );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
const int n = GetNumColumns();
|
||||
const int m = GetNumRows();
|
||||
for ( int i = 0; i < m; i++ ) {
|
||||
const float * __restrict ptr = ToFloatPtr() + ( i + 1 ) * n + i;
|
||||
float * __restrict dstPtr = ToFloatPtr() + i * n;
|
||||
for ( int j = i + 1; j < m; j++ ) {
|
||||
dstPtr[j] = ptr[0];
|
||||
ptr += n;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
for ( int i = 0; i < numRows; i++ ) {
|
||||
|
||||
Reference in New Issue
Block a user