numbl 0.1.7 → 0.2.0
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.
- package/binding.gyp +53 -2
- package/dist-cli/cli.js +35560 -23939
- package/dist-lib/lib.js +42463 -31995
- package/dist-lib/numbl-core/executeCode.d.ts +20 -0
- package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +7 -2
- package/dist-lib/numbl-core/interpreter/builtins/datetime.d.ts +39 -0
- package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +1 -0
- package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +1 -0
- package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +96 -5
- package/dist-lib/numbl-core/interpreter/interpreter.d.ts +37 -3
- package/dist-lib/numbl-core/interpreter/types.d.ts +1 -1
- package/dist-lib/numbl-core/jit/c/abi.d.ts +90 -0
- package/dist-lib/numbl-core/jit/c/assemble.d.ts +56 -0
- package/dist-lib/numbl-core/jit/c/classify.d.ts +70 -0
- package/dist-lib/numbl-core/jit/c/compile.d.ts +37 -0
- package/dist-lib/numbl-core/jit/c/context.d.ts +152 -0
- package/dist-lib/numbl-core/jit/c/emit/assign.d.ts +20 -0
- package/dist-lib/numbl-core/jit/c/emit/complexScalar.d.ts +18 -0
- package/dist-lib/numbl-core/jit/c/emit/fused.d.ts +42 -0
- package/dist-lib/numbl-core/jit/c/emit/helpers.d.ts +40 -0
- package/dist-lib/numbl-core/jit/c/emit/index.d.ts +14 -0
- package/dist-lib/numbl-core/jit/c/emit/scalar.d.ts +23 -0
- package/dist-lib/numbl-core/jit/c/emit/stmt.d.ts +25 -0
- package/dist-lib/numbl-core/jit/c/emit/tensor.d.ts +127 -0
- package/dist-lib/numbl-core/jit/c/emit/userCall.d.ts +58 -0
- package/dist-lib/numbl-core/jit/c/epilogue.d.ts +26 -0
- package/dist-lib/numbl-core/jit/c/feasibility.d.ts +44 -0
- package/dist-lib/numbl-core/jit/c/hybrid.d.ts +42 -0
- package/dist-lib/numbl-core/jit/c/install.d.ts +15 -0
- package/dist-lib/numbl-core/jit/c/parityError.d.ts +26 -0
- package/dist-lib/numbl-core/jit/c/prelude.d.ts +37 -0
- package/dist-lib/numbl-core/jit/c/registry.d.ts +51 -0
- package/dist-lib/numbl-core/jit/c/visit.d.ts +63 -0
- package/dist-lib/numbl-core/jit/e1/install.d.ts +13 -0
- package/dist-lib/numbl-core/jit/e1/kernelEmit.d.ts +54 -0
- package/dist-lib/numbl-core/jit/e1/openmpFlag.d.ts +13 -0
- package/dist-lib/numbl-core/jit/e1/scalarFnKernel.d.ts +44 -0
- package/dist-lib/numbl-core/jit/fusedChainHelpers.d.ts +65 -0
- package/dist-lib/numbl-core/jit/fusedScalarEmit.d.ts +61 -0
- package/dist-lib/numbl-core/jit/fusion.d.ts +71 -0
- package/dist-lib/numbl-core/jit/fusionOps.d.ts +25 -0
- package/dist-lib/numbl-core/{interpreter/jit → jit}/index.d.ts +2 -2
- package/dist-lib/numbl-core/jit/jitBailSafety.d.ts +41 -0
- package/dist-lib/numbl-core/{interpreter/jit → jit}/jitLoop.d.ts +2 -2
- package/dist-lib/numbl-core/{interpreter/jit → jit}/jitLoopAnalysis.d.ts +6 -1
- package/dist-lib/numbl-core/jit/jitLower.d.ts +122 -0
- package/dist-lib/numbl-core/jit/jitLowerExpr.d.ts +27 -0
- package/dist-lib/numbl-core/jit/jitLowerStmt.d.ts +9 -0
- package/dist-lib/numbl-core/{interpreter/jit → jit}/jitLowerTypes.d.ts +7 -3
- package/dist-lib/numbl-core/jit/jitTopLevel.d.ts +22 -0
- package/dist-lib/numbl-core/{interpreter/jit → jit}/jitTypes.d.ts +133 -1
- package/dist-lib/numbl-core/{interpreter/jit → jit/js}/jitCodegen.d.ts +2 -2
- package/dist-lib/numbl-core/{interpreter/jit → jit/js}/jitCodegenHoist.d.ts +19 -1
- package/dist-lib/numbl-core/{interpreter/jit → jit/js}/jitHelpers.d.ts +15 -3
- package/dist-lib/numbl-core/{interpreter/jit → jit/js}/jitHelpersIndex.d.ts +7 -0
- package/dist-lib/numbl-core/jit/js/jitHelpersTensor.d.ts +34 -0
- package/dist-lib/numbl-core/jit/js/jsFusedCodegen.d.ts +17 -0
- package/dist-lib/numbl-core/jit/scalarEmit.d.ts +58 -0
- package/dist-lib/numbl-core/lexer/types.d.ts +2 -1
- package/dist-lib/numbl-core/native/lapack-bridge.d.ts +39 -1
- package/dist-lib/numbl-core/ops/bessel.d.ts +18 -0
- package/dist-lib/numbl-core/ops/comparison.d.ts +11 -0
- package/dist-lib/numbl-core/ops/complexBinaryElemwise.d.ts +10 -0
- package/dist-lib/numbl-core/ops/complexUnaryElemwise.d.ts +8 -0
- package/dist-lib/numbl-core/ops/dispatch.d.ts +26 -0
- package/dist-lib/numbl-core/ops/index.d.ts +8 -0
- package/dist-lib/numbl-core/ops/opCodes.d.ts +70 -0
- package/dist-lib/numbl-core/ops/realBinaryElemwise.d.ts +8 -0
- package/dist-lib/numbl-core/ops/realUnaryElemwise.d.ts +5 -0
- package/dist-lib/numbl-core/ops/reduce.d.ts +6 -0
- package/dist-lib/numbl-core/parser/types.d.ts +6 -0
- package/dist-lib/numbl-core/runtime/alloc.d.ts +23 -0
- package/dist-lib/numbl-core/runtime/runtime.d.ts +1 -0
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/native/jit_runtime/jit_runtime.c +261 -0
- package/native/jit_runtime/jit_runtime.h +204 -0
- package/native/numbl_addon.cpp +53 -1
- package/native/ops/bessel.c +572 -0
- package/native/ops/comparison.c +150 -0
- package/native/ops/complex_binary_elemwise.c +192 -0
- package/native/ops/complex_unary_elemwise.c +152 -0
- package/native/ops/numbl_ops.c +66 -0
- package/native/ops/numbl_ops.h +262 -0
- package/native/ops/real_binary_elemwise.c +85 -0
- package/native/ops/real_unary_elemwise.c +104 -0
- package/native/ops/reduce.c +162 -0
- package/native/ops_napi.cpp +320 -0
- package/package.json +10 -9
- package/dist-lib/numbl-core/interpreter/jit/jitHelpersTensor.d.ts +0 -28
- package/dist-lib/numbl-core/interpreter/jit/jitLower.d.ts +0 -23
- /package/dist-lib/numbl-core/{interpreter/jit → jit/js}/jitHelpersComplex.d.ts +0 -0
package/binding.gyp
CHANGED
|
@@ -19,10 +19,20 @@
|
|
|
19
19
|
"native/elemwise.cpp",
|
|
20
20
|
"native/randn.cpp",
|
|
21
21
|
"native/unary_elemwise.cpp",
|
|
22
|
-
"native/lapack_gmres.cpp"
|
|
22
|
+
"native/lapack_gmres.cpp",
|
|
23
|
+
"native/ops/numbl_ops.c",
|
|
24
|
+
"native/ops/real_binary_elemwise.c",
|
|
25
|
+
"native/ops/complex_binary_elemwise.c",
|
|
26
|
+
"native/ops/real_unary_elemwise.c",
|
|
27
|
+
"native/ops/complex_unary_elemwise.c",
|
|
28
|
+
"native/ops/comparison.c",
|
|
29
|
+
"native/ops/reduce.c",
|
|
30
|
+
"native/ops/bessel.c",
|
|
31
|
+
"native/ops_napi.cpp"
|
|
23
32
|
],
|
|
24
33
|
"include_dirs": [
|
|
25
34
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
35
|
+
"native/ops",
|
|
26
36
|
"<!@(pkg-config --cflags-only-I fftw3 2>/dev/null | sed 's/-I//g' || true)"
|
|
27
37
|
],
|
|
28
38
|
"dependencies": [
|
|
@@ -31,10 +41,51 @@
|
|
|
31
41
|
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
|
|
32
42
|
"libraries": [
|
|
33
43
|
"-lopenblas",
|
|
44
|
+
"-lmvec",
|
|
45
|
+
"-lm",
|
|
34
46
|
"<!@(pkg-config --libs fftw3 2>/dev/null || echo '-lfftw3')",
|
|
35
47
|
"<!@(pkg-config --libs-only-L fftw3 2>/dev/null | sed 's/-L/-Wl,-rpath,/g' || true)"
|
|
36
48
|
],
|
|
37
|
-
"
|
|
49
|
+
"cflags": [ "-O3", "-march=native", "-fopenmp-simd", "-fno-math-errno", "-ffast-math" ],
|
|
50
|
+
"cflags_c": [ "-O3", "-march=native", "-fopenmp-simd", "-fno-math-errno", "-ffast-math" ],
|
|
51
|
+
"cflags_cc": [ "-std=c++17", "-O3", "-march=native", "-fopenmp-simd", "-fno-math-errno", "-ffast-math" ],
|
|
52
|
+
"conditions": [
|
|
53
|
+
['OS=="linux"', {
|
|
54
|
+
"cflags_c": [ "-fopenmp" ],
|
|
55
|
+
"cflags_cc": [ "-fopenmp" ],
|
|
56
|
+
"libraries": [ "-fopenmp" ]
|
|
57
|
+
}]
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"target_name": "numbl_ops",
|
|
62
|
+
"type": "static_library",
|
|
63
|
+
"sources": [
|
|
64
|
+
"native/ops/numbl_ops.c",
|
|
65
|
+
"native/ops/real_binary_elemwise.c",
|
|
66
|
+
"native/ops/complex_binary_elemwise.c",
|
|
67
|
+
"native/ops/real_unary_elemwise.c",
|
|
68
|
+
"native/ops/complex_unary_elemwise.c",
|
|
69
|
+
"native/ops/comparison.c",
|
|
70
|
+
"native/ops/reduce.c",
|
|
71
|
+
"native/ops/bessel.c"
|
|
72
|
+
],
|
|
73
|
+
"include_dirs": [ "native/ops" ],
|
|
74
|
+
"cflags_c": [ "-O3", "-march=native", "-fopenmp-simd", "-fno-math-errno", "-ffast-math", "-fPIC" ],
|
|
75
|
+
"conditions": [
|
|
76
|
+
['OS=="linux"', {
|
|
77
|
+
"cflags_c": [ "-fopenmp" ]
|
|
78
|
+
}]
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"target_name": "numbl_jit_runtime",
|
|
83
|
+
"type": "static_library",
|
|
84
|
+
"sources": [
|
|
85
|
+
"native/jit_runtime/jit_runtime.c"
|
|
86
|
+
],
|
|
87
|
+
"include_dirs": [ "native/jit_runtime", "native/ops" ],
|
|
88
|
+
"cflags_c": [ "-O3", "-march=native", "-fopenmp-simd", "-fno-math-errno", "-ffast-math", "-fPIC" ]
|
|
38
89
|
}
|
|
39
90
|
]
|
|
40
91
|
}
|