l0n0lc 0.8.9__tar.gz → 0.9.1__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.
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/PKG-INFO +30 -15
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/README.md +29 -14
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc/c/345/237/272/347/241/200/345/244/204/347/220/206.py +1 -1
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc.egg-info/PKG-INFO +30 -15
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/pyproject.toml +1 -1
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/LICENSE +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc/StdList.py +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc/StdMap.py +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc/__init__.py +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc/jit.py +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc//347/274/226/350/257/221.py" +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc//351/200/232/347/224/250.py" +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc.egg-info/SOURCES.txt +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc.egg-info/dependency_links.txt +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/l0n0lc.egg-info/top_level.txt +0 -0
- {l0n0lc-0.8.9 → l0n0lc-0.9.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: l0n0lc
|
3
|
-
Version: 0.
|
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"
|
257
|
+
extern "C" int64_t jit_all_ops (int64_t a, int64_t b)
|
243
258
|
{
|
244
259
|
auto x = 42;
|
245
|
-
auto y = ((
|
260
|
+
auto y = ((int64_t)(a + b));
|
246
261
|
auto z = 3.14;
|
247
262
|
auto flag = true;
|
248
|
-
|
249
|
-
|
250
|
-
std::unordered_map<
|
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"
|
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"
|
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,
|
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
|
-
|
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"
|
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"
|
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"
|
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"
|
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"
|
469
|
+
extern "C" int64_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int64_t a, int64_t b);
|
455
470
|
```
|
@@ -224,20 +224,35 @@ vv: 1
|
|
224
224
|
## 4. 查看输出文件
|
225
225
|
```bash
|
226
226
|
ls -al ./l0n0lcoutput
|
227
|
+
total 136
|
228
|
+
drwxr-xr-x 2 root root 4096 Sep 18 01:26 .
|
229
|
+
drwxrwxrwx 11 1000 1000 4096 Sep 18 01:26 ..
|
230
|
+
-rw-r--r-- 1 root root 1693 Sep 18 01:26 jit_all_ops_@0ec883892076cd03.cpp
|
231
|
+
-rw-r--r-- 1 root root 167 Sep 18 01:26 jit_all_ops_@0ec883892076cd03.h
|
232
|
+
-rwxr-xr-x 1 root root 23520 Sep 18 01:26 jit_all_ops_@0ec883892076cd03.so
|
233
|
+
-rw-r--r-- 1 root root 1466 Sep 18 01:26 test_add_@122c4be59097d472.cpp
|
234
|
+
-rw-r--r-- 1 root root 302 Sep 18 01:26 test_add_@122c4be59097d472.h
|
235
|
+
-rwxr-xr-x 1 root root 40216 Sep 18 01:26 test_add_@122c4be59097d472.so
|
236
|
+
-rw-r--r-- 1 root root 121 Sep 18 01:26 test_other_fn_@75fdd928ab58a8e3.cpp
|
237
|
+
-rw-r--r-- 1 root root 106 Sep 18 01:26 test_other_fn_@75fdd928ab58a8e3.h
|
238
|
+
-rwxr-xr-x 1 root root 15616 Sep 18 01:26 test_other_fn_@75fdd928ab58a8e3.so
|
239
|
+
-rw-r--r-- 1 root root 185 Sep 18 01:26 test编译的函数_@3bf4501e0408a243.cpp
|
240
|
+
-rw-r--r-- 1 root root 164 Sep 18 01:26 test编译的函数_@3bf4501e0408a243.h
|
241
|
+
-rwxr-xr-x 1 root root 15656 Sep 18 01:26 test编译的函数_@3bf4501e0408a243.so
|
227
242
|
|
228
243
|
```
|
229
244
|
## 5. jit_all_ops_@0ec883892076cd03.cpp
|
230
245
|
```c++
|
231
246
|
#include "jit_all_ops_@0ec883892076cd03.h"
|
232
|
-
extern "C"
|
247
|
+
extern "C" int64_t jit_all_ops (int64_t a, int64_t b)
|
233
248
|
{
|
234
249
|
auto x = 42;
|
235
|
-
auto y = ((
|
250
|
+
auto y = ((int64_t)(a + b));
|
236
251
|
auto z = 3.14;
|
237
252
|
auto flag = true;
|
238
|
-
|
239
|
-
|
240
|
-
std::unordered_map<
|
253
|
+
int64_t nums[] = {1,2,3};
|
254
|
+
int64_t tup[] = {4,5};
|
255
|
+
std::unordered_map<int64_t, int64_t> mp = {{ 1, 10 },{ 2, 20 }};
|
241
256
|
auto pos = +a;
|
242
257
|
auto neg = -b;
|
243
258
|
auto inv = ~a;
|
@@ -331,12 +346,12 @@ extern "C" int16_t jit_all_ops (int16_t a, int16_t b)
|
|
331
346
|
#include <string>
|
332
347
|
#include <unordered_map>
|
333
348
|
#include <vector>
|
334
|
-
extern "C"
|
349
|
+
extern "C" int64_t jit_all_ops (int64_t a, int64_t b);
|
335
350
|
```
|
336
351
|
## 7. test_add_@122c4be59097d472.cpp
|
337
352
|
```c++
|
338
353
|
#include "test_add_@122c4be59097d472.h"
|
339
|
-
extern "C"
|
354
|
+
extern "C" int64_t test_add (int64_t a, int64_t b)
|
340
355
|
{
|
341
356
|
if ((a > 1))
|
342
357
|
{
|
@@ -354,7 +369,7 @@ extern "C" int16_t test_add (int16_t a, int16_t b)
|
|
354
369
|
}
|
355
370
|
|
356
371
|
a = std::ceil(12.5);;
|
357
|
-
std::unordered_map<std::string,
|
372
|
+
std::unordered_map<std::string, int64_t> cc = {{ u8"a", 1 },{ u8"b", 2 }};
|
358
373
|
cc[u8"c"] = 3;
|
359
374
|
std::cout<< u8"输出map:" << " "<< std::endl;;
|
360
375
|
for (auto ii : cc)
|
@@ -362,7 +377,7 @@ extern "C" int16_t test_add (int16_t a, int16_t b)
|
|
362
377
|
std::cout<< ii.first << " "<< ii.second << " "<< std::endl;;
|
363
378
|
}
|
364
379
|
|
365
|
-
|
380
|
+
int64_t aa[] = {1,3,2};
|
366
381
|
aa[0] = 134;
|
367
382
|
std::cout<< u8"输出list:" << " "<< std::endl;;
|
368
383
|
for (int64_t i = 0; i < 3; ++i)
|
@@ -409,12 +424,12 @@ extern "C" int16_t test_add (int16_t a, int16_t b)
|
|
409
424
|
#include <iostream>
|
410
425
|
#include <string>
|
411
426
|
#include <unordered_map>
|
412
|
-
extern "C"
|
427
|
+
extern "C" int64_t test_add (int64_t a, int64_t b);
|
413
428
|
```
|
414
429
|
## 9. test_other_fn_@75fdd928ab58a8e3.cpp
|
415
430
|
```c++
|
416
431
|
#include "test_other_fn_@75fdd928ab58a8e3.h"
|
417
|
-
extern "C"
|
432
|
+
extern "C" int64_t test_other_fn (int64_t a, int64_t b)
|
418
433
|
{
|
419
434
|
return a - b;
|
420
435
|
}
|
@@ -425,12 +440,12 @@ extern "C" int16_t test_other_fn (int16_t a, int16_t b)
|
|
425
440
|
#pragma once
|
426
441
|
#include <cstdint>
|
427
442
|
#include <string>
|
428
|
-
extern "C"
|
443
|
+
extern "C" int64_t test_other_fn (int64_t a, int64_t b);
|
429
444
|
```
|
430
445
|
## 11. test编译的函数_@3bf4501e0408a243.cpp
|
431
446
|
```c++
|
432
447
|
#include "test编译的函数_@3bf4501e0408a243.h"
|
433
|
-
extern "C"
|
448
|
+
extern "C" int64_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int64_t a, int64_t b)
|
434
449
|
{
|
435
450
|
return a * b;
|
436
451
|
}
|
@@ -441,5 +456,5 @@ extern "C" int16_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e5
|
|
441
456
|
#pragma once
|
442
457
|
#include <cstdint>
|
443
458
|
#include <string>
|
444
|
-
extern "C"
|
459
|
+
extern "C" int64_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int64_t a, int64_t b);
|
445
460
|
```
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: l0n0lc
|
3
|
-
Version: 0.
|
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"
|
257
|
+
extern "C" int64_t jit_all_ops (int64_t a, int64_t b)
|
243
258
|
{
|
244
259
|
auto x = 42;
|
245
|
-
auto y = ((
|
260
|
+
auto y = ((int64_t)(a + b));
|
246
261
|
auto z = 3.14;
|
247
262
|
auto flag = true;
|
248
|
-
|
249
|
-
|
250
|
-
std::unordered_map<
|
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"
|
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"
|
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,
|
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
|
-
|
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"
|
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"
|
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"
|
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"
|
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"
|
469
|
+
extern "C" int64_t /*test编译的函数*/ function_74657374e7bc96e8af91e79a84e587bde695b0 (int64_t a, int64_t b);
|
455
470
|
```
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|