[libomptarget][nfc] Change unintentional target_impl prefix to kmpc_impl

This commit is contained in:
Jon Chesterfield 2019-12-30 20:49:56 +00:00
parent 0bd3cc4248
commit bc48af8c57
3 changed files with 7 additions and 7 deletions

View File

@ -105,10 +105,10 @@ INLINE uint32_t __kmpc_impl_smid() {
return __smid(); return __smid();
} }
INLINE double __target_impl_get_wtick() { return ((double)1E-9); } INLINE double __kmpc_impl_get_wtick() { return ((double)1E-9); }
EXTERN uint64_t __clock64(); EXTERN uint64_t __clock64();
INLINE double __target_impl_get_wtime() { INLINE double __kmpc_impl_get_wtime() {
return ((double)1.0 / 745000000.0) * __clock64(); return ((double)1.0 / 745000000.0) * __clock64();
} }

View File

@ -16,13 +16,13 @@
#include "target_impl.h" #include "target_impl.h"
EXTERN double omp_get_wtick(void) { EXTERN double omp_get_wtick(void) {
double rc = __target_impl_get_wtick(); double rc = __kmpc_impl_get_wtick();
PRINT(LD_IO, "omp_get_wtick() returns %g\n", rc); PRINT(LD_IO, "omp_get_wtick() returns %g\n", rc);
return rc; return rc;
} }
EXTERN double omp_get_wtime(void) { EXTERN double omp_get_wtime(void) {
double rc = __target_impl_get_wtime(); double rc = __kmpc_impl_get_wtime();
PRINT(LD_IO, "call omp_get_wtime() returns %g\n", rc); PRINT(LD_IO, "call omp_get_wtime() returns %g\n", rc);
return rc; return rc;
} }

View File

@ -102,15 +102,15 @@ INLINE uint32_t __kmpc_impl_smid() {
return id; return id;
} }
INLINE double __target_impl_get_wtick() { INLINE double __kmpc_impl_get_wtick() {
// Timer precision is 1ns // Timer precision is 1ns
return ((double)1E-9); return ((double)1E-9);
} }
INLINE double __target_impl_get_wtime() { INLINE double __kmpc_impl_get_wtime() {
unsigned long long nsecs; unsigned long long nsecs;
asm("mov.u64 %0, %%globaltimer;" : "=l"(nsecs)); asm("mov.u64 %0, %%globaltimer;" : "=l"(nsecs));
return (double)nsecs * __target_impl_get_wtick(); return (double)nsecs * __kmpc_impl_get_wtick();
} }
INLINE uint32_t __kmpc_impl_ffs(uint32_t x) { return __ffs(x); } INLINE uint32_t __kmpc_impl_ffs(uint32_t x) { return __ffs(x); }