Updated CDTestFramework with the OPCODE Array SAP test.

Thanks Pierre Terdiman for the latest update.
This commit is contained in:
erwin.coumans
2008-09-01 18:46:57 +00:00
parent f655eff89f
commit 932de57d4c
41 changed files with 6385 additions and 410 deletions

View File

@@ -1,19 +1,3 @@
/*
* ICE / OPCODE - Optimized Collision Detection
* http://www.codercorner.com/Opcode.htm
*
* Copyright (c) 2001-2008 Pierre Terdiman, pierre@codercorner.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Contains source code from the article "Radix Sort Revisited".
@@ -25,8 +9,8 @@ subject to the following restrictions:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include Guard
#ifndef __ICERADIXSORT_H__
#define __ICERADIXSORT_H__
#ifndef ICERADIXSORT_H
#define ICERADIXSORT_H
//! Allocate histograms & offsets locally
#define RADIX_LOCAL_RAM
@@ -39,7 +23,7 @@ subject to the following restrictions:
RADIX_FORCE_DWORD = 0x7fffffff
};
class ICECORE_API RadixSort
class ICECORE_API RadixSort : public Allocateable
{
public:
// Constructor/Destructor
@@ -62,6 +46,9 @@ subject to the following restrictions:
//! Returns the number of eraly exits due to temporal coherence.
inline_ udword GetNbHits() const { return mNbHits; }
bool SetRankBuffers(udword* ranks0, udword* ranks1);
PREVENT_COPY(RadixSort)
private:
#ifndef RADIX_LOCAL_RAM
udword* mHistogram; //!< Counters for each byte
@@ -73,9 +60,15 @@ subject to the following restrictions:
// Stats
udword mTotalCalls; //!< Total number of calls to the sort routine
udword mNbHits; //!< Number of early exits due to coherence
// Stack-radix
bool mDeleteRanks; //!<
// Internal methods
void CheckResize(udword nb);
bool Resize(udword nb);
};
#endif // __ICERADIXSORT_H__
#define StackRadixSort(name, ranks0, ranks1) \
RadixSort name; \
name.SetRankBuffers(ranks0, ranks1);
#endif // ICERADIXSORT_H