Lines Matching defs:level

205   for (int level = 0; level < depth; ++level) {
209 __kmp_topology->get_type(level) == KMP_HW_CORE &&
217 if (ahwthread->ids[level] == bhwthread->ids[level])
219 // If the hardware id is unknown for this level, then place hardware thread
221 if (ahwthread->ids[level] == UNKNOWN_ID)
223 else if (bhwthread->ids[level] == UNKNOWN_ID)
225 else if (ahwthread->ids[level] < bhwthread->ids[level])
227 else if (ahwthread->ids[level] > bhwthread->ids[level])
459 // Fallback is to set last level cache to socket or core
555 for (int level = above_level + 1; level <= core_level; ++level) {
556 if (hw_thread.ids[level] != previous_id[level]) {
563 for (int level = 0; level < depth; ++level)
564 previous_id[level] = hw_thread.ids[level];
574 for (int level = 0; level < depth; ++level)
575 num *= ratio[level];
778 // the core and thread level
780 for (int level = 0; level < depth; ++level)
781 print_types[print_types_depth++] = types[level];
783 // Force in the core level for quick topology
803 for (int plevel = 0, level = 0; plevel < print_types_depth; ++plevel) {
811 c = get_ratio(level++);
857 for (int level = 0; level < depth; ++level) {
858 if (hw_threads[i].ids[level] == kmp_hw_thread_t::UNKNOWN_ID)
860 kmp_hw_t type = types[level];
862 __kmp_str_buf_print(&buf, "%d ", hw_threads[i].ids[level]);
931 // If more than one processor group exists, and the level of
937 // restrict the granularity down to the processor group level.
979 for (int level = 0; level < depth; ++level) {
981 KMP_ASSERT(count[level] > 0 && ratio[level] > 0);
982 KMP_ASSERT_VALID_HW_TYPE(types[level]);
984 KMP_ASSERT(equivalent[types[level]] == types[level]);
994 for (int level = 0; level < depth; ++level) {
995 count[level] = 0;
996 ratio[level] = 0;
1095 int level = get_level(type);
1096 topology_levels[i] = level;
1118 max_count = get_ratio(level);
1130 if (core_level == level) {
1263 auto is_targeted = [&](int level) {
1266 if (topology_levels[i] == level)
1305 for (int level = 0; level < get_depth(); ++level) {
1306 if (hw_thread.sub_ids[level] != prev_sub_ids[level]) {
1308 for (int j = level; j < get_depth(); ++j) {
1328 for (int level = 0; level < get_depth(); ++level)
1329 prev_sub_ids[level] = hw_thread.sub_ids[level];
1337 int level = topology_levels[hw_subset_index];
1338 if (level == -1)
1340 if ((using_core_effs || using_core_types) && level == core_level) {
1378 sub_id = abs_sub_ids[level];
1380 sub_id = hw_thread.sub_ids[level];
1381 if (hw_thread.ids[level] == kmp_hw_thread_t::UNKNOWN_ID ||
2063 // If multiple Windows* OS processor groups exist, we can create a 2-level
2064 // topology map with the groups at level 0 and the individual procs at level 1.
2161 unsigned level = 0;
2164 return level == rhs.level && mask == rhs.mask;
2169 table[MAX_CACHE_LEVEL].level = 0;
2187 // If level does not exist, then return the "NULL" level (level 0)
2188 const info_t &get_level(unsigned level) const {
2190 if (table[i].level == level)
2196 static kmp_hw_t get_topology_type(unsigned level) {
2197 KMP_DEBUG_ASSERT(level >= 1 && level <= MAX_CACHE_LEVEL);
2198 switch (level) {
2209 unsigned level = 0;
2214 __kmp_x86_cpuid(4, level, &buf2);
2220 level++;
2226 table[depth].level = cache_level;
2229 level++;
2582 * CPUID.B or 1F, Input ECX (sub leaf # aka level number)
2588 EBX| reserved | Num logical processors at level (16 bits) |
2597 INTEL_LEVEL_TYPE_INVALID = 0, // Package level
2693 unsigned level, levels_index;
2706 level = levels_index = 0;
2708 __kmp_x86_cpuid(leaf, level, &buf);
2718 // Add a new level to the topology
2725 // If it is an unknown level, then logically move the previous layer up
2731 level++;
2769 // If this processor has level type not on other processors, then make
2776 // If this level is known already, then skip it.
2779 // Unknown level, insert before last known level
2783 // Move over all known levels to make room for new level
2788 // Insert new level
2992 unsigned cache_level = cache_info[0][i].level;
3009 unsigned cache_level = cache_info[i][j].level;
3018 // See if any cache level needs to be added manually through cache Ids
3020 for (unsigned level = 1; level <= cpuid_cache_info_t::MAX_CACHE_LEVEL;
3021 ++level) {
3022 kmp_hw_t cache_type = cpuid_cache_info_t::get_topology_type(level);
3044 // if cache level not in topology for this processor, then skip
3045 if (info.level == 0)
3250 unsigned level;
3251 if (KMP_SSCANF(buf, "node_%u id", &level) == 1) {
3253 if (level > (unsigned)__kmp_xproc) { // level is too big
3254 level = __kmp_xproc;
3256 if (nodeIdIndex + level >= maxIndex) {
3257 maxIndex = nodeIdIndex + level;
3340 // Get the SRAD system detail level.
3404 // Create an inner scoping level, so that all the goto targets at the end of
3405 // the loop appear in an outer scoping level. This avoids warnings about
3549 unsigned level;
3550 if (KMP_SSCANF(buf, "node_%u id", &level) == 1) {
3556 // validate the input before using level:
3557 if (level > (unsigned)__kmp_xproc) { // level is too big
3558 level = __kmp_xproc;
3560 if (threadInfo[num_avail][nodeIdIndex + level] != UINT_MAX)
3562 threadInfo[num_avail][nodeIdIndex + level] = val;
3642 // If it is configured to omit the package level when there is only a single
3813 // Count the number of levels which have more nodes at that level than at the
3814 // parent's level (with there being an implicit root node of the top level).
3815 // This is equivalent to saying that there is at least one node at this level
3816 // which has a sibling. These levels are in the map, and the package level is
3889 // If the thread level does not have ids, then put them in.
3898 // Check if socket, core, anything above thread level changed.
3964 // considering the last level, which must be the thread id. All threads on a
4578 // This function figures out the deepest level at which there is at least one
4596 // This function counts number of clusters/cores at given level.
4621 // cluster/core at given level.
4653 for (int level = 0; level < depth; ++level) {
4654 kmp_hw_t type = __kmp_topology->get_type(level);
4655 int id = hw_thread.sub_ids[level];
4660 // and mark every level below as such as well.
4662 for (; level < depth; ++level) {
4663 kmp_hw_t type = __kmp_topology->get_type(level);
5058 // checking for validity of each id at granularity level specified.
5577 // Turn off 4.0 affinity for the current tread at this parallel level.