numbl 0.4.19 → 0.4.22
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 +12 -6
- package/dist-browser/browser/index.d.ts +1 -1
- package/dist-browser/browser/mip.d.ts +7 -0
- package/dist-browser/browser/protocol.d.ts +1 -1
- package/dist-browser/browser.js +1 -1
- package/dist-browser/db/operations.d.ts +0 -1
- package/dist-browser/gpuHelper.d.ts +29 -0
- package/dist-browser/hooks/projectFilesState.d.ts +37 -0
- package/dist-browser/numbl-core/execSession.d.ts +39 -0
- package/dist-browser/numbl-core/executeCode.d.ts +10 -1
- package/dist-browser/numbl-core/executors/classification.d.ts +2 -10
- package/dist-browser/numbl-core/executors/jit/backend.d.ts +65 -0
- package/dist-browser/numbl-core/executors/jit/cBackend.d.ts +22 -0
- package/dist-browser/numbl-core/executors/jit/callExecutor.d.ts +13 -44
- package/dist-browser/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
- package/dist-browser/numbl-core/executors/jit/jsBackend.d.ts +15 -0
- package/dist-browser/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
- package/dist-browser/numbl-core/executors/jit/session.d.ts +1 -1
- package/dist-browser/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
- package/dist-browser/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
- package/dist-browser/numbl-core/executors/lowering.d.ts +38 -96
- package/dist-browser/numbl-core/executors/plugins.d.ts +14 -28
- package/dist-browser/numbl-core/executors/registry.d.ts +32 -133
- package/dist-browser/numbl-core/executors/types.d.ts +30 -92
- package/dist-browser/numbl-core/functionResolve.d.ts +3 -13
- package/dist-browser/numbl-core/helpers/check-helpers.d.ts +0 -5
- package/dist-browser/numbl-core/helpers/glob.d.ts +14 -0
- package/dist-browser/numbl-core/helpers/linsolve.d.ts +3 -13
- package/dist-browser/numbl-core/helpers/reduction-helpers.d.ts +2 -4
- package/dist-browser/numbl-core/helpers/shape-utils.d.ts +10 -0
- package/dist-browser/numbl-core/helpers/sparse-direct.d.ts +107 -0
- package/dist-browser/numbl-core/helpers/warn.d.ts +9 -0
- package/dist-browser/numbl-core/interpreter/builtins/index.d.ts +4 -1
- package/dist-browser/numbl-core/interpreter/builtins/sparse-solvers.d.ts +16 -0
- package/dist-browser/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
- package/dist-browser/numbl-core/interpreter/builtins/types.d.ts +7 -7
- package/dist-browser/numbl-core/interpreter/interpreter.d.ts +6 -6
- package/dist-browser/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
- package/dist-browser/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
- package/dist-browser/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
- package/dist-browser/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
- package/dist-browser/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
- package/dist-browser/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
- package/dist-browser/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
- package/dist-browser/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
- package/dist-browser/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
- package/dist-browser/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
- package/dist-browser/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
- package/dist-browser/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
- package/dist-browser/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
- package/dist-browser/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
- package/dist-browser/numbl-core/jit/builtins/registry.d.ts +15 -30
- package/dist-browser/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
- package/dist-browser/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
- package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
- package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
- package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
- package/dist-browser/numbl-core/jit/codegen/emit.d.ts +9 -30
- package/dist-browser/numbl-core/jit/codegen/emitJs.d.ts +9 -27
- package/dist-browser/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
- package/dist-browser/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
- package/dist-browser/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
- package/dist-browser/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
- package/dist-browser/numbl-core/jit/codegen/runtime.d.ts +7 -28
- package/dist-browser/numbl-core/jit/compileSpec.d.ts +3 -6
- package/dist-browser/numbl-core/jit/compileSpecC.d.ts +5 -0
- package/dist-browser/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
- package/dist-browser/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
- package/dist-browser/numbl-core/jit/lowering/errors.d.ts +3 -15
- package/dist-browser/numbl-core/jit/lowering/ir.d.ts +0 -2
- package/dist-browser/numbl-core/jit/lowering/lower.d.ts +4 -12
- package/dist-browser/numbl-core/jit/lowering/types.d.ts +2 -7
- package/dist-browser/numbl-core/jit/numbl/index.d.ts +5 -14
- package/dist-browser/numbl-core/jit/parser/index.d.ts +4 -9
- package/dist-browser/numbl-core/jit/workspace/workspace.d.ts +32 -136
- package/dist-browser/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
- package/dist-browser/numbl-core/jsUserFunctions.d.ts +10 -12
- package/dist-browser/numbl-core/lowering/classInfo.d.ts +4 -1
- package/dist-browser/numbl-core/lowering/loweringContext.d.ts +15 -23
- package/dist-browser/numbl-core/native/lapack-bridge.d.ts +137 -128
- package/dist-browser/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
- package/dist-browser/numbl-core/native/ts-lapack-complex.d.ts +23 -0
- package/dist-browser/numbl-core/native/ts-lapack-eig-hermitian.d.ts +33 -0
- package/dist-browser/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
- package/dist-browser/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
- package/dist-browser/numbl-core/ops/dispatch.d.ts +4 -5
- package/dist-browser/numbl-core/parser/types.d.ts +1 -21
- package/{dist-lib/numbl-core/runtime → dist-browser/numbl-core/plotting}/axisCommand.d.ts +2 -2
- package/dist-browser/{graphics → numbl-core/plotting}/axisLimits.d.ts +14 -2
- package/dist-browser/numbl-core/plotting/builtins.d.ts +8 -0
- package/dist-browser/numbl-core/plotting/colormaps.d.ts +10 -0
- package/dist-browser/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
- package/dist-browser/numbl-core/plotting/imagescExtent.d.ts +19 -0
- package/dist-browser/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
- package/dist-browser/numbl-core/plotting/parseArgsChart.d.ts +94 -0
- package/dist-browser/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
- package/dist-browser/numbl-core/plotting/parseArgsLine.d.ts +103 -0
- package/dist-browser/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
- package/dist-browser/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
- package/dist-browser/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
- package/dist-browser/numbl-core/plotting/streamline.d.ts +16 -0
- package/{dist-graphics/graphics → dist-browser/numbl-core/plotting}/types.d.ts +9 -7
- package/dist-browser/numbl-core/runtime/cow.d.ts +0 -8
- package/dist-browser/numbl-core/runtime/refcount.d.ts +0 -3
- package/dist-browser/numbl-core/runtime/registerSpecial.d.ts +15 -0
- package/dist-browser/numbl-core/runtime/runtime.d.ts +11 -35
- package/dist-browser/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
- package/dist-browser/numbl-core/runtime/specialBuiltins.d.ts +3 -9
- package/dist-browser/numbl-core/runtime/types.d.ts +12 -0
- package/dist-browser/numbl-core/runtime/uihtmlSession.d.ts +5 -13
- package/dist-browser/numbl-core/runtime/utils.d.ts +4 -1
- package/dist-browser/numbl-core/version.d.ts +1 -1
- package/dist-browser/numbl-core/workspace/workspace.d.ts +64 -0
- package/dist-browser/ts-lapack/src/BLAS/dsymv.d.ts +1 -0
- package/dist-browser/ts-lapack/src/BLAS/dsyr2.d.ts +1 -0
- package/dist-browser/ts-lapack/src/SRC/dlae2.d.ts +4 -0
- package/dist-browser/ts-lapack/src/SRC/dlaev2.d.ts +6 -0
- package/dist-browser/ts-lapack/src/SRC/dlanst.d.ts +1 -0
- package/dist-browser/ts-lapack/src/SRC/dlansy.d.ts +1 -0
- package/dist-browser/ts-lapack/src/SRC/dlasrt.d.ts +1 -0
- package/dist-browser/ts-lapack/src/SRC/dorgtr.d.ts +1 -0
- package/dist-browser/ts-lapack/src/SRC/dsteqr.d.ts +4 -0
- package/dist-browser/ts-lapack/src/SRC/dsyev.d.ts +1 -0
- package/dist-browser/ts-lapack/src/SRC/dsytd2.d.ts +1 -0
- package/dist-browser/vfs/syncVfsChanges.d.ts +2 -2
- package/dist-cli/cli.js +74241 -77271
- package/dist-graphics/graphics/FigureView.d.ts +1 -1
- package/dist-graphics/graphics/SurfView.d.ts +3 -2
- package/dist-graphics/graphics/drawPlot.d.ts +1 -1
- package/dist-graphics/graphics/exportFigureHdf5.d.ts +1 -1
- package/dist-graphics/graphics/figureHashTransport.d.ts +1 -1
- package/dist-graphics/graphics/figureUpload.d.ts +1 -1
- package/dist-graphics/graphics/importFigureHdf5.d.ts +1 -1
- package/dist-graphics/graphics/openInFigureViewer.d.ts +1 -1
- package/dist-graphics/graphics/plotHelpers.d.ts +1 -1
- package/dist-graphics/graphics/plotLegend.d.ts +1 -1
- package/dist-graphics/graphics/plotMarkers.d.ts +1 -1
- package/dist-graphics/graphics/restoreNaNs.d.ts +1 -1
- package/dist-graphics/graphics/uihtmlRelay.d.ts +16 -0
- package/dist-graphics/graphics-lib.d.ts +3 -3
- package/dist-graphics/index.js +294 -328
- package/{dist-lib/graphics → dist-graphics/numbl-core/plotting}/axisLimits.d.ts +14 -2
- package/dist-graphics/numbl-core/plotting/colormaps.d.ts +10 -0
- package/dist-graphics/numbl-core/plotting/imagescExtent.d.ts +19 -0
- package/{dist-browser/graphics → dist-graphics/numbl-core/plotting}/types.d.ts +9 -7
- package/dist-lib/browser/mip.d.ts +17 -0
- package/dist-lib/cli-scan.d.ts +8 -1
- package/dist-lib/lib.d.ts +1 -1
- package/dist-lib/lib.js +37081 -39889
- package/dist-lib/node.js +22 -14
- package/dist-lib/numbl-core/execSession.d.ts +39 -0
- package/dist-lib/numbl-core/executeCode.d.ts +10 -1
- package/dist-lib/numbl-core/executors/classification.d.ts +2 -10
- package/dist-lib/numbl-core/executors/jit/backend.d.ts +65 -0
- package/dist-lib/numbl-core/executors/jit/cBackend.d.ts +22 -0
- package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +13 -44
- package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
- package/dist-lib/numbl-core/executors/jit/jsBackend.d.ts +15 -0
- package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
- package/dist-lib/numbl-core/executors/jit/session.d.ts +1 -1
- package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
- package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
- package/dist-lib/numbl-core/executors/lowering.d.ts +38 -96
- package/dist-lib/numbl-core/executors/plugins.d.ts +14 -28
- package/dist-lib/numbl-core/executors/registry.d.ts +32 -133
- package/dist-lib/numbl-core/executors/types.d.ts +30 -92
- package/dist-lib/numbl-core/functionResolve.d.ts +3 -13
- package/dist-lib/numbl-core/helpers/check-helpers.d.ts +0 -5
- package/dist-lib/numbl-core/helpers/glob.d.ts +14 -0
- package/dist-lib/numbl-core/helpers/linsolve.d.ts +3 -13
- package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +2 -4
- package/dist-lib/numbl-core/helpers/shape-utils.d.ts +10 -0
- package/dist-lib/numbl-core/helpers/sparse-direct.d.ts +107 -0
- package/dist-lib/numbl-core/helpers/warn.d.ts +9 -0
- package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +4 -1
- package/dist-lib/numbl-core/interpreter/builtins/sparse-solvers.d.ts +16 -0
- package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
- package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +7 -7
- package/dist-lib/numbl-core/interpreter/interpreter.d.ts +6 -6
- package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
- package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
- package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
- package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
- package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
- package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
- package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
- package/dist-lib/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
- package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
- package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
- package/dist-lib/numbl-core/jit/builtins/registry.d.ts +15 -30
- package/dist-lib/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
- package/dist-lib/numbl-core/jit/codegen/emit.d.ts +9 -30
- package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +9 -27
- package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
- package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
- package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
- package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
- package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +7 -28
- package/dist-lib/numbl-core/jit/compileSpec.d.ts +3 -6
- package/dist-lib/numbl-core/jit/compileSpecC.d.ts +5 -0
- package/dist-lib/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
- package/dist-lib/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
- package/dist-lib/numbl-core/jit/lowering/errors.d.ts +3 -15
- package/dist-lib/numbl-core/jit/lowering/ir.d.ts +0 -2
- package/dist-lib/numbl-core/jit/lowering/lower.d.ts +4 -12
- package/dist-lib/numbl-core/jit/lowering/types.d.ts +2 -7
- package/dist-lib/numbl-core/jit/numbl/index.d.ts +5 -14
- package/dist-lib/numbl-core/jit/parser/index.d.ts +4 -9
- package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +32 -136
- package/dist-lib/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
- package/dist-lib/numbl-core/jsUserFunctions.d.ts +10 -12
- package/dist-lib/numbl-core/lowering/classInfo.d.ts +4 -1
- package/dist-lib/numbl-core/lowering/loweringContext.d.ts +15 -23
- package/dist-lib/numbl-core/native/lapack-bridge.d.ts +137 -128
- package/dist-lib/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
- package/dist-lib/numbl-core/native/ts-lapack-complex.d.ts +23 -0
- package/dist-lib/numbl-core/native/ts-lapack-eig-hermitian.d.ts +33 -0
- package/dist-lib/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
- package/dist-lib/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
- package/dist-lib/numbl-core/ops/dispatch.d.ts +4 -5
- package/dist-lib/numbl-core/parser/types.d.ts +1 -21
- package/{dist-browser/numbl-core/runtime → dist-lib/numbl-core/plotting}/axisCommand.d.ts +2 -2
- package/{dist-graphics/graphics → dist-lib/numbl-core/plotting}/axisLimits.d.ts +14 -2
- package/dist-lib/numbl-core/plotting/builtins.d.ts +8 -0
- package/dist-lib/numbl-core/plotting/colormaps.d.ts +10 -0
- package/dist-lib/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
- package/dist-lib/numbl-core/plotting/imagescExtent.d.ts +19 -0
- package/dist-lib/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
- package/dist-lib/numbl-core/plotting/parseArgsChart.d.ts +94 -0
- package/dist-lib/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
- package/dist-lib/numbl-core/plotting/parseArgsLine.d.ts +103 -0
- package/dist-lib/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
- package/dist-lib/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
- package/dist-lib/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
- package/dist-lib/numbl-core/plotting/streamline.d.ts +16 -0
- package/dist-lib/{graphics → numbl-core/plotting}/types.d.ts +9 -7
- package/dist-lib/numbl-core/runtime/cow.d.ts +0 -8
- package/dist-lib/numbl-core/runtime/refcount.d.ts +0 -3
- package/dist-lib/numbl-core/runtime/registerSpecial.d.ts +15 -0
- package/dist-lib/numbl-core/runtime/runtime.d.ts +11 -35
- package/dist-lib/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
- package/dist-lib/numbl-core/runtime/specialBuiltins.d.ts +3 -9
- package/dist-lib/numbl-core/runtime/types.d.ts +12 -0
- package/dist-lib/numbl-core/runtime/uihtmlSession.d.ts +5 -13
- package/dist-lib/numbl-core/runtime/utils.d.ts +4 -1
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/dist-lib/numbl-core/workspace/workspace.d.ts +64 -0
- package/dist-lib/ts-lapack/src/BLAS/dsymv.d.ts +1 -0
- package/dist-lib/ts-lapack/src/BLAS/dsyr2.d.ts +1 -0
- package/dist-lib/ts-lapack/src/SRC/dlae2.d.ts +4 -0
- package/dist-lib/ts-lapack/src/SRC/dlaev2.d.ts +6 -0
- package/dist-lib/ts-lapack/src/SRC/dlanst.d.ts +1 -0
- package/dist-lib/ts-lapack/src/SRC/dlansy.d.ts +1 -0
- package/dist-lib/ts-lapack/src/SRC/dlasrt.d.ts +1 -0
- package/dist-lib/ts-lapack/src/SRC/dorgtr.d.ts +1 -0
- package/dist-lib/ts-lapack/src/SRC/dsteqr.d.ts +4 -0
- package/dist-lib/ts-lapack/src/SRC/dsyev.d.ts +1 -0
- package/dist-lib/ts-lapack/src/SRC/dsytd2.d.ts +1 -0
- package/dist-lib/vfs/unzipToFiles.d.ts +7 -0
- package/dist-plot-viewer/assets/index-C0fIevlp.js +4504 -0
- package/dist-plot-viewer/index.html +1 -1
- package/dist-site-viewer/assets/index-BDaviCH6.js +4832 -0
- package/dist-site-viewer/assets/numbl-worker-D6m4K2PP.js +5691 -0
- package/dist-site-viewer/index.html +2 -2
- package/native/lapack_eig.cpp +156 -0
- package/native/numbl_addon.cpp +8 -12
- package/native/numbl_addon_common.h +14 -5
- package/package.json +6 -5
- package/dist-browser/hooks/useProjectFiles.d.ts +0 -45
- package/dist-browser/numbl-core/executors/context.d.ts +0 -76
- package/dist-browser/numbl-core/executors/index.d.ts +0 -14
- package/dist-browser/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
- package/dist-browser/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
- package/dist-browser/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
- package/dist-browser/numbl-core/helpers/dummy.d.ts +0 -5
- package/dist-browser/numbl-core/jit/runtime/context.d.ts +0 -23
- package/dist-browser/numbl-core/jit/runtime/inferType.d.ts +0 -10
- package/dist-browser/numbl-core/jit/runtime/value.d.ts +0 -101
- package/dist-browser/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
- package/dist-browser/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
- package/dist-browser/numbl-core/native/bridge-resolve.d.ts +0 -14
- package/dist-browser/numbl-core/runtime/plotUtils.d.ts +0 -336
- package/dist-browser/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
- package/dist-graphics/graphics/surfColormap.d.ts +0 -2
- package/dist-lib/numbl-core/executors/context.d.ts +0 -76
- package/dist-lib/numbl-core/executors/index.d.ts +0 -14
- package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
- package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
- package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
- package/dist-lib/numbl-core/helpers/dummy.d.ts +0 -5
- package/dist-lib/numbl-core/jit/runtime/context.d.ts +0 -23
- package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +0 -10
- package/dist-lib/numbl-core/jit/runtime/value.d.ts +0 -101
- package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
- package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
- package/dist-lib/numbl-core/native/bridge-resolve.d.ts +0 -14
- package/dist-lib/numbl-core/runtime/plotUtils.d.ts +0 -336
- package/dist-lib/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
- package/dist-plot-viewer/assets/index-YeXWXIxH.js +0 -4504
- package/dist-site-viewer/assets/index-B5Y5557F.js +0 -4831
- package/dist-site-viewer/assets/numbl-worker-CtoT7C0f.js +0 -5355
- package/native/elemwise.cpp +0 -360
- package/native/unary_elemwise.cpp +0 -67
- /package/dist-browser/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
- /package/dist-graphics/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
- /package/dist-lib/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* cjit-call — C-backed JIT executor for user-function calls.
|
|
3
|
-
*
|
|
4
|
-
* Mirrors `callExecutor.ts` (the JS-emit sibling) but routes the
|
|
5
|
-
* specialization's emitted code through `compileSpecC` →
|
|
6
|
-
* `cc -shared -fPIC -O3` → `dlopen` via koffi instead of
|
|
7
|
-
* `new Function(source)`. The dispatch, gating, and caching
|
|
8
|
-
* conventions are otherwise identical, so a sibling executor can
|
|
9
|
-
* register alongside the JS path at the same opt level without any
|
|
10
|
-
* arbitration in the dispatcher beyond cost-based selection.
|
|
11
|
-
*
|
|
12
|
-
* Declines when:
|
|
13
|
-
* - `nativeBridge` / `koffi` are not available (browser).
|
|
14
|
-
* - Any param or output type fails the C-FFI feasibility check
|
|
15
|
-
* (`compilerTypeToCDecl` returns null).
|
|
16
|
-
* - mtoc2 throws `UnsupportedConstruct` / `JitTypeError` at lowering.
|
|
17
|
-
*/
|
|
18
|
-
import type { Executor } from "../types.js";
|
|
19
|
-
import { type JitType } from "../../jitTypes.js";
|
|
20
|
-
import type { FunctionDef } from "../../interpreter/types.js";
|
|
21
|
-
import { type Type as CompilerType, type SpecCSignature } from "../../jit/index.js";
|
|
22
|
-
import { type CompiledC } from "./compileC.js";
|
|
23
|
-
interface CJitCallData {
|
|
24
|
-
readonly fn: FunctionDef;
|
|
25
|
-
readonly nargout: number;
|
|
26
|
-
readonly argTypes: readonly JitType[];
|
|
27
|
-
readonly compilerArgTypes: readonly CompilerType[];
|
|
28
|
-
readonly args: readonly unknown[];
|
|
29
|
-
}
|
|
30
|
-
interface CompiledArtifact {
|
|
31
|
-
readonly compiled: CompiledC;
|
|
32
|
-
readonly signature: SpecCSignature;
|
|
33
|
-
}
|
|
34
|
-
export declare const cJitCallExecutor: Executor<CJitCallData, CompiledArtifact | null>;
|
|
35
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* cjit-loop — C-backed JIT executor for outermost For/While
|
|
3
|
-
* loops. Mirrors `loopExecutor.ts` (JS-emit sibling) but routes
|
|
4
|
-
* through `compileSpecC` → `cc -shared` → `koffi`. See
|
|
5
|
-
* `cJitCallExecutor.ts` for the marshaling protocol; this file just
|
|
6
|
-
* adapts the loop-shape `data` to the same C-side pipeline.
|
|
7
|
-
*/
|
|
8
|
-
import type { Executor } from "../types.js";
|
|
9
|
-
import { type JitType } from "../../jitTypes.js";
|
|
10
|
-
import type { Stmt } from "../../parser/index.js";
|
|
11
|
-
import type { ConstHandle } from "../classification.js";
|
|
12
|
-
import { type Type as CompilerType, type SpecCSignature } from "../../jit/index.js";
|
|
13
|
-
import { type CompiledC } from "./compileC.js";
|
|
14
|
-
interface CJitLoopData {
|
|
15
|
-
readonly loopStmt: Stmt & {
|
|
16
|
-
type: "For" | "While";
|
|
17
|
-
};
|
|
18
|
-
readonly inputs: readonly string[];
|
|
19
|
-
readonly outputs: readonly string[];
|
|
20
|
-
readonly inputTypes: readonly JitType[];
|
|
21
|
-
readonly compilerInputTypes: readonly CompilerType[];
|
|
22
|
-
readonly constHandles: readonly ConstHandle[];
|
|
23
|
-
readonly currentFile: string;
|
|
24
|
-
readonly cacheKey: string;
|
|
25
|
-
}
|
|
26
|
-
interface CompiledArtifact {
|
|
27
|
-
readonly compiled: CompiledC;
|
|
28
|
-
readonly signature: SpecCSignature;
|
|
29
|
-
}
|
|
30
|
-
export declare const cJitLoopExecutor: Executor<CJitLoopData, CompiledArtifact | null>;
|
|
31
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* cjit-top-level — C-backed JIT executor for whole-script bodies.
|
|
3
|
-
*
|
|
4
|
-
* Mirrors `topLevelExecutor.ts` (JS-emit sibling) but routes through
|
|
5
|
-
* `compileSpecC` → `cc -shared` → `koffi`. See `cJitCallExecutor.ts`
|
|
6
|
-
* for the marshaling protocol. Same `isAllSuppressed` gate as the JS
|
|
7
|
-
* sibling so `displayAssign`/`displayResult` semantics stay on the
|
|
8
|
-
* interpreter path.
|
|
9
|
-
*/
|
|
10
|
-
import type { Executor } from "../types.js";
|
|
11
|
-
import { type JitType } from "../../jitTypes.js";
|
|
12
|
-
import type { Stmt } from "../../parser/index.js";
|
|
13
|
-
import { type Type as CompilerType, type SpecCSignature } from "../../jit/index.js";
|
|
14
|
-
import { type CompiledC } from "./compileC.js";
|
|
15
|
-
interface CJitTopLevelData {
|
|
16
|
-
readonly stmts: readonly Stmt[];
|
|
17
|
-
readonly inputs: readonly string[];
|
|
18
|
-
readonly outputs: readonly string[];
|
|
19
|
-
readonly inputTypes: readonly JitType[];
|
|
20
|
-
readonly compilerInputTypes: readonly CompilerType[];
|
|
21
|
-
readonly currentFile: string;
|
|
22
|
-
readonly cacheKey: string;
|
|
23
|
-
}
|
|
24
|
-
interface CompiledArtifact {
|
|
25
|
-
readonly compiled: CompiledC;
|
|
26
|
-
readonly signature: SpecCSignature;
|
|
27
|
-
}
|
|
28
|
-
export declare const cJitTopLevelExecutor: Executor<CJitTopLevelData, CompiledArtifact | null>;
|
|
29
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Host bag passed to `Builtin.call` for the interpreter backend.
|
|
3
|
-
*
|
|
4
|
-
* Mirrors nexl's `RuntimeContext`. Side-effecty builtins (`disp`,
|
|
5
|
-
* `fprintf`, `error`, plot dispatch, …) consult `helpers.write` to
|
|
6
|
-
* emit text. Pure builtins ignore the bag.
|
|
7
|
-
*
|
|
8
|
-
* `write` is the JS analogue of C's `printf`. The CLI provides one
|
|
9
|
-
* backed by `process.stdout.write`; the browser provides one that
|
|
10
|
-
* pushes lines to the console panel; future test runners provide
|
|
11
|
-
* one that captures into a buffer for byte-for-byte comparison.
|
|
12
|
-
*
|
|
13
|
-
* As the interpreter grows, additional hooks (`time`, `plot`,
|
|
14
|
-
* `error`, …) will join this bag. Adding a hook here is the
|
|
15
|
-
* single source of truth — every host supplies it.
|
|
16
|
-
*/
|
|
17
|
-
export interface RuntimeHelpers {
|
|
18
|
-
/** Append text to stdout. No implicit newline. */
|
|
19
|
-
write(s: string): void;
|
|
20
|
-
}
|
|
21
|
-
export interface RuntimeContext {
|
|
22
|
-
helpers: RuntimeHelpers;
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Map a runtime value back into a Type. Used by the interpreter to
|
|
3
|
-
* feed `argTypes` into a builtin's `transfer` (for validation) and
|
|
4
|
-
* `call` (for type-dispatched implementations) — so that the three
|
|
5
|
-
* hooks (`emitC`, `emitJs`, `call`) all branch on the same `argTypes`
|
|
6
|
-
* shape rather than reinventing dispatch per-backend.
|
|
7
|
-
*/
|
|
8
|
-
import { type Type } from "../lowering/types.js";
|
|
9
|
-
import { type RuntimeValue } from "./value.js";
|
|
10
|
-
export declare function inferTypeFromValue(v: RuntimeValue): Type;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runtime value carrier for the interpreter backend. Mirrors nexl's
|
|
3
|
-
* `RuntimeValue` design: a discriminated-via-typeof union for the
|
|
4
|
-
* common cases plus tagged-object wrappers for the kinds JS can't
|
|
5
|
-
* distinguish natively.
|
|
6
|
-
*
|
|
7
|
-
* MVP scope (Phase 3): real-double scalars, booleans (logical),
|
|
8
|
-
* strings (double-quoted), chars (single-quoted), real-double tensors.
|
|
9
|
-
* Complex / structs / classes / handles / void / cells follow as the
|
|
10
|
-
* type lattice and interpreter coverage expand.
|
|
11
|
-
*
|
|
12
|
-
* Builtin `call` implementations narrow via `typeof` / `isTensor` /
|
|
13
|
-
* `isChar` and dispatch through the same `argTypes` shape that
|
|
14
|
-
* `emitC` / `emitJs` consume — keeping the three backends parallel.
|
|
15
|
-
*/
|
|
16
|
-
export type RuntimeValue = number | boolean | string | RuntimeTensor | RuntimeChar | RuntimeComplex | RuntimeStruct | RuntimeHandle;
|
|
17
|
-
/** Function handle. Named handles (`@foo`) keep the source name and
|
|
18
|
-
* dispatch via the interpreter's normal call-site resolution at the
|
|
19
|
-
* call point. Anonymous handles (`@(p1, ...) body`) capture every
|
|
20
|
-
* visible binding by value at the @-site and run `body` in a fresh
|
|
21
|
-
* env when invoked. */
|
|
22
|
-
export type RuntimeHandle = {
|
|
23
|
-
readonly mtoc2Handle: true;
|
|
24
|
-
readonly kind: "named";
|
|
25
|
-
readonly name: string;
|
|
26
|
-
} | {
|
|
27
|
-
readonly mtoc2Handle: true;
|
|
28
|
-
readonly kind: "anon";
|
|
29
|
-
readonly params: ReadonlyArray<string>;
|
|
30
|
-
readonly body: unknown;
|
|
31
|
-
readonly captures: Readonly<Record<string, RuntimeValue>>;
|
|
32
|
-
};
|
|
33
|
-
/** Narrow a RuntimeValue to a function handle. */
|
|
34
|
-
export declare function isHandleValue(v: RuntimeValue): v is RuntimeHandle;
|
|
35
|
-
/** Struct/object — plain JS object whose keys are field names. The
|
|
36
|
-
* c-aot path emits a typedef'd C struct; the JS path just uses a
|
|
37
|
-
* bare object. Recurses through field values that may themselves be
|
|
38
|
-
* any RuntimeValue (including nested structs). */
|
|
39
|
-
export type RuntimeStruct = {
|
|
40
|
-
readonly [field: string]: RuntimeValue;
|
|
41
|
-
};
|
|
42
|
-
/** Real or complex double tensor. `data` is the real lane,
|
|
43
|
-
* column-major to match numbl's `RuntimeTensor.data`. `imag` is the
|
|
44
|
-
* imaginary lane (same length and orientation as `data`); absent for
|
|
45
|
-
* real-only tensors. Mirrors the C representation's split-buffer
|
|
46
|
-
* layout — codegen / interpreter dispatch on `imag !== undefined`
|
|
47
|
-
* the way the C side dispatches on `imag != NULL`. The shape array
|
|
48
|
-
* is owned by the value; do not mutate.
|
|
49
|
-
*
|
|
50
|
-
* `isLogical` flags this tensor as the result of a logical operation
|
|
51
|
-
* (`~`, `<`, `==`, `&&`, …) so downstream index-slot resolution can
|
|
52
|
-
* treat it as a mask instead of an IndexVec — same role as numbl's
|
|
53
|
-
* `_isLogical` on its RuntimeTensor. The flag is one-way (once set,
|
|
54
|
-
* stays set across copies via the helper) and absent on numeric
|
|
55
|
-
* tensors; helper sites that don't care leave it undefined. */
|
|
56
|
-
export interface RuntimeTensor {
|
|
57
|
-
readonly mtoc2Tag: "tensor";
|
|
58
|
-
readonly shape: number[];
|
|
59
|
-
readonly data: Float64Array;
|
|
60
|
-
readonly imag?: Float64Array;
|
|
61
|
-
readonly isLogical?: boolean;
|
|
62
|
-
}
|
|
63
|
-
/** Single-quoted char-array (`'foo'`). Distinct from `"foo"` strings
|
|
64
|
-
* because numbl treats them differently: `length('foo') === 3` but
|
|
65
|
-
* `length("foo") === 1`. */
|
|
66
|
-
export interface RuntimeChar {
|
|
67
|
-
readonly mtoc2Tag: "char";
|
|
68
|
-
readonly value: string;
|
|
69
|
-
}
|
|
70
|
-
/** Scalar complex value — JS-side analogue of the `mtoc2_complex_t`
|
|
71
|
-
* struct in `cscalar.h`. The cscalar runtime helpers
|
|
72
|
-
* (`mtoc2_cmake`, `mtoc2_creal`, etc.) consume and produce this
|
|
73
|
-
* shape. We DON'T tag it the way tensor / char are tagged because
|
|
74
|
-
* emitJs literals (`{re: 0, im: 1}`) and runtime calls produce the
|
|
75
|
-
* bare object form — adding a tag would force every helper to
|
|
76
|
-
* re-wrap. Use `isComplexValue` for narrowing. */
|
|
77
|
-
export interface RuntimeComplex {
|
|
78
|
-
readonly re: number;
|
|
79
|
-
readonly im: number;
|
|
80
|
-
}
|
|
81
|
-
/** Narrow a RuntimeValue to a complex scalar. Matches the cscalar
|
|
82
|
-
* helpers' `{re, im}` shape. */
|
|
83
|
-
export declare function isComplexValue(v: RuntimeValue): v is RuntimeComplex;
|
|
84
|
-
export declare function makeTensor(shape: number[], data: Float64Array): RuntimeTensor;
|
|
85
|
-
/** Complex tensor with both lanes. `data` is the real lane, `imag`
|
|
86
|
-
* the imaginary lane; both must have the same length and match the
|
|
87
|
-
* product of `shape`. */
|
|
88
|
-
export declare function makeComplexTensor(shape: number[], data: Float64Array, imag: Float64Array): RuntimeTensor;
|
|
89
|
-
/** True iff this tensor carries an imaginary lane. */
|
|
90
|
-
export declare function isComplexTensor(v: RuntimeTensor): boolean;
|
|
91
|
-
export declare function makeChar(value: string): RuntimeChar;
|
|
92
|
-
export declare function isTensor(v: RuntimeValue): v is RuntimeTensor;
|
|
93
|
-
export declare function isChar(v: RuntimeValue): v is RuntimeChar;
|
|
94
|
-
/** Materialize a scalar value as a plain JS number. Used by builtins
|
|
95
|
-
* that need to treat scalar tensors and scalar numbers uniformly. */
|
|
96
|
-
export declare function toScalarNumber(v: RuntimeValue): number;
|
|
97
|
-
/** MATLAB-style truthiness — for `if` / `while` / `&&` / `||`.
|
|
98
|
-
* Scalar non-zero, all-elements-non-zero for tensors, nonempty
|
|
99
|
-
* text. The interpreter uses this; codegen relies on the matching
|
|
100
|
-
* C-side `__nonzero` helpers. */
|
|
101
|
-
export declare function isTruthy(v: RuntimeValue): boolean;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Driver-script prologue extractor.
|
|
3
|
-
*
|
|
4
|
-
* mtoc2 accepts `addpath(<literal>, ...)` only as a leading sequence
|
|
5
|
-
* of top-level statements in the driver script. Each call is parsed
|
|
6
|
-
* into a list of directory arguments (literal strings only) plus an
|
|
7
|
-
* optional trailing `-begin` / `-end` flag.
|
|
8
|
-
*
|
|
9
|
-
* Two call sites:
|
|
10
|
-
* - The CLI invokes the extractor before scanning the filesystem so
|
|
11
|
-
* it knows which directories to fold into the workspace search
|
|
12
|
-
* path.
|
|
13
|
-
* - `translateProject` / the interpreter run path invoke it purely
|
|
14
|
-
* to drop the prologue statements from the driver AST before
|
|
15
|
-
* lowering / execution begins. The dirs are ignored there.
|
|
16
|
-
*
|
|
17
|
-
* The two calls are idempotent: same input AST → same dirs and
|
|
18
|
-
* remaining body, so it doesn't matter that they parse twice.
|
|
19
|
-
*
|
|
20
|
-
* Any `addpath` left in the AST (anywhere outside the leading prefix)
|
|
21
|
-
* still hits the `addpath` builtin's `transfer`, which errors with a
|
|
22
|
-
* span-attributed message. `rmpath` / `savepath` are always rejected
|
|
23
|
-
* by their own `transfer` hooks; the extractor never accepts them.
|
|
24
|
-
*
|
|
25
|
-
* Function-file auto-invoke: a driver whose body (after the prologue)
|
|
26
|
-
* contains only function/classdef definitions and no top-level
|
|
27
|
-
* statements is a "function file" — running it means calling its
|
|
28
|
-
* first function with zero arguments. The extractor appends a
|
|
29
|
-
* synthesized 0-arg call so every execution path (interpreter,
|
|
30
|
-
* js-aot, c-aot) treats it the same way. Mirrors numbl's
|
|
31
|
-
* `Interpreter.run` (interpreter.ts).
|
|
32
|
-
*/
|
|
33
|
-
import type { AbstractSyntaxTree, Stmt, Span } from "../parser/index.js";
|
|
34
|
-
export interface AddPathDir {
|
|
35
|
-
/** Directory string as the user wrote it. Relative paths are NOT
|
|
36
|
-
* resolved here; callers resolve against `process.cwd()`. */
|
|
37
|
-
dir: string;
|
|
38
|
-
/** Whether the directory inserts at the front of the addpath block
|
|
39
|
-
* (default / `-begin`) or after the CLI `--path` dirs at the end
|
|
40
|
-
* (`-end`). */
|
|
41
|
-
position: "begin" | "end";
|
|
42
|
-
/** Span of the originating `addpath(...)` call. */
|
|
43
|
-
span: Span;
|
|
44
|
-
}
|
|
45
|
-
export interface DriverPrologueOpts {
|
|
46
|
-
/** Set to `true` when a filesystem is available to resolve dirs
|
|
47
|
-
* against (CLI). When `false` or omitted (web IDE, in-memory
|
|
48
|
-
* translate, vitest), any leading `addpath` call is itself an
|
|
49
|
-
* `UnsupportedConstruct`. */
|
|
50
|
-
allowAddpath?: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface DriverPrologueResult {
|
|
53
|
-
addpaths: AddPathDir[];
|
|
54
|
-
/** Top-level statements after the prologue. Suitable for direct
|
|
55
|
-
* use with `Lowerer.lowerProgram` (via a shallow AST copy with
|
|
56
|
-
* this `body`) or `Interpreter.runProgram`. */
|
|
57
|
-
remainingBody: Stmt[];
|
|
58
|
-
}
|
|
59
|
-
export declare function extractDriverPrologue(ast: AbstractSyntaxTree, opts?: DriverPrologueOpts): DriverPrologueResult;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Loader for `.mtoc2.js` user functions.
|
|
3
|
-
*
|
|
4
|
-
* A `.mtoc2.js` file is plain JavaScript with no mtoc2 dependency.
|
|
5
|
-
* The loader evaluates it as a CommonJS-style module (`exports` and
|
|
6
|
-
* `module.exports` are the only injected names) and reads four
|
|
7
|
-
* exports to assemble a workspace-scoped `Builtin`:
|
|
8
|
-
*
|
|
9
|
-
* exports.name — string, must match the file's basename.
|
|
10
|
-
* exports.transfer — (argTypes, nargout) -> Type[]. Raw mtoc2 Type
|
|
11
|
-
* objects in, raw Type objects out. Throws
|
|
12
|
-
* `Error` on bad input.
|
|
13
|
-
* exports.emit — ({argsC, prefix, ...}) -> string. C expression
|
|
14
|
-
* for the call. Use `prefix` to name any private
|
|
15
|
-
* C helpers (kept collision-free across files).
|
|
16
|
-
* exports.cBody — ({prefix}) -> string. C source (helper
|
|
17
|
-
* function definitions) injected once per
|
|
18
|
-
* translation unit. Use the same `prefix` as
|
|
19
|
-
* `emit`.
|
|
20
|
-
* exports.cHeaders? — string[] of additional `#include` lines to
|
|
21
|
-
* activate (optional).
|
|
22
|
-
*
|
|
23
|
-
* Prefix shape: `mtoc2_user_<safe_funcname>__<8hex>__` where the hex
|
|
24
|
-
* is the FNV-1a hash of the workspace-relative file path. Including
|
|
25
|
-
* the path in the hash makes the prefix unique across all `.mtoc2.js`
|
|
26
|
-
* files in the workspace, even if two files happen to define
|
|
27
|
-
* functions with overlapping internal names.
|
|
28
|
-
*/
|
|
29
|
-
import type { Builtin } from "../builtins/registry.js";
|
|
30
|
-
/** Resolved sibling file: the relative path (used by the build to
|
|
31
|
-
* pick a unique on-disk name) plus the file's text. */
|
|
32
|
-
export interface ResolvedCSource {
|
|
33
|
-
/** Path as written by the user in `exports.cSources` (e.g.
|
|
34
|
-
* `"impl.c"` or `"sub/helpers.h"`). */
|
|
35
|
-
relPath: string;
|
|
36
|
-
/** File text the build will write to disk. */
|
|
37
|
-
source: string;
|
|
38
|
-
}
|
|
39
|
-
/** Loader output: the assembled `Builtin` plus the user-supplied C
|
|
40
|
-
* sibling files the framework needs to thread through to the build
|
|
41
|
-
* pipeline. */
|
|
42
|
-
export interface LoadedUserFunction {
|
|
43
|
-
builtin: Builtin;
|
|
44
|
-
cSources: ResolvedCSource[];
|
|
45
|
-
}
|
|
46
|
-
/** Evaluate a `.mtoc2.js` file and return its assembled `Builtin`
|
|
47
|
-
* plus the user-supplied sibling C files (`cSources`).
|
|
48
|
-
*
|
|
49
|
-
* - `fileName` — the .mtoc2.js's full path (used for diagnostics and
|
|
50
|
-
* to resolve sibling paths).
|
|
51
|
-
* - `expectedName` — what numbl's workspace registered the file
|
|
52
|
-
* under (derived from the file's basename / package path); we
|
|
53
|
-
* validate the user's `exports.name` matches so a typo / rename
|
|
54
|
-
* surfaces here rather than at the first call site.
|
|
55
|
-
* - `relPath` — workspace-relative path used for the prefix hash.
|
|
56
|
-
* - `readSibling(p)` — given a path-key relative to the .mtoc2.js's
|
|
57
|
-
* directory, return the sibling file's source text. Used to pull
|
|
58
|
-
* `cSources` entries out of the workspace's file map (which is
|
|
59
|
-
* the same regardless of CLI vs web IDE). Returns `undefined` if
|
|
60
|
-
* the file is not in the workspace; the loader throws a clear
|
|
61
|
-
* error pointing at the missing path. */
|
|
62
|
-
export declare function loadMtoc2UserFunction(fileName: string, source: string, expectedName: string, relPath: string, readSibling: (siblingRelPath: string) => string | undefined): LoadedUserFunction;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centralized LAPACK bridge resolution with fallback and one-time logging.
|
|
3
|
-
*
|
|
4
|
-
* Tries the native bridge first; falls back to ts-lapack (pure TypeScript).
|
|
5
|
-
*/
|
|
6
|
-
import { type LapackBridge } from "./lapack-bridge.js";
|
|
7
|
-
/**
|
|
8
|
-
* Get the effective LAPACK bridge for a given operation.
|
|
9
|
-
*
|
|
10
|
-
* @param opName Operation name for logging (e.g. "inv", "qr")
|
|
11
|
-
* @param method Optional method to check on native bridge. If native bridge
|
|
12
|
-
* lacks this method, falls back to ts-lapack.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getEffectiveBridge(opName: string, method?: keyof LapackBridge): LapackBridge;
|