src/os.cc
// Report which cores are associated with a given region.
Report which cores are associated with a given region.
Report which cores are associated with a given region .
cpu_set_t *OsLayer::FindCoreMask(int32 region) {
  sat_assert(region >= 0);
  region %= num_nodes_;
  if (!cpu_sets_valid_[region]) {
    CPU_ZERO(&cpu_sets_[region]);
    for (int i = 0; i < num_cpus_per_node_; ++i) {
      CPU_SET(i + region * num_cpus_per_node_, &cpu_sets_[region]);
    }
    cpu_sets_valid_[region] = true;
    logprintf(5, "Log: Region %d mask 0x%s\n",
                 region, FindCoreMaskFormat(region).c_str());
  }
  return &cpu_sets_[region];
}
cpu_set_t * OsLayer :: FindCoreMask ( int32 region ) { sat_assert ( region >= 0 ) ; region %= num_nodes_ ; if ( ! cpu_sets_valid_ [ region ] ) { CPU_ZERO ( & cpu_sets_ [ region ] ) ; for ( int i = 0 ; i < num_cpus_per_node_ ; ++ i ) { CPU_SET ( i + region * num_cpus_per_node_ , & cpu_sets_ [ region ] ) ; } cpu_sets_valid_ [ region ] = true ; logprintf ( 5 , " \n " , region , FindCoreMaskFormat ( region ) . c_str ( ) ) ; } return & cpu_sets_ [ region ] ; }
Report which cores are associated with a given region.
Report which cores are associated with a given region .