Developer Reference

  • 2021.1
  • 12/04/2020
  • Public Content
Contents

mkl_get_clocks_frequency

Returns the frequency value in GHz based on constant-rate Time Stamp Counter.

Syntax

double
mkl_get_clocks_frequency
(
void
);
Include Files
  • mkl.h
Description
The function
mkl_get_clocks_frequency
returns the CPU frequency value (in GHz) based on constant-rate Time Stamp Counter (TSC). Use of the constant-rate TSC ensures that each clock tick is constant even if the CPU frequency changes. Therefore, the returned frequency is constant.
Obtaining the frequency may take some time when
mkl_get_clocks_frequency
is called for the first time. The same holds for functions
second/dsecnd
, which call
mkl_get_clocks_frequency
.
Return Values
Name
Type
Description
freq
double
Frequency value in GHz

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.