修复了大量存在的问题,增加了假鸭子类型等等机制
This commit is contained in:
@@ -11,7 +11,7 @@ import string
|
||||
|
||||
MPOOL_ALIGN: t.CDefine = 8
|
||||
MPOOL_TYPE_SLAB: t.CDefine = 0
|
||||
MPOOL_TYPE_BUMP: t.CDefine = 2
|
||||
MPOOL_TYPE_BUMP: t.CDefine = 1
|
||||
|
||||
def _align_up(val: t.CSizeT, align: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
@@ -24,8 +24,8 @@ e: t.CDefine = 2.71828182845904523536
|
||||
@t.Object
|
||||
class ndarray:
|
||||
data: t.CDouble | t.CPtr
|
||||
shape: list[t.CSizeT, MAX_NDIM]
|
||||
strides: list[t.CSizeT, MAX_NDIM]
|
||||
shape: t.CArray[t.CSizeT, MAX_NDIM]
|
||||
strides: t.CArray[t.CSizeT, MAX_NDIM]
|
||||
ndim: t.CInt
|
||||
size: t.CSizeT
|
||||
owns_data: t.CInt
|
||||
@@ -64,4 +64,12 @@ CHAR16: t.CTypedef = t.CChar16T
|
||||
CHAR32: t.CTypedef = t.CChar32T
|
||||
CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr
|
||||
CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr
|
||||
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
|
||||
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
|
||||
i8: t.CTypedef = t.CInt8T
|
||||
i16: t.CTypedef = t.CInt16T
|
||||
i32: t.CTypedef = t.CInt32T
|
||||
i64: t.CTypedef = t.CInt64T
|
||||
u8: t.CTypedef = t.CUInt8T
|
||||
u16: t.CTypedef = t.CUInt16T
|
||||
u32: t.CTypedef = t.CUInt32T
|
||||
u64: t.CTypedef = t.CUInt64T
|
||||
25
Test/SimdTest/temp/9dbecd0942a39782.pyi
Normal file
25
Test/SimdTest/temp/9dbecd0942a39782.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Auto-generated Python stub file from testcheck.py
|
||||
Module: testcheck
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
import stdio
|
||||
|
||||
_pass_count: t.CExtern | t.CInt
|
||||
_fail_count: t.CExtern | t.CInt
|
||||
|
||||
def begin(name: str) -> t.CInt: pass
|
||||
|
||||
def section(name: str) -> t.CInt: pass
|
||||
|
||||
def ok(msg: str) -> t.CInt: pass
|
||||
|
||||
def fail(msg: str) -> t.CInt: pass
|
||||
|
||||
def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass
|
||||
|
||||
def info(msg: str) -> t.CInt: pass
|
||||
|
||||
def end() -> t.CInt: pass
|
||||
@@ -1,10 +1,11 @@
|
||||
1b666d438f4d301e:main.py
|
||||
0991af0d22263577:includes/mpool.py
|
||||
1787ce01c2ed0493:includes/numpy\__init__.py
|
||||
3f7c5e78d8652535:includes/vipermath.py
|
||||
56cdd754a8a09347:includes/stdint.py
|
||||
68c4fe4b12c908e3:includes/mpool.py
|
||||
6aee24fdefa3cbc0:includes/string.py
|
||||
49bd8cba55979f76:includes/stdint.py
|
||||
6c2029b306556c00:includes/stdlib.py
|
||||
73edbcf76e32d00b:includes/stdio.py
|
||||
c3eb91093118e1e1:includes/numpy\__init__.py
|
||||
9dbecd0942a39782:includes/testcheck.py
|
||||
b44ac2a895a4072d:main.py
|
||||
b5f1dc665c52a1bd:includes/string.py
|
||||
c9f4be41ca1cc2b4:includes/viperio.py
|
||||
fe99c83946298690:includes/vipersimd.py
|
||||
|
||||
@@ -12,6 +12,7 @@ import stdlib
|
||||
from stdlib import calloc
|
||||
import t, c
|
||||
import mpool
|
||||
import testcheck
|
||||
|
||||
arena: t.CExtern | t.CUInt8T | t.CPtr
|
||||
pool: t.CExtern | mpool.MPool | t.CPtr
|
||||
@@ -20,12 +21,6 @@ def clock() -> t.CLong | t.CExtern: pass
|
||||
|
||||
|
||||
CLOCK_PER_SEC: t.CDefine = 1000
|
||||
test_passed: t.CExtern | t.CInt
|
||||
test_failed: t.CExtern | t.CInt
|
||||
|
||||
def check(name: str, condition: t.CInt, detail: str) -> t.CInt: pass
|
||||
|
||||
def section(title: str) -> t.CInt: pass
|
||||
|
||||
def test_avx2_add_sub_mul_div() -> t.CInt: pass
|
||||
|
||||
@@ -41,4 +41,4 @@ def atoll(src: str) -> t.CInt64T: pass
|
||||
|
||||
def atof(src: str) -> t.CDouble: pass
|
||||
|
||||
def split(s: str, delim: str, result: list[str]) -> int: pass
|
||||
def split(s: str, delim: str, result: t.CArray[str]) -> int: pass
|
||||
Reference in New Issue
Block a user