Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit cbbed01b authored by BRAMAS Berenger's avatar BRAMAS Berenger

update timer for ftic to omp timer of gettimeofday

parent 464daaf8
...@@ -50,7 +50,7 @@ OPTION( ScalFMM_USE_ADDONS "Set to ON to compile add ons" ...@@ -50,7 +50,7 @@ OPTION( ScalFMM_USE_ADDONS "Set to ON to compile add ons"
OPTION( ScalFMM_USE_SSE "Set to ON to compile with sse support" ON ) OPTION( ScalFMM_USE_SSE "Set to ON to compile with sse support" ON )
# Set scalfmm to default libraries # Set scalfmm to default libraries
SET(SCALFMM_LIBRARIES "-lrt") SET(SCALFMM_LIBRARIES "")
# Test if openmp is here # Test if openmp is here
find_package (OpenMP) find_package (OpenMP)
......
...@@ -17,15 +17,17 @@ ...@@ -17,15 +17,17 @@
#define FTIC_HPP #define FTIC_HPP
#include "FGlobal.hpp" #include "FGlobal.hpp"
#include <time.h>
// We need an os specific function #ifdef _OPENMP
#if defined(WINDOWS) #include <omp.h>
#elif defined(WINDOWS) // We need an os specific function
#include <time.h>
#include <windows.h> #include <windows.h>
#else #else
#ifndef POSIX #ifndef POSIX
#warning Posix used withoug being explicitly defined #warning Posix used withoug being explicitly defined
#endif #endif
#include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#include <stdint.h> #include <stdint.h>
...@@ -94,13 +96,14 @@ public: ...@@ -94,13 +96,14 @@ public:
* gettimeofday on linux or a direct ASM method * gettimeofday on linux or a direct ASM method
*/ */
static double GetTime(){ static double GetTime(){
#ifdef WINDOWS #ifdef _OPENMP
return omp_get_wtime();
#elif defined(WINDOWS)
return static_cast<double>(GetTickCount())/1000.0; return static_cast<double>(GetTickCount())/1000.0;
#else // We are in linux/posix #else // We are in linux/posix
// better than gettimeofday but need -lrt timeval t;
struct timespec tp; gettimeofday(&t, NULL);
clock_gettime(CLOCK_MONOTONIC_RAW, &tp); return double(t.tv_sec) + (double(t.tv_usec)/1000000.0);
return double(tp.tv_sec) + (double(tp.tv_nsec)/1000000000.0);
#endif #endif
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment