This class implements processor functions.
More...
#include <Processor.h>
|
| using | Frequency = unsigned int |
| | Definition of a processor operation frequency.
|
| |
This class implements processor functions.
◆ Frequency
Definition of a processor operation frequency.
◆ currentFrequency()
| static Frequency Ocean::Platform::Android::Processor::currentFrequency |
( |
const unsigned int |
core = 0u | ) |
|
|
static |
Returns the current operation frequency of a specified core.
- Parameters
-
| core | The core to return the current frequency for |
- Returns
- Frequency in kHz otherwise invalidFrequency
◆ currentThreadAffinity()
| static bool Ocean::Platform::Android::Processor::currentThreadAffinity |
( |
uint32_t & |
cpuMask | ) |
|
|
static |
Returns the CPU affinity of the current thread.
The affinity defines on which CPU cores the thread is allowed to run.
- Parameters
-
| cpuMask | The affinity mask, each bit is associated with the corresponding CPU |
- Returns
- True, if succeeded
◆ installedCores()
| static unsigned int Ocean::Platform::Android::Processor::installedCores |
( |
| ) |
|
|
static |
Returns the number of installed CPU cores.
- Returns
- Number of installed CPU cores, 0 if the number could not be determined
◆ invalidFrequency()
Returns an invalid frequency.
◆ maxFrequency()
| static Frequency Ocean::Platform::Android::Processor::maxFrequency |
( |
const unsigned int |
core = 0u | ) |
|
|
static |
Returns the maximal operation frequency of a specified core.
- Parameters
-
| core | The core to return the maximal frequency for |
- Returns
- Frequency in kHz otherwise invalidFrequency
◆ minFrequency()
| static Frequency Ocean::Platform::Android::Processor::minFrequency |
( |
const unsigned int |
core = 0u | ) |
|
|
static |
Returns the minimal operation frequency of a specified core.
- Parameters
-
| core | The core to return the minimal frequency for |
- Returns
- Frequency in kHz otherwise invalidFrequency
◆ setCurrentThreadAffinity() [1/2]
| static bool Ocean::Platform::Android::Processor::setCurrentThreadAffinity |
( |
const uint32_t |
cpuMask | ) |
|
|
static |
Sets the CPU affinity of the current thread.
The affinity defines on which CPU cores the thread is allowed to run.
Beware: Depending on the Android device, setting CPU affinity may not be allowed, or may be restricted to a subset of all cores.
- Parameters
-
| cpuMask | The affinity mask, each bit is associated with the corresponding CPU |
- Returns
- True, if succeeded
◆ setCurrentThreadAffinity() [2/2]
| static bool Ocean::Platform::Android::Processor::setCurrentThreadAffinity |
( |
const unsigned int |
firstCPU, |
|
|
const unsigned int |
lastCPU |
|
) |
| |
|
static |
Sets the CPU affinity of the current thread.
The affinity defines on which CPU cores the thread is allowed to run.
This function allows to specify a range of CPUs (not a mask). Beware: Depending on the Android device, setting CPU affinity may not be allowed, or may be restricted to a subset of all cores.
- Parameters
-
| firstCPU | The index of the first CPU to set, with range [0, 31] |
| lastCPU | The index of the last (including) CPU to set, with range [firstCPU, 31] |
- Returns
- True, if succeeded
The documentation for this class was generated from the following file: