-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Needed to define USE_TBB when compiling estimate_normals; otherwise, …
…python crashes when attempting test_estimate_normals.py. Added num_procs keyword argument to estimate_normals. Added timer.h; estimate_normals can now report running time.
- Loading branch information
1 parent
6642aa0
commit 4a03c02
Showing
4 changed files
with
97 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef _TIMER_H | ||
#define _TIMER_H | ||
#if defined(_WIN32) || defined(__CYGWIN__) | ||
#ifndef _WIN32 | ||
#define PCTIMER_NO_WIN32 | ||
#endif /* WIN32 */ | ||
#define WIN32_LEAN_AND_MEAN | ||
#include <windows.h> // req'd for QueryPerformance[...] | ||
#ifdef PCTIMER_NO_WIN32 | ||
#undef PCTIMER_NO_WIN32 | ||
#undef _WIN32 | ||
#endif /* PCTIMER_NO_WIN32 */ | ||
__inline double getTime() { | ||
static LARGE_INTEGER pcount, pcfreq; | ||
static int initflag; | ||
if (!initflag) { | ||
QueryPerformanceFrequency(&pcfreq); | ||
initflag++; | ||
} | ||
QueryPerformanceCounter(&pcount); | ||
return (double)pcount.QuadPart / (double)pcfreq.QuadPart; | ||
} | ||
#else /* Not Win32/Cygwin */ | ||
#include <sys/time.h> | ||
#include <cstddef> | ||
|
||
__inline double getTime() { | ||
struct timeval tv; | ||
gettimeofday(&tv, NULL); | ||
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; | ||
} | ||
#endif | ||
#endif /* _TIMER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters