Browse Source

set smp cpu affinity to all cores

tags/20180314
nihui 8 years ago
parent
commit
bc99d5123b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/cpu.cpp

+ 2
- 1
src/cpu.cpp View File

@@ -15,6 +15,7 @@
#include "cpu.h"

#include <stdio.h>
#include <string.h>
#include <vector>

#ifdef _OPENMP
@@ -391,7 +392,7 @@ int set_cpu_powersave(int powersave)
sort_cpuid_by_max_frequency(sorted_cpuids, &little_cluster_offset);
}

if (little_cluster_offset == 0)
if (little_cluster_offset == 0 && powersave != 0)
{
fprintf(stderr, "SMP cpu powersave not supported\n");
return -1;


Loading…
Cancel
Save