mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 09:23:12 +08:00
Added missing typedef (will I ever learn it!?)
Removed unsupported directories that do not provide CMakeList.txt (CMake 2.8 warning). The BenchTimer is now also working on Cygwin.
This commit is contained in:
parent
052742e6f9
commit
1fc5fdea25
@ -26,12 +26,13 @@
|
|||||||
#ifndef EIGEN_BENCH_TIMER_H
|
#ifndef EIGEN_BENCH_TIMER_H
|
||||||
#define EIGEN_BENCH_TIMER_H
|
#define EIGEN_BENCH_TIMER_H
|
||||||
|
|
||||||
#ifndef WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
#define NOMINMAX
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#define NOMINMAX
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@ -53,7 +54,7 @@ public:
|
|||||||
|
|
||||||
BenchTimer()
|
BenchTimer()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
LARGE_INTEGER freq;
|
LARGE_INTEGER freq;
|
||||||
QueryPerformanceFrequency(&freq);
|
QueryPerformanceFrequency(&freq);
|
||||||
m_frequency = (double)freq.QuadPart;
|
m_frequency = (double)freq.QuadPart;
|
||||||
@ -77,7 +78,7 @@ public:
|
|||||||
return m_best;
|
return m_best;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
inline double getTime(void)
|
inline double getTime(void)
|
||||||
#else
|
#else
|
||||||
static inline double getTime(void)
|
static inline double getTime(void)
|
||||||
@ -95,7 +96,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
double m_frequency;
|
double m_frequency;
|
||||||
#endif
|
#endif
|
||||||
double m_best, m_start;
|
double m_best, m_start;
|
||||||
|
@ -2,6 +2,6 @@ ADD_SUBDIRECTORY(IterativeSolvers)
|
|||||||
ADD_SUBDIRECTORY(BVH)
|
ADD_SUBDIRECTORY(BVH)
|
||||||
ADD_SUBDIRECTORY(AutoDiff)
|
ADD_SUBDIRECTORY(AutoDiff)
|
||||||
ADD_SUBDIRECTORY(MoreVectorization)
|
ADD_SUBDIRECTORY(MoreVectorization)
|
||||||
ADD_SUBDIRECTORY(FFT)
|
# ADD_SUBDIRECTORY(FFT)
|
||||||
ADD_SUBDIRECTORY(Skyline)
|
# ADD_SUBDIRECTORY(Skyline)
|
||||||
ADD_SUBDIRECTORY(MatrixFunctions)
|
ADD_SUBDIRECTORY(MatrixFunctions)
|
||||||
|
@ -132,7 +132,7 @@ struct MatrixScaling
|
|||||||
typedef MatrixType ReturnType;
|
typedef MatrixType ReturnType;
|
||||||
EIGEN_DONT_INLINE static MatrixType run(int num_runs)
|
EIGEN_DONT_INLINE static MatrixType run(int num_runs)
|
||||||
{
|
{
|
||||||
ei_traits<MatrixType>::Scalar s;
|
typename ei_traits<MatrixType>::Scalar s;
|
||||||
MatrixType a,b;
|
MatrixType a,b;
|
||||||
return s*a;
|
return s*a;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user