l0n0lc 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: 用python写c
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.10
@@ -82,7 +82,7 @@ class c函数域:
82
82
  输出(f'return {str(返回值)};\n')
83
83
 
84
84
 
85
- class c_结构体域:
85
+ class c结构体域:
86
86
  def __init__(self, 类型名: str) -> None:
87
87
  self.类型名 = 类型名
88
88
 
@@ -73,6 +73,24 @@ class u64_p(c类型基础):
73
73
  class u64_p_p(c类型基础):
74
74
  类型名 = f'uint64_t**'
75
75
 
76
+ class bf16(c类型基础):
77
+ 类型名 = 'bfloat16_t'
78
+
79
+ class bf16_p(c类型基础):
80
+ 类型名 = f'bfloat16_t*'
81
+
82
+ class bf16_p_p(c类型基础):
83
+ 类型名 = f'bfloat16_t**'
84
+
85
+ class f16(c类型基础):
86
+ 类型名 = 'half'
87
+
88
+ class f16_p(c类型基础):
89
+ 类型名 = f'half*'
90
+
91
+ class f16_p_p(c类型基础):
92
+ 类型名 = f'half**'
93
+
76
94
  class f32(c类型基础):
77
95
  类型名 = 'float'
78
96
 
@@ -1,6 +1,6 @@
1
1
  from .utils import 十进制转换为其他进制
2
2
  from typing import Union, Any, Callable, Type, List
3
- from .c域 import 输出, c函数域, c_结构体域
3
+ from .c域 import 输出, c函数域, c结构体域
4
4
  import inspect
5
5
 
6
6
 
@@ -212,7 +212,7 @@ class 已存在变量(c类型基础):
212
212
  def c结构体():
213
213
  def 装饰函数(fn: Callable):
214
214
  定义 = fn()
215
- with c_结构体域(fn.__name__):
215
+ with c结构体域(fn.__name__):
216
216
  for 字段名, (类型, 默认值) in 定义.items():
217
217
  类型(默认值, 变量名=字段名, 使用等号赋值=True)
218
218
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: 用python写c
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "l0n0lc"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  description = "用python写c"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes