File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
2424 include_directories (BEFORE SYSTEM ${DISPATCH_INCLUDES} )
2525 dispatch_windows_lib_for_arch(${CMAKE_SYSTEM_PROCESSOR} DISPATCH_LIBDIR)
2626 link_directories (${DISPATCH_LIBDIR} )
27+
28+ include (CheckCSourceCompiles)
29+ check_c_source_compiles([=[
30+ #include <Windows.h>
31+ int main(int argc, char *argv[]) {
32+ switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
33+ case RelationProcessorDie:
34+ case RelationNumaNodeEx:
35+ return 0;
36+ }
37+ return 0;
38+ }
39+ ]=] DISPATCH_HAVE_EXTENDED_SLPI_20348)
40+ if (DISPATCH_HAVE_EXTENDED_SLPI_20348)
41+ add_compile_definitions (DISPATCH_HAVE_EXTENDED_SLPI_20348)
42+ endif ()
2743endif ()
2844
2945set (CMAKE_C_STANDARD 11)
Original file line number Diff line number Diff line change @@ -156,8 +156,14 @@ _dispatch_hw_get_config(_dispatch_hw_config_t c)
156156 ++ dwProcessorPhysicalCount ;
157157 dwProcessorLogicalCount += __popcnt64 (slpiCurrent -> ProcessorMask );
158158 break ;
159+ #if defined(DISPATCH_HAVE_EXTENDED_SLPI_20348 )
160+ case RelationProcessorDie :
161+ #endif
159162 case RelationProcessorPackage :
160163 case RelationNumaNode :
164+ #if defined(DISPATCH_HAVE_EXTENDED_SLPI_20348 )
165+ case RelationNumaNodeEx :
166+ #endif
161167 case RelationCache :
162168 case RelationGroup :
163169 case RelationAll :
You can’t perform that action at this time.
0 commit comments