File tree Expand file tree Collapse file tree 8 files changed +34
-21
lines changed Expand file tree Collapse file tree 8 files changed +34
-21
lines changed Original file line number Diff line number Diff line change 11/** 
22 * @author Bénédikt Tran 
3-  * @seealso @file Tools/cpuinfo/cpuid_features_gen .py 
3+  * @seealso @file Tools/cpuinfo/libcpuinfo/features/cpuid .py 
44 * 
55 * The enumeration describes masks to apply on CPUID output registers. 
66 * 
@@ -37,9 +37,9 @@ extern "C" {
3737
3838/*[python input] 
3939import os, sys 
40- sys.path.insert(0, os.path.realpath(os.path.join(os.getcwd(), "Tools"))) 
41- from cpuinfo.cpuid_features_gen  import generate_cpuid_features_enum  
42- print(generate_cpuid_features_enum ()) 
40+ sys.path.insert(0, os.path.realpath(os.path.join(os.getcwd(), "Tools/cpuinfo "))) 
41+ from libcpuinfo.features.cpuid  import make_cpuid_features_constants  
42+ print(make_cpuid_features_constants ()) 
4343[python start generated code]*/ 
4444// clang-format off 
4545/** Constants for CPUID features */ 
@@ -92,6 +92,10 @@ print(generate_cpuid_features_enum())
9292#define  _Py_CPUID_MASK_EDX_L7S1_AVX_NE_CONVERT       0x00000020  // bit = 5
9393#define  _Py_CPUID_MASK_EDX_L7S1_AVX_VNNI_INT16       0x00000400  // bit = 10
9494// clang-format on 
95- /*[python end generated code: output=e9112f064e2effec input=d7df15fec9f3daa2]*/ 
95+ /*[python end generated code: output=e9112f064e2effec input=71ec6b4356052ec3]*/ 
96+ 
97+ #ifdef  __cplusplus 
98+ }
99+ #endif 
96100
97101#endif  // !Py_INTERNAL_CPUINFO_CPUID_FEATURES_H 
Original file line number Diff line number Diff line change 11/** 
22 * @author Bénédikt Tran 
3-  * @seealso @file Tools/cpuinfo/xsave_features_gen .py 
3+  * @seealso @file Tools/cpuinfo/libcpuinfo/features/xsave .py 
44 * 
55 * XSAVE state components (XCR0 control register). 
66 * 
@@ -22,9 +22,9 @@ extern "C" {
2222
2323/*[python input] 
2424import os, sys 
25- sys.path.insert(0, os.path.realpath(os.path.join(os.getcwd(), "Tools"))) 
26- from cpuinfo.xsave_features_gen  import generate_xsave_features_enum  
27- print(generate_xsave_features_enum ()) 
25+ sys.path.insert(0, os.path.realpath(os.path.join(os.getcwd(), "Tools/cpuinfo "))) 
26+ from libcpuinfo.features.xsave  import make_xsave_features_constants  
27+ print(make_xsave_features_constants ()) 
2828[python start generated code]*/ 
2929// clang-format off 
3030/** Constants for XSAVE components */ 
@@ -34,6 +34,10 @@ print(generate_xsave_features_enum())
3434#define  _Py_XSAVE_MASK_XCR0_AVX512_ZMM_HI256     0x00000040  // bit = 6
3535#define  _Py_XSAVE_MASK_XCR0_AVX512_HI16_ZMM      0x00000080  // bit = 7
3636// clang-format on 
37- /*[python end generated code: output=ac059b802b4317cb input=6323151855b3c9f0]*/ 
37+ /*[python end generated code: output=ac059b802b4317cb input=0a1b0774d3271477]*/ 
38+ 
39+ #ifdef  __cplusplus 
40+ }
41+ #endif 
3842
3943#endif  // !Py_INTERNAL_CPUINFO_XSAVE_FEATURES_H 
Original file line number Diff line number Diff line change 601601      <Filter >Include\internal</Filter >
602602    </ClInclude >
603603    <ClInclude  Include =" ..\Include\internal\pycore_cpuinfo.h"  >
604-       <Filter >Include\cpython </Filter >
604+       <Filter >Include\internal </Filter >
605605    </ClInclude >
606606    <ClInclude  Include =" ..\Include\internal\pycore_cpuinfo_cpuid_features.h"  >
607-       <Filter >Include\cpython </Filter >
607+       <Filter >Include\internal </Filter >
608608    </ClInclude >
609609    <ClInclude  Include =" ..\Include\internal\pycore_cpuinfo_xsave_features.h"  >
610-       <Filter >Include\cpython </Filter >
610+       <Filter >Include\internal </Filter >
611611    </ClInclude >
612612    <ClInclude  Include =" ..\Include\internal\pycore_critical_section.h"  >
613613      <Filter >Include\internal</Filter >
Original file line number Diff line number Diff line change 1212A C enumeration is NOT generated as the largest member may not fit 
1313on an 'int', which is forbidden as ISO C restricts enumerator values 
1414to that range. 
15+ 
16+ .. note:: 
17+ 
18+    This package must not be used directly and should only be 
19+    invoked from an Argument Clinic "[python input]" directive. 
1520""" 
Original file line number Diff line number Diff line change 2323
2424from  __future__ import  annotations 
2525
26- __all__  =  ["generate_cpuid_features_enum " ]
26+ __all__  =  ["make_cpuid_features_constants " ]
2727
2828from  typing  import  TYPE_CHECKING 
2929
30- from  .  import  _util  as  util 
31- from  . _util  import  DOXYGEN_STYLE 
30+ import  libcpuinfo . util  as  util 
31+ from  libcpuinfo . util  import  DOXYGEN_STYLE 
3232
3333if  TYPE_CHECKING :
3434    from  typing  import  Final 
@@ -113,7 +113,7 @@ def get_constant_name(
113113)
114114
115115
116- def  generate_cpuid_features_enum () ->  str :
116+ def  make_cpuid_features_constants () ->  str :
117117    """Used by :file:`Include/internal/pycore_cpuinfo_cpuid_features.h`.""" 
118118    writer  =  util .CWriter ()
119119    writer .comment ("Constants for CPUID features" , style = DOXYGEN_STYLE )
Original file line number Diff line number Diff line change 88
99from  __future__ import  annotations 
1010
11- __all__  =  ["generate_xsave_features_enum " ]
11+ __all__  =  ["make_xsave_features_constants " ]
1212
1313from  typing  import  TYPE_CHECKING 
1414
15- from  .  import  _util  as  util 
16- from  . _util  import  DOXYGEN_STYLE 
15+ import  libcpuinfo . util  as  util 
16+ from  libcpuinfo . util  import  DOXYGEN_STYLE 
1717
1818if  TYPE_CHECKING :
1919    from  typing  import  Final 
@@ -39,7 +39,7 @@ def get_constant_name(feature: Feature) -> str:
3939)
4040
4141
42- def  generate_xsave_features_enum () ->  str :
42+ def  make_xsave_features_constants () ->  str :
4343    """Used by :file:`Include/internal/pycore_cpuinfo_xsave_features.h`.""" 
4444    writer  =  util .CWriter ()
4545    writer .comment ("Constants for XSAVE components" , style = DOXYGEN_STYLE )
File renamed without changes.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments