All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
units.h File Reference

Unit helper macros. More...

Detailed Description

Unit helper macros.

Author
Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com

Definition in file units.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define KiB(x)
 A macro to return the bytes in x KiB.
 
#define MiB(x)
 A macro to return the bytes in x MiB.
 
#define GiB(x)
 A macro to return the bytes in x GiB.
 
#define KHZ(x)
 A macro to return the Hz in x kHz.
 
#define MHZ(x)
 A macro to return the Hz in x MHz.
 
#define GHZ(x)
 A macro to return the Hz in x GHz.
 

Macro Definition Documentation

◆ GHZ

#define GHZ ( x)
Value:
(MHZ(x) * 1000ULL)
#define MHZ(x)
A macro to return the Hz in x MHz.
Definition units.h:49

A macro to return the Hz in x GHz.

Definition at line 54 of file units.h.

◆ GiB

#define GiB ( x)
Value:
((unsigned long long)MiB(x) << 10)
#define MiB(x)
A macro to return the bytes in x MiB.
Definition units.h:34

A macro to return the bytes in x GiB.

Definition at line 39 of file units.h.

◆ KHZ

#define KHZ ( x)
Value:
((x) * 1000UL)

A macro to return the Hz in x kHz.

Definition at line 44 of file units.h.

◆ KiB

#define KiB ( x)
Value:
((unsigned long)(x) << 10)

A macro to return the bytes in x KiB.

Definition at line 29 of file units.h.

◆ MHZ

#define MHZ ( x)
Value:
(KHZ(x) * 1000UL)
#define KHZ(x)
A macro to return the Hz in x kHz.
Definition units.h:44

A macro to return the Hz in x MHz.

Definition at line 49 of file units.h.

◆ MiB

#define MiB ( x)
Value:
(KiB(x) << 10)
#define KiB(x)
A macro to return the bytes in x KiB.
Definition units.h:29

A macro to return the bytes in x MiB.

Definition at line 34 of file units.h.