l0n0lc 0.8.9__py3-none-any.whl → 0.9.1__py3-none-any.whl

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.
@@ -59,7 +59,7 @@ def py类型转ctypes类型(类型):
59
59
 
60
60
  额外py转c函数 = []
61
61
  py2c类型映射表 = {
62
- int: cpp类型.INT16_T,
62
+ int: cpp类型.INT64_T,
63
63
  float: cpp类型.FLOAT,
64
64
  str: cpp类型.STRING,
65
65
  bool: cpp类型.BOOL,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.8.9
3
+ Version: 0.9.1
4
4
  Summary: 一个将python函数翻译为c++函数并运行的jit编译器
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.10
@@ -234,20 +234,35 @@ vv: 1
234
234
  ## 4. 查看输出文件
235
235
  ```bash
236
236
  ls -al ./l0n0lcoutput
237
+ total 136
238
+ drwxr-xr-x 2 root root 4096 Sep 18 01:26 .
239
+ drwxrwxrwx 11 1000 1000 4096 Sep 18 01:26 ..
240
+ -rw-r--r-- 1 root root 1693 Sep 18 01:26 jit_all_ops_@0ec883892076cd03.cpp
241
+ -rw-r--r-- 1 root root 167 Sep 18 01:26 jit_all_ops_@0ec883892076cd03.h
242
+ -rwxr-xr-x 1 root root 23520 Sep 18 01:26 jit_all_ops_@0ec883892076cd03.so
243
+ -rw-r--r-- 1 root root 1466 Sep 18 01:26 test_add_@122c4be59097d472.cpp
244
+ -rw-r--r-- 1 root root 302 Sep 18 01:26 test_add_@122c4be59097d472.h
245
+ -rwxr-xr-x 1 root root 40216 Sep 18 01:26 test_add_@122c4be59097d472.so
246
+ -rw-r--r-- 1 root root 121 Sep 18 01:26 test_other_fn_@75fdd928ab58a8e3.cpp
247
+ -rw-r--r-- 1 root root 106 Sep 18 01:26 test_other_fn_@75fdd928ab58a8e3.h
248
+ -rwxr-xr-x 1 root root 15616 Sep 18 01:26 test_other_fn_@75fdd928ab58a8e3.so
249
+ -rw-r--r-- 1 root root 185 Sep 18 01:26 test编译的函数_@3bf4501e0408a243.cpp
250
+ -rw-r--r-- 1 root root 164 Sep 18 01:26 test编译的函数_@3bf4501e0408a243.h
251
+ -rwxr-xr-x 1 root root 15656 Sep 18 01:26 test编译的函数_@3bf4501e0408a243.so
237
252
 
238
253
  ```
239
254
  ## 5. jit_all_ops_@0ec883892076cd03.cpp
240
255
  ```c++
241
256
  #include "jit_all_ops_@0ec883892076cd03.h"
242
- extern "C" int16_t jit_all_ops (int16_t a, int16_t b)
257
+ extern "C" int64_t jit_all_ops (int64_t a, int64_t b)
243
258
  {
244
259
  auto x = 42;
245
- auto y = ((int16_t)(a + b));
260
+ auto y = ((int64_t)(a + b));
246
261
  auto z = 3.14;
247
262
  auto flag = true;
248
- int16_t nums[] = {1,2,3};
249
- int16_t tup[] = {4,5};
250
- std::unordered_map<int16_t, int16_t> mp = {{ 1, 10 },{ 2, 20 }};
263
+ int64_t nums[] = {1,2,3};
264
+ int64_t tup[] = {4,5};
265
+ std::unordered_map<int64_t, int64_t> mp = {{ 1, 10 },{ 2, 20 }};
251
266
  auto pos = +a;
252
267
  auto neg = -b;
253
268
  auto inv = ~a;
@@ -341,12 +356,12 @@ extern "C" int16_t jit_all_ops (int16_t a, int16_t b)
341
356
  #include <string>
342
357
  #include <unordered_map>
343
358
  #include <vector>
344
- extern "C" int16_t jit_all_ops (int16_t a, int16_t b);
359
+ extern "C" int64_t jit_all_ops (int64_t a, int64_t b);
345
360
  ```
346
361
  ## 7. test_add_@122c4be59097d472.cpp
347
362
  ```c++
348
363
  #include "test_add_@122c4be59097d472.h"
349
- extern "C" int16_t test_add (int16_t a, int16_t b)
364
+ extern "C" int64_t test_add (int64_t a, int64_t b)
350
365
  {
351
366
  if ((a > 1))
352
367
  {
@@ -364,7 +379,7 @@ extern "C" int16_t test_add (int16_t a, int16_t b)
364
379
  }
365
380
 
366
381
  a = std::ceil(12.5);;
367
- std::unordered_map<std::string, int16_t> cc = {{ u8"a", 1 },{ u8"b", 2 }};
382
+ std::unordered_map<std::string, int64_t> cc = {{ u8"a", 1 },{ u8"b", 2 }};
368
383
  cc[u8"c"] = 3;
369
384
  std::cout<< u8"输出map:" << " "<< std::endl;;
370
385
  for (auto ii : cc)
@@ -372,7 +387,7 @@ extern "C" int16_t test_add (int16_t a, int16_t b)
372
387
  std::cout<< ii.first << " "<< ii.second << " "<< std::endl;;
373
388
  }
374
389
 
375
- int16_t aa[] = {1,3,2};
390
+ int64_t aa[] = {1,3,2};
376
391
  aa[0] = 134;
377
392
  std::cout<< u8"输出list:" << " "<< std::endl;;
378
393
  for (int64_t i = 0; i < 3; ++i)
@@ -419,12 +434,12 @@ extern "C" int16_t test_add (int16_t a, int16_t b)
419
434
  #include <iostream>
420
435
  #include <string>
421
436
  #include <unordered_map>
422
- extern "C" int16_t test_add (int16_t a, int16_t b);
437
+ extern "C" int64_t test_add (int64_t a, int64_t b);
423
438
  ```
424
439
  ## 9. test_other_fn_@75fdd928ab58a8e3.cpp
425
440
  ```c++
426
441
  #include "test_other_fn_@75fdd928ab58a8e3.h"
427
- extern "C" int16_t test_other_fn (int16_t a, int16_t b)
442
+ extern "C" int64_t test_other_fn (int64_t a, int64_t b)
428
443
  {
429
444
  return a - b;
430
445
  }
@@ -435,12 +450,12 @@ extern "C" int16_t test_other_fn (int16_t a, int16_t b)
435
450
  #pragma once
436
451
  #include <cstdint>
437
452
  #include <string>
438
- extern "C" int16_t test_other_fn (int16_t a, int16_t b);
453
+ extern "C" int64_t test_other_fn (int64_t a, int64_t b);
439
454
  ```
440
455
  ## 11. test编译的函数_@3bf4501e0408a243.cpp
441
456
  ```c++
442
457
  #include "test编译的函数_@3bf4501e0408a243.h"
443
- extern "C" int16_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int16_t a, int16_t b)
458
+ extern "C" int64_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int64_t a, int64_t b)
444
459
  {
445
460
  return a * b;
446
461
  }
@@ -451,5 +466,5 @@ extern "C" int16_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e5
451
466
  #pragma once
452
467
  #include <cstdint>
453
468
  #include <string>
454
- extern "C" int16_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int16_t a, int16_t b);
469
+ extern "C" int64_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int64_t a, int64_t b);
455
470
  ```
@@ -1,12 +1,12 @@
1
1
  l0n0lc/StdList.py,sha256=0NTIpaRrNHaCiLrRbEVob21pZHa8S8rfaBRALPT-tD0,889
2
2
  l0n0lc/StdMap.py,sha256=TIVKqhT078cjLIM0Zlq-TwGFSy-KwOyJe00BLFPVxr8,735
3
3
  l0n0lc/__init__.py,sha256=fUC6TMeN_fEL7HDazrBEdoWOQkXi5uSGZb7LZj6juog,137
4
- l0n0lc/c基础处理.py,sha256=ata-iQTp64kM0Ea_ktfQhaGPrejRzls3YZ7GcnjRlqE,5723
4
+ l0n0lc/c基础处理.py,sha256=GrCPZpLsyfQD8XZQhOCb5y8v9NCZ6bU4C_xfJGx-pvQ,5723
5
5
  l0n0lc/jit.py,sha256=UG5CwhmtD9BJWWiWreFxDCTCFgKgjSOqREhaZuW3sBU,25619
6
6
  l0n0lc/编译.py,sha256=Ty4gPDHAB1jn8LgnE4w3R06bOAEeYr8iwqahYf6QeHI,2154
7
7
  l0n0lc/通用.py,sha256=RkqP9cMhKhl2h4YxOpAWFFftIPXLZTYMyOOD1PuB59M,4630
8
- l0n0lc-0.8.9.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
9
- l0n0lc-0.8.9.dist-info/METADATA,sha256=-R8zwl0NhatjTkk-hIdyeNHOk6MuUEUwIe_0Eq4pdAI,8926
10
- l0n0lc-0.8.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- l0n0lc-0.8.9.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
12
- l0n0lc-0.8.9.dist-info/RECORD,,
8
+ l0n0lc-0.9.1.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
9
+ l0n0lc-0.9.1.dist-info/METADATA,sha256=Dp2vjz7C65AR-9SE__1Trhtw1qVvusPbQVXVutZ4OW4,9960
10
+ l0n0lc-0.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ l0n0lc-0.9.1.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
12
+ l0n0lc-0.9.1.dist-info/RECORD,,
File without changes