numbl 0.1.6 → 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.
Files changed (105) hide show
  1. package/binding.gyp +53 -2
  2. package/dist-cli/cli.js +38743 -24679
  3. package/dist-lib/lib.js +43424 -30466
  4. package/dist-lib/numbl-core/executeCode.d.ts +22 -0
  5. package/dist-lib/numbl-core/helpers/bessel.d.ts +9 -0
  6. package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +7 -2
  7. package/dist-lib/numbl-core/interpreter/builtins/datetime.d.ts +39 -0
  8. package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +1 -0
  9. package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +1 -0
  10. package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +100 -5
  11. package/dist-lib/numbl-core/interpreter/interpreter.d.ts +41 -3
  12. package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +2 -0
  13. package/dist-lib/numbl-core/interpreter/types.d.ts +16 -7
  14. package/dist-lib/numbl-core/jit/c/abi.d.ts +90 -0
  15. package/dist-lib/numbl-core/jit/c/assemble.d.ts +56 -0
  16. package/dist-lib/numbl-core/jit/c/classify.d.ts +70 -0
  17. package/dist-lib/numbl-core/jit/c/compile.d.ts +37 -0
  18. package/dist-lib/numbl-core/jit/c/context.d.ts +152 -0
  19. package/dist-lib/numbl-core/jit/c/emit/assign.d.ts +20 -0
  20. package/dist-lib/numbl-core/jit/c/emit/complexScalar.d.ts +18 -0
  21. package/dist-lib/numbl-core/jit/c/emit/fused.d.ts +42 -0
  22. package/dist-lib/numbl-core/jit/c/emit/helpers.d.ts +40 -0
  23. package/dist-lib/numbl-core/jit/c/emit/index.d.ts +14 -0
  24. package/dist-lib/numbl-core/jit/c/emit/scalar.d.ts +23 -0
  25. package/dist-lib/numbl-core/jit/c/emit/stmt.d.ts +25 -0
  26. package/dist-lib/numbl-core/jit/c/emit/tensor.d.ts +127 -0
  27. package/dist-lib/numbl-core/jit/c/emit/userCall.d.ts +58 -0
  28. package/dist-lib/numbl-core/jit/c/epilogue.d.ts +26 -0
  29. package/dist-lib/numbl-core/jit/c/feasibility.d.ts +44 -0
  30. package/dist-lib/numbl-core/jit/c/hybrid.d.ts +42 -0
  31. package/dist-lib/numbl-core/jit/c/install.d.ts +15 -0
  32. package/dist-lib/numbl-core/jit/c/parityError.d.ts +26 -0
  33. package/dist-lib/numbl-core/jit/c/prelude.d.ts +37 -0
  34. package/dist-lib/numbl-core/jit/c/registry.d.ts +51 -0
  35. package/dist-lib/numbl-core/jit/c/visit.d.ts +63 -0
  36. package/dist-lib/numbl-core/jit/e1/install.d.ts +13 -0
  37. package/dist-lib/numbl-core/jit/e1/kernelEmit.d.ts +54 -0
  38. package/dist-lib/numbl-core/jit/e1/openmpFlag.d.ts +13 -0
  39. package/dist-lib/numbl-core/jit/e1/scalarFnKernel.d.ts +44 -0
  40. package/dist-lib/numbl-core/jit/fusedChainHelpers.d.ts +65 -0
  41. package/dist-lib/numbl-core/jit/fusedScalarEmit.d.ts +61 -0
  42. package/dist-lib/numbl-core/jit/fusion.d.ts +71 -0
  43. package/dist-lib/numbl-core/jit/fusionOps.d.ts +25 -0
  44. package/dist-lib/numbl-core/{interpreter/jit → jit}/index.d.ts +2 -2
  45. package/dist-lib/numbl-core/jit/jitBailSafety.d.ts +41 -0
  46. package/dist-lib/numbl-core/{interpreter/jit → jit}/jitLoop.d.ts +2 -2
  47. package/dist-lib/numbl-core/{interpreter/jit → jit}/jitLoopAnalysis.d.ts +13 -1
  48. package/dist-lib/numbl-core/jit/jitLower.d.ts +122 -0
  49. package/dist-lib/numbl-core/jit/jitLowerExpr.d.ts +27 -0
  50. package/dist-lib/numbl-core/jit/jitLowerStmt.d.ts +9 -0
  51. package/dist-lib/numbl-core/jit/jitLowerTypes.d.ts +29 -0
  52. package/dist-lib/numbl-core/jit/jitTopLevel.d.ts +22 -0
  53. package/dist-lib/numbl-core/jit/jitTypes.d.ts +394 -0
  54. package/dist-lib/numbl-core/jit/js/jitCodegen.d.ts +7 -0
  55. package/dist-lib/numbl-core/jit/js/jitCodegenHoist.d.ts +70 -0
  56. package/dist-lib/numbl-core/jit/js/jitHelpers.d.ts +34 -0
  57. package/dist-lib/numbl-core/jit/js/jitHelpersComplex.d.ts +21 -0
  58. package/dist-lib/numbl-core/jit/js/jitHelpersIndex.d.ts +33 -0
  59. package/dist-lib/numbl-core/jit/js/jitHelpersTensor.d.ts +34 -0
  60. package/dist-lib/numbl-core/jit/js/jsFusedCodegen.d.ts +17 -0
  61. package/dist-lib/numbl-core/jit/scalarEmit.d.ts +58 -0
  62. package/dist-lib/numbl-core/lexer/types.d.ts +2 -1
  63. package/dist-lib/numbl-core/native/lapack-bridge.d.ts +46 -1
  64. package/dist-lib/numbl-core/ops/bessel.d.ts +18 -0
  65. package/dist-lib/numbl-core/ops/comparison.d.ts +11 -0
  66. package/dist-lib/numbl-core/ops/complexBinaryElemwise.d.ts +10 -0
  67. package/dist-lib/numbl-core/ops/complexUnaryElemwise.d.ts +8 -0
  68. package/dist-lib/numbl-core/ops/dispatch.d.ts +26 -0
  69. package/dist-lib/numbl-core/ops/index.d.ts +8 -0
  70. package/dist-lib/numbl-core/ops/opCodes.d.ts +70 -0
  71. package/dist-lib/numbl-core/ops/realBinaryElemwise.d.ts +8 -0
  72. package/dist-lib/numbl-core/ops/realUnaryElemwise.d.ts +5 -0
  73. package/dist-lib/numbl-core/ops/reduce.d.ts +6 -0
  74. package/dist-lib/numbl-core/parser/types.d.ts +6 -0
  75. package/dist-lib/numbl-core/runtime/alloc.d.ts +23 -0
  76. package/dist-lib/numbl-core/runtime/constructors.d.ts +2 -1
  77. package/dist-lib/numbl-core/runtime/error.d.ts +3 -0
  78. package/dist-lib/numbl-core/runtime/index.d.ts +1 -1
  79. package/dist-lib/numbl-core/runtime/runtime.d.ts +15 -2
  80. package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +11 -0
  81. package/dist-lib/numbl-core/runtime/types.d.ts +16 -1
  82. package/dist-lib/numbl-core/runtime/utils.d.ts +3 -1
  83. package/dist-lib/numbl-core/version.d.ts +1 -1
  84. package/dist-plot-viewer/assets/{index-vtrJ8bml.js → index-GiUNnMQg.js} +1 -1
  85. package/dist-plot-viewer/index.html +1 -1
  86. package/native/elemwise.cpp +134 -0
  87. package/native/jit_runtime/jit_runtime.c +261 -0
  88. package/native/jit_runtime/jit_runtime.h +204 -0
  89. package/native/numbl_addon.cpp +55 -1
  90. package/native/numbl_addon_common.h +1 -0
  91. package/native/ops/bessel.c +572 -0
  92. package/native/ops/comparison.c +150 -0
  93. package/native/ops/complex_binary_elemwise.c +192 -0
  94. package/native/ops/complex_unary_elemwise.c +152 -0
  95. package/native/ops/numbl_ops.c +66 -0
  96. package/native/ops/numbl_ops.h +262 -0
  97. package/native/ops/real_binary_elemwise.c +85 -0
  98. package/native/ops/real_unary_elemwise.c +104 -0
  99. package/native/ops/reduce.c +162 -0
  100. package/native/ops_napi.cpp +320 -0
  101. package/package.json +11 -10
  102. package/dist-lib/numbl-core/interpreter/jit/jitCodegen.d.ts +0 -5
  103. package/dist-lib/numbl-core/interpreter/jit/jitHelpers.d.ts +0 -14
  104. package/dist-lib/numbl-core/interpreter/jit/jitLower.d.ts +0 -20
  105. package/dist-lib/numbl-core/interpreter/jit/jitTypes.d.ts +0 -168
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
- "cflags_cc": [ "-std=c++17", "-O3", "-march=native" ]
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
  }