add fallback rpcc implementation

- use on arm, arm64 and any new platform
- use faster integer math instead of double
- use similar scale as rdtsc so that timeouts work
This commit is contained in:
Grazvydas Ignotas
2015-08-16 17:27:25 +02:00
parent d3e2f0a1af
commit e12cf1123e
10 changed files with 36 additions and 20 deletions

View File

@@ -72,16 +72,6 @@ static void __inline blas_lock(volatile BLASULONG *address){
}
static inline unsigned long long rpcc(void){
unsigned long long ret=0;
double v;
struct timeval tv;
gettimeofday(&tv,NULL);
v=(double) tv.tv_sec + (double) tv.tv_usec * 1e-6;
ret = (unsigned long long) ( v * 1000.0d );
return ret;
}
static inline int blas_quickdivide(blasint x, blasint y){
return x / y;
}