| 289 | } |
| 290 | #if defined(__ANDROID__) |
| 291 | std::vector<uint32_t> get_cpu_capacities() |
| 292 | { |
| 293 | std::vector<uint32_t> cpu_capacities; |
| 294 | for (int i = 0; i < get_max_cpus(); ++i) |
| 295 | { |
| 296 | std::stringstream str; |
| 297 | str << "/sys/devices/system/cpu/cpu" << i << "/cpu_capacity"; |
| 298 | std::ifstream file(str.str(), std::ios::in); |
| 299 | if (file.is_open()) |
| 300 | { |
| 301 | std::string line; |
| 302 | if (bool(getline(file, line))) |
| 303 | { |
| 304 | cpu_capacities.emplace_back(support::cpp11::stoul(line)); |
| 305 | } |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | return cpu_capacities; |
| 310 | } |
| 311 | |
| 312 | uint32_t not_little_num_cpus_internal() |
| 313 | { |
no test coverage detected