Restored generic (non-SIMD) code

This commit is contained in:
Brian Harris
2013-05-29 13:12:13 -05:00
parent be311f42e1
commit 9c37079c16
23 changed files with 3328 additions and 24 deletions

View File

@@ -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++ ) {