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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument parsers for gridded data: surf, mesh, pcolor, imagesc, contour
|
|
3
|
+
* (including the MATLAB contour matrix), and heatmap.
|
|
4
|
+
*/
|
|
5
|
+
import { type RuntimeValue } from "../runtime/types.js";
|
|
6
|
+
import type { SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, HeatmapTrace } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Parse surf() arguments.
|
|
9
|
+
*
|
|
10
|
+
* Supported forms:
|
|
11
|
+
* surf(Z) — Z is m×n, X = 1:n, Y = 1:m
|
|
12
|
+
* surf(Z, C) — Z is m×n, C is m×n color data
|
|
13
|
+
* surf(X, Y, Z) — X, Y, Z are m×n matrices (or X is 1×n / Y is m×1)
|
|
14
|
+
* surf(X, Y, Z, C) — with explicit color data
|
|
15
|
+
* surf(..., Name, Value) — name-value pairs
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseSurfArgs(args: RuntimeValue[]): SurfTrace;
|
|
18
|
+
/**
|
|
19
|
+
* Parse pcolor() arguments.
|
|
20
|
+
*
|
|
21
|
+
* Supported forms:
|
|
22
|
+
* pcolor(C) — C is m×n, X = 1:n, Y = 1:m
|
|
23
|
+
* pcolor(X, Y, C) — X, Y, C are m×n matrices (or X is 1×n / Y is m×1)
|
|
24
|
+
* pcolor(..., Name, Value) — name-value pairs (EdgeColor, FaceAlpha)
|
|
25
|
+
*/
|
|
26
|
+
export declare function parsePcolorArgs(args: RuntimeValue[]): PcolorTrace;
|
|
27
|
+
/**
|
|
28
|
+
* Parse imagesc() arguments.
|
|
29
|
+
*
|
|
30
|
+
* Supported forms:
|
|
31
|
+
* imagesc(C) — C is m×n matrix
|
|
32
|
+
* imagesc(x, y, C) — x and y are vectors defining axis limits
|
|
33
|
+
* imagesc(..., clims) — clims = [low high] sets the axes' color limits
|
|
34
|
+
*/
|
|
35
|
+
export declare function parseImagescArgs(args: RuntimeValue[]): {
|
|
36
|
+
trace: ImagescTrace;
|
|
37
|
+
clims?: [number, number];
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Parse contour()/contourf() arguments.
|
|
41
|
+
*
|
|
42
|
+
* Supported forms:
|
|
43
|
+
* contour(Z)
|
|
44
|
+
* contour(Z, N)
|
|
45
|
+
* contour(X, Y, Z)
|
|
46
|
+
* contour(X, Y, Z, N)
|
|
47
|
+
* contour(..., Name, Value)
|
|
48
|
+
*/
|
|
49
|
+
export declare function parseContourArgs(args: RuntimeValue[], filled: boolean): ContourTrace;
|
|
50
|
+
/** Result of computing contour geometry: the MATLAB contour matrix `C`
|
|
51
|
+
* (column-major `2 × n` data) plus the level list actually used. */
|
|
52
|
+
export interface ContourMatrix {
|
|
53
|
+
/** Column-major `2 × n` data for a `RTV.tensor(data, [2, n])`. */
|
|
54
|
+
data: number[];
|
|
55
|
+
n: number;
|
|
56
|
+
levelList: number[];
|
|
57
|
+
}
|
|
58
|
+
/** Compute the MATLAB contour matrix for a parsed contour trace via marching
|
|
59
|
+
* squares. Each marching-squares segment is emitted as its own two-vertex
|
|
60
|
+
* contour line (header `[level; 2]` followed by the two `[x; y]` vertices) —
|
|
61
|
+
* a valid contour matrix whose geometry matches MATLAB's connected polylines
|
|
62
|
+
* segment-for-segment. */
|
|
63
|
+
export declare function computeContourMatrix(trace: ContourTrace): ContourMatrix;
|
|
64
|
+
/**
|
|
65
|
+
* Parse mesh() arguments — same as surf but with different default rendering.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseMeshArgs(args: RuntimeValue[]): SurfTrace;
|
|
68
|
+
/**
|
|
69
|
+
* Parse heatmap() arguments.
|
|
70
|
+
*
|
|
71
|
+
* Supported forms:
|
|
72
|
+
* heatmap(cdata) — matrix of values
|
|
73
|
+
* heatmap(xvalues, yvalues, cdata) — with axis labels
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseHeatmapArgs(args: RuntimeValue[]): HeatmapTrace;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* streamline / stream2: trace 2-D streamlines through a gridded vector field.
|
|
3
|
+
*/
|
|
4
|
+
import type { RuntimeValue } from "../runtime/index.js";
|
|
5
|
+
import type { PlotInstruction } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* streamline(X,Y,U,V,startX,startY) — compute and plot 2D streamlines.
|
|
8
|
+
* streamline(verts) — plot from pre-computed cell array of vertex matrices.
|
|
9
|
+
* Returns a dummy graphics handle.
|
|
10
|
+
*/
|
|
11
|
+
export declare function streamlineCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): RuntimeValue;
|
|
12
|
+
/**
|
|
13
|
+
* stream2(X,Y,U,V,startX,startY) — compute 2D streamline vertices.
|
|
14
|
+
* Returns a cell array of Nx2 vertex matrices.
|
|
15
|
+
*/
|
|
16
|
+
export declare function stream2Call(args: RuntimeValue[]): RuntimeValue;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Plot data types: the trace interfaces and `PlotInstruction`, the
|
|
3
|
+
* serializable contract between numbl-core (which emits instructions) and the
|
|
4
|
+
* renderer in src/graphics/ (which consumes them). The renderer imports these
|
|
5
|
+
* from here; numbl-core does not depend on src/graphics/.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The numbl-vscode extension syncs this file (and the rest of src/graphics/)
|
|
9
|
-
* via devel/sync-graphics.sh.
|
|
7
|
+
* The numbl-vscode extension syncs src/graphics/ via devel/sync-graphics.sh;
|
|
8
|
+
* it also needs the core modules the renderer imports (types, figuresReducer,
|
|
9
|
+
* axisLimits, imagescExtent, colormaps).
|
|
10
10
|
*/
|
|
11
11
|
export interface PlotTrace {
|
|
12
12
|
x: number[];
|
|
@@ -53,6 +53,8 @@ export interface PatchTrace {
|
|
|
53
53
|
edgeColor?: [number, number, number] | "flat" | "interp" | "none";
|
|
54
54
|
/** Face transparency in [0,1]. */
|
|
55
55
|
faceAlpha?: number;
|
|
56
|
+
/** Edge transparency in [0,1]. */
|
|
57
|
+
edgeAlpha?: number;
|
|
56
58
|
lineWidth?: number;
|
|
57
59
|
lineStyle?: string;
|
|
58
60
|
marker?: string;
|
|
@@ -21,13 +21,5 @@ import { type RefcountRuntime } from "./refcount.js";
|
|
|
21
21
|
* be copied (handle-class instances, primitives) — the caller can
|
|
22
22
|
* `=== v` test if the copy was a no-op. */
|
|
23
23
|
export declare function cowCopy(v: RuntimeValue): RuntimeValue;
|
|
24
|
-
/** If `v` is shared (rc-driven), return a fresh non-shared copy;
|
|
25
|
-
* otherwise return `v` unchanged. The new wrapper has refcount 0
|
|
26
|
-
* (or 1 if the active scope adopts it via the constructor); the
|
|
27
|
-
* caller must bind it into the parent slot to keep it alive.
|
|
28
|
-
*
|
|
29
|
-
* Returns the original `v` for handle-class instances and primitives —
|
|
30
|
-
* callers can `result === v` test to detect a no-op. */
|
|
31
|
-
export declare function cowIfShared(v: RuntimeValue): RuntimeValue;
|
|
32
24
|
export { isShared } from "./refcount.js";
|
|
33
25
|
export type { RefcountRuntime };
|
|
@@ -53,9 +53,6 @@ export declare abstract class Refcounted {
|
|
|
53
53
|
* RuntimeDummyHandle, etc.). */
|
|
54
54
|
protected _destroy(_rt: RefcountRuntime): void;
|
|
55
55
|
}
|
|
56
|
-
/** True if the value is a container that participates in refcounting.
|
|
57
|
-
* Primitives (number, boolean, string) return false. */
|
|
58
|
-
export declare function isRefcountable(v: unknown): v is Refcounted;
|
|
59
56
|
/** Increment refcount on a value if it's a container; primitives are noop. */
|
|
60
57
|
export declare function incref(v: unknown): void;
|
|
61
58
|
/** Decrement refcount on a value if it's a container; primitives are noop. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registration helpers for builtins that need the active Runtime. They are
|
|
3
|
+
* ordinary IBuiltins; each call gets the runtime from the current-runtime
|
|
4
|
+
* stack.
|
|
5
|
+
*/
|
|
6
|
+
import type { Runtime } from "./runtime.js";
|
|
7
|
+
import type { RuntimeValue } from "./types.js";
|
|
8
|
+
/** The runtime executing the current call. */
|
|
9
|
+
export declare function currentRuntime(): Runtime;
|
|
10
|
+
/** Register a builtin that accepts any args and gets the active runtime. */
|
|
11
|
+
export declare function registerSpecial(name: string, fn: (nargout: number, args: RuntimeValue[], rt: Runtime) => unknown): void;
|
|
12
|
+
/** Register a builtin with no outputs. The call site raises "Too many output
|
|
13
|
+
* arguments." when nargout > 0, and `ans` is not set when called as a
|
|
14
|
+
* statement. */
|
|
15
|
+
export declare function registerSpecialVoid(name: string, fn: (args: RuntimeValue[], rt: Runtime) => void): void;
|
|
@@ -14,11 +14,13 @@ import { type RuntimeValue, type RuntimeLogical, type RuntimeTensor, type Runtim
|
|
|
14
14
|
import { RefScope } from "./refcount.js";
|
|
15
15
|
import { RuntimeChar, RuntimeCell, RuntimeClassInstanceArray, type RuntimeComplexNumber, type RuntimeClassInstance } from "../runtime/types.js";
|
|
16
16
|
import { type ItemType } from "../lowering/itemTypes.js";
|
|
17
|
-
import type { PlotInstruction } from "
|
|
17
|
+
import type { PlotInstruction } from "../plotting/types.js";
|
|
18
18
|
import type { ExecOptions } from "../executeCode.js";
|
|
19
19
|
import type { FileIOAdapter } from "../fileIOAdapter.js";
|
|
20
20
|
import type { SystemAdapter } from "../systemAdapter.js";
|
|
21
21
|
import { type CallSite } from "./runtimeHelpers.js";
|
|
22
|
+
import "./specialBuiltins.js";
|
|
23
|
+
import "../plotting/builtins.js";
|
|
22
24
|
export declare class Runtime {
|
|
23
25
|
private options;
|
|
24
26
|
private initialVariableValues?;
|
|
@@ -111,7 +113,7 @@ export declare class Runtime {
|
|
|
111
113
|
strictRefcount: boolean;
|
|
112
114
|
activeAccessors: Set<string>;
|
|
113
115
|
resolveClassMethod: ((className: string, methodName: string) => ((...args: any[]) => any) | null) | null;
|
|
114
|
-
|
|
116
|
+
getClassAncestors: ((className: string) => string[]) | null;
|
|
115
117
|
classMethodCache: Map<string, ((...args: any[]) => any) | null>;
|
|
116
118
|
/** Callback for addpath/rmpath — mutates search paths and rebuilds function index. */
|
|
117
119
|
onPathChange: ((action: "add" | "remove", dir: string, position: "begin" | "end") => void) | null;
|
|
@@ -119,27 +121,15 @@ export declare class Runtime {
|
|
|
119
121
|
onCwdChange: ((newCwd: string) => void) | null;
|
|
120
122
|
/** Reference to the active search paths (set by executeCode). */
|
|
121
123
|
searchPaths: string[];
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
callerAccessorStack: (Record<string, [
|
|
128
|
-
() => unknown,
|
|
129
|
-
(v: unknown) => void
|
|
130
|
-
]> | null)[];
|
|
131
|
-
private dynamicCallerVarStack;
|
|
124
|
+
/** Warning identifiers turned off with warning('off', id); 'all' covers
|
|
125
|
+
* identifiers without their own entry. */
|
|
126
|
+
warningsOff: Set<string>;
|
|
127
|
+
/** Counter for uihtml component ids. */
|
|
128
|
+
uihtmlSeq: number;
|
|
132
129
|
fileIO?: FileIOAdapter;
|
|
133
130
|
system?: SystemAdapter;
|
|
134
|
-
builtins: Record<string, (nargout: number, args: unknown[]) => unknown>;
|
|
135
131
|
customBuiltins: Record<string, (nargout: number, args: unknown[]) => unknown>;
|
|
136
132
|
compileSpecialized: ((name: string, argTypes: ItemType[], callSite: CallSite) => ((...args: any[]) => any) | null) | null;
|
|
137
|
-
evalLocalCallback: ((code: string, initialVars: Record<string, RuntimeValue>, onOutput: (text: string) => void, fileName?: string) => {
|
|
138
|
-
returnValue: unknown;
|
|
139
|
-
variableValues: Record<string, RuntimeValue>;
|
|
140
|
-
searchPaths?: string[];
|
|
141
|
-
workspaceFiles?: import("../../numbl-core/workspace/index.js").WorkspaceFile[];
|
|
142
|
-
}) | null;
|
|
143
133
|
jitFunctionCode: Map<string, string>;
|
|
144
134
|
private dispatchUnknownCache;
|
|
145
135
|
dispatchUnknownCounts: Map<string, number>;
|
|
@@ -166,7 +156,6 @@ export declare class Runtime {
|
|
|
166
156
|
* op runs without an explicit `figure`, so a later no-arg `figure` allocates
|
|
167
157
|
* a new handle instead of reusing 1 (MATLAB semantics). */
|
|
168
158
|
ensureCurrentFigure(): void;
|
|
169
|
-
private initBuiltins;
|
|
170
159
|
profileEnter(key: string): void;
|
|
171
160
|
profileLeave(): void;
|
|
172
161
|
getBuiltinProfile(): Record<string, {
|
|
@@ -220,8 +209,6 @@ export declare class Runtime {
|
|
|
220
209
|
setVariableValue(name: string, value: RuntimeValue | undefined): void;
|
|
221
210
|
/** Collect defined variable names from getters and apply argument filters. */
|
|
222
211
|
private filterVarNames;
|
|
223
|
-
/** Get shape of a runtime value as a number array. */
|
|
224
|
-
private static varShape;
|
|
225
212
|
/** Estimate bytes for a runtime value. */
|
|
226
213
|
private static varBytes;
|
|
227
214
|
/** Check if a runtime value is complex. */
|
|
@@ -233,14 +220,6 @@ export declare class Runtime {
|
|
|
233
220
|
private static varInfo;
|
|
234
221
|
private static whosStruct;
|
|
235
222
|
whos(nargout: number, getters: Record<string, () => unknown>, args: unknown[]): unknown;
|
|
236
|
-
setWorkspaceAccessor(name: string, getter: () => unknown, setter: (v: unknown) => void): void;
|
|
237
|
-
getWorkspaceVariable(name: string): unknown | undefined;
|
|
238
|
-
setWorkspaceVariable(name: string, value: unknown): void;
|
|
239
|
-
pushCallerAccessors(accessors: Record<string, [() => unknown, (v: unknown) => void]> | null): void;
|
|
240
|
-
popCallerAccessors(): void;
|
|
241
|
-
getCallerVariable(name: string): unknown | undefined;
|
|
242
|
-
setCallerVariable(name: string, value: unknown): void;
|
|
243
|
-
evalLocal(code: unknown, accessors: Record<string, [() => unknown, (v: unknown) => void]>): unknown;
|
|
244
223
|
getPersistent(funcId: string, varName: string): RuntimeValue;
|
|
245
224
|
setPersistent(funcId: string, varName: string, value: RuntimeValue): void;
|
|
246
225
|
uplus(v: unknown): RuntimeValue;
|
|
@@ -276,11 +255,8 @@ export declare class Runtime {
|
|
|
276
255
|
* Returns the compiled method function or null if it doesn't exist.
|
|
277
256
|
*/
|
|
278
257
|
cachedResolveClassMethod(className: string, methodName: string): ((...args: any[]) => any) | null;
|
|
279
|
-
/**
|
|
280
|
-
|
|
281
|
-
* Returns null if no parent or no callback registered.
|
|
282
|
-
*/
|
|
283
|
-
getClassParentName(className: string): string | null;
|
|
258
|
+
/** Ancestor class names of a class, or [] if unknown. */
|
|
259
|
+
classAncestors(className: string): string[];
|
|
284
260
|
/** Get the class name from a runtime value (for dynamic static method dispatch). */
|
|
285
261
|
getClassName(value: unknown): string;
|
|
286
262
|
dispatch(name: string, nargout: number, args: unknown[]): unknown;
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { type RuntimeValue, type RuntimeLogical, RuntimeFunction } from "../runtime/index.js";
|
|
8
8
|
import type { Runtime } from "./runtime.js";
|
|
9
|
+
/** Returned by `invokeBuiltin` when `name` is not a builtin. */
|
|
10
|
+
export declare const NOT_A_BUILTIN: unique symbol;
|
|
11
|
+
/** Call the builtin `name`: an execution-specific custom builtin if one is
|
|
12
|
+
* set, else the registered IBuiltin. Returns NOT_A_BUILTIN if neither
|
|
13
|
+
* exists. A builtin with no outputs errors when outputs are requested. */
|
|
14
|
+
export declare function invokeBuiltin(rt: Runtime, name: string, nargout: number, args: unknown[]): unknown;
|
|
9
15
|
export declare function getFuncHandle(name: string): RuntimeFunction;
|
|
10
16
|
export declare function makeUserFuncHandle(jsFn: (...args: unknown[]) => unknown, nargin?: number): RuntimeFunction;
|
|
11
17
|
export declare function isa(rt: Runtime, value: unknown, classNameArg: unknown): RuntimeLogical;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Special builtin functions that require direct runtime access.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* IBuiltin dispatch path.
|
|
4
|
+
* They are registered once, at module load, as ordinary IBuiltins; each call
|
|
5
|
+
* gets the active Runtime from the current-runtime stack.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
export { SPECIAL_BUILTIN_NAMES } from "./specialBuiltinNames.js";
|
|
10
|
-
/**
|
|
11
|
-
* Register all special builtins as IBuiltins closing over the runtime instance.
|
|
12
|
-
*/
|
|
13
|
-
export declare function registerSpecialBuiltins(rt: Runtime): void;
|
|
7
|
+
export {};
|
|
@@ -173,6 +173,15 @@ export declare class RuntimeStructArray extends Refcounted {
|
|
|
173
173
|
}
|
|
174
174
|
/** Sparse matrix in CSC (Compressed Sparse Column) format, matching MATLAB's
|
|
175
175
|
* internal representation. */
|
|
176
|
+
/** Cached structural analysis of a sparse matrix (see helpers/sparse-direct). */
|
|
177
|
+
export interface SparseTriInfo {
|
|
178
|
+
upper: boolean;
|
|
179
|
+
lower: boolean;
|
|
180
|
+
/** Index into ir/pr of the diagonal entry of each column, or -1. */
|
|
181
|
+
diagPos: Int32Array;
|
|
182
|
+
/** Diagonal values (0 where absent). */
|
|
183
|
+
diag: Float64Array;
|
|
184
|
+
}
|
|
176
185
|
export declare class RuntimeSparseMatrix extends Refcounted {
|
|
177
186
|
readonly kind: "sparse_matrix";
|
|
178
187
|
m: number;
|
|
@@ -181,6 +190,9 @@ export declare class RuntimeSparseMatrix extends Refcounted {
|
|
|
181
190
|
jc: Int32Array;
|
|
182
191
|
pr: Float64Array;
|
|
183
192
|
pi: Float64Array | undefined;
|
|
193
|
+
/** Lazily computed by triangularInfo(); valid because sparse matrices are
|
|
194
|
+
* never mutated in place (indexed assignment builds a new matrix). */
|
|
195
|
+
_triInfo: SparseTriInfo | undefined;
|
|
184
196
|
constructor(m: number, n: number, ir: Int32Array, jc: Int32Array, pr: Float64Array, pi?: Float64Array);
|
|
185
197
|
}
|
|
186
198
|
/** Dictionary mapping unique keys to values (MATLAB R2022b+). */
|
|
@@ -8,15 +8,11 @@
|
|
|
8
8
|
* when an event arrives from the iframe — mirroring MATLAB, where the script
|
|
9
9
|
* returns but its callbacks keep firing.
|
|
10
10
|
*
|
|
11
|
-
* Dispatch
|
|
12
|
-
*
|
|
13
|
-
* and pushes the runtime so `disp`, plotting, and `sendEventToHTMLSource`
|
|
14
|
-
* inside the callback reach this runtime. This mirrors executeCode's own
|
|
15
|
-
* save/restore of SPECIAL_BUILTIN_NAMES.
|
|
11
|
+
* Dispatch pushes the runtime so `disp`, plotting, and
|
|
12
|
+
* `sendEventToHTMLSource` inside the callback reach this runtime.
|
|
16
13
|
*/
|
|
17
14
|
import type { Runtime } from "./runtime.js";
|
|
18
|
-
import type { PlotInstruction } from "
|
|
19
|
-
import { type IBuiltin } from "../interpreter/builtins/types.js";
|
|
15
|
+
import type { PlotInstruction } from "../plotting/types.js";
|
|
20
16
|
export interface UihtmlSession {
|
|
21
17
|
/** True while at least one component still has a registered callback. */
|
|
22
18
|
hasCallbacks(): boolean;
|
|
@@ -32,9 +28,5 @@ export interface UihtmlSession {
|
|
|
32
28
|
/** Release the retained callback handles (and their refs). */
|
|
33
29
|
dispose(): void;
|
|
34
30
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
* `activeSpecials` is a snapshot of this runtime's special-builtin closures,
|
|
38
|
-
* captured at end-of-run while they are still installed globally.
|
|
39
|
-
*/
|
|
40
|
-
export declare function createUihtmlSession(rt: Runtime, activeSpecials: Map<string, IBuiltin>, onDrawnow?: (plotInstructions: PlotInstruction[]) => void): UihtmlSession;
|
|
31
|
+
/** Build a session over a runtime that registered uihtml callbacks. */
|
|
32
|
+
export declare function createUihtmlSession(rt: Runtime, onDrawnow?: (plotInstructions: PlotInstruction[]) => void): UihtmlSession;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tensor shape/indexing utilities.
|
|
3
3
|
*/
|
|
4
|
-
import { type RuntimeTensor } from "./types.js";
|
|
4
|
+
import { type RuntimeTensor, type RuntimeValue } from "./types.js";
|
|
5
|
+
/** The MATLAB size of any runtime value, with at least two dimensions.
|
|
6
|
+
* Scalars, strings, structs and objects are 1×1. */
|
|
7
|
+
export declare function valueShape(v: RuntimeValue): number[];
|
|
5
8
|
/** Get 2D size (rows, cols) from shape, padding with 1s as needed.
|
|
6
9
|
* For N-D tensors (N>2), trailing dimensions are collapsed into cols,
|
|
7
10
|
* matching MATLAB's behavior when fewer subscripts than dimensions. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Numbl version, used for JIT disk cache invalidation. */
|
|
2
|
-
export declare const NUMBL_VERSION = "0.4.
|
|
2
|
+
export declare const NUMBL_VERSION = "0.4.22";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files visible to a run: the caller's workspace files, the implicit cwd,
|
|
3
|
+
* the search path and the bundled stdlib. Keeps them in sync with addpath,
|
|
4
|
+
* rmpath and cd, and registers them with the LoweringContext for function
|
|
5
|
+
* resolution.
|
|
6
|
+
*/
|
|
7
|
+
import type { LoweringContext, FunctionIndex } from "../lowering/loweringContext.js";
|
|
8
|
+
import type { FileIOAdapter } from "../fileIOAdapter.js";
|
|
9
|
+
import type { SystemAdapter } from "../systemAdapter.js";
|
|
10
|
+
import type { WorkspaceFile, NativeBridge } from "./types.js";
|
|
11
|
+
import { type LoadedJsUserFunction } from "../jsUserFunctions.js";
|
|
12
|
+
/** Search-path entry for bundled shim files; always last. */
|
|
13
|
+
export declare const SHIM_SEARCH_PATH = "__numbl_shims__";
|
|
14
|
+
export declare class Workspace {
|
|
15
|
+
private readonly ctx;
|
|
16
|
+
private readonly fileIO;
|
|
17
|
+
private readonly nativeBridge;
|
|
18
|
+
readonly mFiles: WorkspaceFile[];
|
|
19
|
+
readonly jsFiles: WorkspaceFile[];
|
|
20
|
+
readonly wasmFiles: WorkspaceFile[];
|
|
21
|
+
/** Loaded .numbl.js functions, sorted by search-path priority on rebuild. */
|
|
22
|
+
jsFunctions: LoadedJsUserFunction[];
|
|
23
|
+
/** Names of the bundled stdlib and shim files. */
|
|
24
|
+
readonly bundledFileNames: Set<string>;
|
|
25
|
+
/** The current directory, searched first unless it is an explicit path. */
|
|
26
|
+
implicitCwd: string | null;
|
|
27
|
+
/** True once addpath, rmpath or cd changed the workspace. */
|
|
28
|
+
modified: boolean;
|
|
29
|
+
/** Notified when a .m file enters or leaves the workspace after startup. */
|
|
30
|
+
onFileAdded?: (f: WorkspaceFile) => void;
|
|
31
|
+
onFileRemoved?: (name: string) => void;
|
|
32
|
+
constructor(ctx: LoweringContext, fileIO: FileIOAdapter | undefined, nativeBridge: NativeBridge | undefined);
|
|
33
|
+
get searchPaths(): string[];
|
|
34
|
+
private resolve;
|
|
35
|
+
/** Parse a .m file into the shared AST cache. A file that fails to parse
|
|
36
|
+
* is skipped with a warning rather than aborting the run. */
|
|
37
|
+
private parse;
|
|
38
|
+
/** Initial file set: the caller's files, the implicit cwd, the explicit
|
|
39
|
+
* search paths (files already provided are not re-added) and the bundled
|
|
40
|
+
* stdlib and shims. All .numbl.js files load as one batch so library
|
|
41
|
+
* files (`_name.numbl.js`) are visible across directories. */
|
|
42
|
+
load(files: WorkspaceFile[], searchPaths: string[], implicitCwd: string | null | undefined, system: SystemAdapter | undefined, bundled: WorkspaceFile[]): void;
|
|
43
|
+
/** Register the current files and .numbl.js functions with the context. */
|
|
44
|
+
register(): void;
|
|
45
|
+
/** Re-sort the files by search-path priority, re-register them and return
|
|
46
|
+
* a fresh function index. */
|
|
47
|
+
rebuild(): FunctionIndex;
|
|
48
|
+
/** Scan a directory: parse its .m files not already known, and (re)load
|
|
49
|
+
* its .numbl.js functions. Files are always reloaded because files sent
|
|
50
|
+
* earlier (e.g. by the IDE) may have lacked their wasm/native binaries. */
|
|
51
|
+
private scanDir;
|
|
52
|
+
/** Drop the files under `dir`, except those for which `keep` is true. */
|
|
53
|
+
private removeFilesUnder;
|
|
54
|
+
/** addpath. Returns false if `dir` is already on the path. */
|
|
55
|
+
addPath(dir: string, position: "begin" | "end"): boolean;
|
|
56
|
+
/** rmpath. */
|
|
57
|
+
removePath(dir: string): void;
|
|
58
|
+
/** cd: make `newCwd` the implicit cwd. Returns false if it already is. */
|
|
59
|
+
changeCwd(newCwd: string): boolean;
|
|
60
|
+
/** Search paths to report back to callers (no implicit cwd or shims). */
|
|
61
|
+
explicitSearchPaths(): string[];
|
|
62
|
+
/** Files to report back to callers (no bundled stdlib or shims). */
|
|
63
|
+
userFiles(): WorkspaceFile[];
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dsymv(uplo: number, n: number, alpha: number, a: Float64Array, aOff: number, lda: number, x: Float64Array, xOff: number, incx: number, beta: number, y: Float64Array, yOff: number, incy: number): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dsyr2(uplo: number, n: number, alpha: number, x: Float64Array, xOff: number, incx: number, y: Float64Array, yOff: number, incy: number, a: Float64Array, aOff: number, lda: number): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dlanst(norm: number, n: number, d: Float64Array, dOff: number, e: Float64Array, eOff: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dlansy(norm: number, uplo: number, n: number, a: Float64Array, aOff: number, lda: number, work: Float64Array, workOff: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dlasrt(id: number, n: number, d: Float64Array, dOff: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dorgtr(uplo: number, n: number, a: Float64Array, aOff: number, lda: number, tau: Float64Array, tauOff: number): number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const COMPZ_N = 0;
|
|
2
|
+
export declare const COMPZ_V = 1;
|
|
3
|
+
export declare const COMPZ_I = 2;
|
|
4
|
+
export declare function dsteqr(compz: number, n: number, d: Float64Array, dOff: number, e: Float64Array, eOff: number, z: Float64Array, zOff: number, ldz: number, work: Float64Array, workOff: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dsyev(wantz: boolean, uplo: number, n: number, a: Float64Array, aOff: number, lda: number, w: Float64Array, wOff: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dsytd2(uplo: number, n: number, a: Float64Array, aOff: number, lda: number, d: Float64Array, dOff: number, e: Float64Array, eOff: number, tau: Float64Array, tauOff: number): number;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Syncs VFS changes from a worker execution back to IndexedDB.
|
|
3
3
|
*/
|
|
4
4
|
import type { VfsChanges } from "./VirtualFileSystem.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { FileEntry } from "../hooks/projectFilesState.js";
|
|
6
6
|
export interface VfsSyncResult {
|
|
7
|
-
addedFiles:
|
|
7
|
+
addedFiles: FileEntry[];
|
|
8
8
|
modifiedFiles: {
|
|
9
9
|
path: string;
|
|
10
10
|
data: Uint8Array;
|