Merge internal branch.

- Remove old/unused code.
- Remove format string constructors.
- Better win64 support (vsscanf, prefetch, etc).
- Fix radix sort to sort -0 correctly.
- Add misc utilities (constraints, timer, cpuinfo, introsort).
This commit is contained in:
castano
2008-12-29 11:20:06 +00:00
parent a03411e451
commit e5ae0c0e20
14 changed files with 801 additions and 462 deletions

22
src/nvcore/Timer.h Normal file
View File

@ -0,0 +1,22 @@
// This code is in the public domain -- castano@gmail.com
#ifndef NV_CORE_TIMER_H
#define NV_CORE_TIMER_H
#include <nvcore/nvcore.h>
#include <time.h> //clock
class NVCORE_CLASS Timer
{
public:
Timer() {}
void start() { m_start = clock(); }
int elapsed() const { return (1000 * (clock() - m_start)) / CLOCKS_PER_SEC; }
private:
clock_t m_start;
};
#endif // NV_CORE_TIMER_H