5#ifndef FLUTTER_FML_CPU_AFFINITY_H_
6#define FLUTTER_FML_CPU_AFFINITY_H_
82 std::vector<CpuIndexAndSpeed> cpu_speeds_;
83 std::vector<size_t> efficiency_;
84 std::vector<size_t> performance_;
85 std::vector<size_t> not_performance_;
86 std::vector<size_t> not_efficiency_;
A class that computes the correct CPU indices for a requested CPU affinity.
const std::vector< size_t > & GetIndices(CpuAffinity affinity) const
Return the set of CPU indices for the requested CPU affinity.
bool IsValid() const
The class is valid if it has more than one CPU index and a distinct set of efficiency or performance ...
@ kNotEfficiency
Request affinity for all non-efficiency cores.
@ kPerformance
Request CPU affinity for the performance cores.
@ kEfficiency
Request CPU affinity for the efficiency cores.
@ kNotPerformance
Request affinity for all non-performance cores.
std::optional< int64_t > ReadIntFromFile(const std::string &path)
bool RequestAffinity(CpuAffinity affinity)
Request the given affinity for the current thread.
std::optional< size_t > EfficiencyCoreCount()
Request count of efficiency cores.