numbl 0.3.3 → 0.4.1
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 +6 -5
- package/dist-cli/cli.js +63077 -42047
- package/dist-lib/graphics/types.d.ts +40 -1
- package/dist-lib/lib.d.ts +0 -1
- package/dist-lib/lib.js +78446 -57671
- package/dist-lib/numbl-core/executeCode.d.ts +10 -12
- package/dist-lib/numbl-core/executors/classification.d.ts +134 -0
- package/dist-lib/numbl-core/executors/handleInline.d.ts +42 -0
- package/dist-lib/numbl-core/executors/index.d.ts +0 -3
- package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +35 -0
- package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +31 -0
- package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +29 -0
- package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +45 -0
- package/dist-lib/numbl-core/executors/jit/compileC.d.ts +51 -0
- package/dist-lib/numbl-core/executors/jit/compileC.node.d.ts +25 -0
- package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +27 -0
- package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +41 -0
- package/dist-lib/numbl-core/executors/jit/session.d.ts +17 -0
- package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +36 -0
- package/dist-lib/numbl-core/executors/jit/typeAdapter.d.ts +28 -0
- package/dist-lib/numbl-core/executors/jit/typeAdapterC.d.ts +73 -0
- package/dist-lib/numbl-core/executors/jit/valueAdapter.d.ts +48 -0
- package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +108 -0
- package/dist-lib/numbl-core/executors/lowering.d.ts +31 -77
- package/dist-lib/numbl-core/executors/plugins.d.ts +14 -21
- package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +4 -1
- package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +1 -1
- package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +0 -18
- package/dist-lib/numbl-core/interpreter/interpreter.d.ts +37 -21
- package/dist-lib/numbl-core/interpreter/interpreterExec.d.ts +6 -0
- package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +13 -1
- package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +1 -1
- package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +43 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +123 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/minus.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mpower.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mrdivide.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mtimes.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/plus.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/power.d.ts +30 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/rdivide.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/times.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/uminus.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/_compare.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/eq.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/ge.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/gt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/le.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/lt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/ne.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/diag/assert.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/_format_args.d.ts +17 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/disp.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/error.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/fprintf.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/sprintf.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/warning.d.ts +15 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/_shortcircuit.d.ts +30 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +30 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/and.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/andand.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/boolconst.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/classBuiltin.d.ts +21 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +15 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isa.d.ts +13 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/iscell.d.ts +8 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isempty.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isequal.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isfield.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isinf.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isnan.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isnumeric.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isreal.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isscalar.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isstruct.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/logical.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/not.d.ts +15 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/or.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/oror.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +21 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/typequery.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/xor.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/_complex_fold.d.ts +34 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +51 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/abs.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/angle.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/asinh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/atan.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/atan2.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/besselh.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/ceil.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/conj.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/constants.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/cos.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/cosh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/dot.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/double.d.ts +28 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/exp.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/fix.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/floor.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/hypot.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/imag.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/linspace.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/log.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/log10.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/log2.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/logspace.d.ts +8 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/mod.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/norm.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/real.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/rem.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/round.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sign.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sin.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sinh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sqrt.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/tan.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/tanh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/uniquetol.d.ts +22 -0
- package/dist-lib/numbl-core/jit/builtins/defs/plot/dispatch.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_cumulative.d.ts +49 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +126 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_variance.d.ts +17 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/all.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/any.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cummax.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cummin.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cumprod.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cumsum.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/diff.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/length.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/max.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/mean.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/min.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/numel.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/prod.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/std.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/sum.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/var.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +67 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +34 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/cat.d.ts +33 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/diag.d.ts +29 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/eye.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/flip.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/meshgrid.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/ones.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/repmat.d.ts +37 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/reshape.d.ts +39 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/size.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/sort.d.ts +19 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/transpose.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/tril.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/triu.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/zeros.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +36 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/pathBuiltins.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/tic.d.ts +8 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/toc.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/index.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/registry.d.ts +138 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/cell/cell.d.ts +24 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/loop_count.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/range_value.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/scalar_index.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/tensor_make_range.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/assert_fmt.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_complex.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_double.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_struct.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_tensor.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_tensor_complex.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/error_fmt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/format_complex.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/format_double.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/format_engine.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/fprintf.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/sprintf.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/warning_fmt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/plot/plot_dispatch.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/snippets.gen.d.ts +86 -0
- 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 +103 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/deep_clone.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/isequal.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/tictoc.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_nd_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_copy_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_matrix.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_matrix_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_row.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_row_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_cat.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_cumulative.d.ts +32 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_diag.d.ts +33 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_diff.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_dot.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_complex.d.ts +90 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real.d.ts +75 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +95 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_eye.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_fill_nd.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_fill_square.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_flip.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_linspace.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_logical_real.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_logspace.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_meshgrid.d.ts +29 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_mtimes_complex.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_mtimes_real.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_norm.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_ones_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_ones_square.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_predicate.d.ts +42 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_complex.d.ts +53 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +42 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_repmat.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reshape_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reshape_nd_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_size.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_sort_real.d.ts +36 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_transpose.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_transpose_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_triangular.d.ts +22 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_complex_math.d.ts +128 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +95 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_uniquetol.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_var.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_zeros_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_zeros_square.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/text/strcmp.d.ts +2 -0
- package/dist-lib/numbl-core/jit/codegen/cFormat.d.ts +36 -0
- package/dist-lib/numbl-core/jit/codegen/cHelpers.d.ts +48 -0
- package/dist-lib/numbl-core/jit/codegen/emit.d.ts +55 -0
- package/dist-lib/numbl-core/jit/codegen/emitCellTypedef.d.ts +23 -0
- package/dist-lib/numbl-core/jit/codegen/emitExpr.d.ts +33 -0
- package/dist-lib/numbl-core/jit/codegen/emitIndex.d.ts +56 -0
- package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +64 -0
- package/dist-lib/numbl-core/jit/codegen/emitNamedTypedef.d.ts +58 -0
- package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +76 -0
- package/dist-lib/numbl-core/jit/codegen/emitTensorConcat.d.ts +23 -0
- package/dist-lib/numbl-core/jit/codegen/emitTensorConcatJs.d.ts +16 -0
- package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +77 -0
- package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +66 -0
- package/dist-lib/numbl-core/jit/codegen/liveness.d.ts +58 -0
- package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +24 -0
- package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +150 -0
- package/dist-lib/numbl-core/jit/compileSpec.d.ts +84 -0
- package/dist-lib/numbl-core/jit/compileSpecC.d.ts +93 -0
- package/dist-lib/numbl-core/jit/index.d.ts +15 -0
- package/dist-lib/numbl-core/jit/lowering/classDefs.d.ts +109 -0
- package/dist-lib/numbl-core/jit/lowering/errors.d.ts +35 -0
- package/dist-lib/numbl-core/jit/lowering/indexFold.d.ts +31 -0
- package/dist-lib/numbl-core/jit/lowering/indexResolve.d.ts +100 -0
- package/dist-lib/numbl-core/jit/lowering/ir.d.ts +584 -0
- package/dist-lib/numbl-core/jit/lowering/lower.d.ts +271 -0
- package/dist-lib/numbl-core/jit/lowering/lowerCellIndex.d.ts +41 -0
- package/dist-lib/numbl-core/jit/lowering/lowerCellLit.d.ts +19 -0
- package/dist-lib/numbl-core/jit/lowering/lowerClassConstructor.d.ts +55 -0
- package/dist-lib/numbl-core/jit/lowering/lowerFuncCall.d.ts +34 -0
- package/dist-lib/numbl-core/jit/lowering/lowerHandle.d.ts +57 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexLoad.d.ts +16 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexSlice.d.ts +29 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexSliceStore.d.ts +19 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexStore.d.ts +14 -0
- package/dist-lib/numbl-core/jit/lowering/lowerMethodCall.d.ts +45 -0
- package/dist-lib/numbl-core/jit/lowering/lowerMultiAssign.d.ts +36 -0
- package/dist-lib/numbl-core/jit/lowering/lowerTensorLit.d.ts +25 -0
- package/dist-lib/numbl-core/jit/lowering/rangeCount.d.ts +19 -0
- package/dist-lib/numbl-core/jit/lowering/specialize.d.ts +93 -0
- package/dist-lib/numbl-core/jit/lowering/types.d.ts +503 -0
- package/dist-lib/numbl-core/jit/lowering/walk.d.ts +17 -0
- package/dist-lib/numbl-core/jit/numbl/index.d.ts +30 -0
- package/dist-lib/numbl-core/jit/parser/astUtils.d.ts +43 -0
- package/dist-lib/numbl-core/jit/parser/index.d.ts +12 -0
- package/dist-lib/numbl-core/jit/parser/sourceLoc.d.ts +12 -0
- package/dist-lib/numbl-core/jit/runtime/context.d.ts +23 -0
- package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +10 -0
- package/dist-lib/numbl-core/jit/runtime/value.d.ts +101 -0
- package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +59 -0
- package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +62 -0
- package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +243 -0
- package/dist-lib/numbl-core/jitTypes.d.ts +7 -321
- package/dist-lib/numbl-core/jsUserFunctions.d.ts +2 -2
- package/dist-lib/numbl-core/parser/ClassParser.d.ts +3 -0
- package/dist-lib/numbl-core/runtime/index.d.ts +1 -1
- package/dist-lib/numbl-core/runtime/indexing.d.ts +11 -1
- package/dist-lib/numbl-core/runtime/plotUtils.d.ts +28 -2
- package/dist-lib/numbl-core/runtime/runtime.d.ts +16 -1
- package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +5 -0
- package/dist-lib/numbl-core/runtime/types.d.ts +19 -3
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/dist-lib/numbl-core/workspace/types.d.ts +8 -0
- package/dist-plot-viewer/assets/index-DfxsWeyf.js +4426 -0
- package/dist-plot-viewer/index.html +1 -1
- package/dist-site-viewer/404.html +33 -0
- package/dist-site-viewer/assets/index-C5c2lKAx.js +4748 -0
- package/dist-site-viewer/assets/index-D5YY8PKx.css +1 -0
- package/dist-site-viewer/assets/numbl-worker-CkoM4MUa.js +11836 -0
- package/dist-site-viewer/coi-serviceworker.js +70 -0
- package/dist-site-viewer/favicon.svg +23 -0
- package/dist-site-viewer/index.html +16 -0
- package/dist-site-viewer/logo.svg +26 -0
- package/dist-site-viewer/numbl-embed.js +111 -0
- package/dist-site-viewer/vite.svg +1 -0
- package/native/ops/real_unary_elemwise.c +3 -1
- package/package.json +15 -9
- package/dist-lib/numbl-core/executors/cJit/builtins.d.ts +0 -30
- package/dist-lib/numbl-core/executors/cJit/chainCodegen.d.ts +0 -59
- package/dist-lib/numbl-core/executors/cJit/chainExecutor.d.ts +0 -27
- package/dist-lib/numbl-core/executors/cJit/chainPass.d.ts +0 -42
- package/dist-lib/numbl-core/executors/cJit/codegen.d.ts +0 -44
- package/dist-lib/numbl-core/executors/cJit/compile.d.ts +0 -45
- package/dist-lib/numbl-core/executors/cJit/elemwiseCodegen.d.ts +0 -23
- package/dist-lib/numbl-core/executors/cJit/elemwiseStructural.d.ts +0 -33
- package/dist-lib/numbl-core/executors/cJit/fuseAnalyze.d.ts +0 -39
- package/dist-lib/numbl-core/executors/cJit/fuseCodegen.d.ts +0 -16
- package/dist-lib/numbl-core/executors/cJit/fuseExecutor.d.ts +0 -28
- package/dist-lib/numbl-core/executors/cJit/loopExecutor.d.ts +0 -32
- package/dist-lib/numbl-core/executors/cJit/register.d.ts +0 -10
- package/dist-lib/numbl-core/executors/cJit/whitelist.d.ts +0 -15
- package/dist-lib/numbl-core/executors/jsJit/callExecutor.d.ts +0 -25
- package/dist-lib/numbl-core/executors/jsJit/codegen/jitCodegen.d.ts +0 -7
- package/dist-lib/numbl-core/executors/jsJit/codegen/jitCodegenHoist.d.ts +0 -70
- package/dist-lib/numbl-core/executors/jsJit/codegen/jsMultiReduction.d.ts +0 -67
- package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpers.d.ts +0 -34
- package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpersComplex.d.ts +0 -21
- package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpersIndex.d.ts +0 -33
- package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpersTensor.d.ts +0 -34
- package/dist-lib/numbl-core/executors/jsJit/jitCall.d.ts +0 -59
- package/dist-lib/numbl-core/executors/jsJit/jitLoop.d.ts +0 -53
- package/dist-lib/numbl-core/executors/jsJit/jitTopLevel.d.ts +0 -44
- package/dist-lib/numbl-core/executors/jsJit/loopExecutor.d.ts +0 -15
- package/dist-lib/numbl-core/executors/jsJit/lower/blockAnalysis.d.ts +0 -37
- package/dist-lib/numbl-core/executors/jsJit/lower/jitBailSafety.d.ts +0 -41
- package/dist-lib/numbl-core/executors/jsJit/lower/jitLower.d.ts +0 -136
- package/dist-lib/numbl-core/executors/jsJit/lower/jitLowerExpr.d.ts +0 -36
- package/dist-lib/numbl-core/executors/jsJit/lower/jitLowerStmt.d.ts +0 -9
- package/dist-lib/numbl-core/executors/jsJit/lower/jitLowerTypes.d.ts +0 -29
- package/dist-lib/numbl-core/executors/jsJit/lower/scalarEmit.d.ts +0 -58
- package/dist-lib/numbl-core/executors/jsJit/shared.d.ts +0 -120
- package/dist-lib/numbl-core/executors/jsJit/topLevelExecutor.d.ts +0 -17
- package/dist-plot-viewer/assets/index-COAM8o1E.js +0 -4426
- /package/dist-lib/numbl-core/{executors/jsJit/helpers → runtime}/alloc.d.ts +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builtin registry — the contract every mtoc2 builtin (and future
|
|
3
|
+
* user `.mtoc2.js` function) implements.
|
|
4
|
+
*
|
|
5
|
+
* Each builtin can supply up to three mirrored hooks plus the
|
|
6
|
+
* always-required `transfer`:
|
|
7
|
+
*
|
|
8
|
+
* transfer(argTypes, nargout) — required. Given input types and
|
|
9
|
+
* the number of outputs the call site wants, return one Type
|
|
10
|
+
* per output. When every input is exact, set `exact` on the
|
|
11
|
+
* returned type(s) so the lowerer can key specialization on the
|
|
12
|
+
* value (and fold `if` conditions). Throws plain `Error` /
|
|
13
|
+
* `TypeError` / `UnsupportedConstruct` on bad input — no source
|
|
14
|
+
* span; the framework attaches the call-site span via `withSpan`.
|
|
15
|
+
*
|
|
16
|
+
* emitC({argsC, argTypes, nargout, outArgsC?, useRuntime}) —
|
|
17
|
+
* optional. C codegen. Returns the full string ready to splice
|
|
18
|
+
* into the surrounding context:
|
|
19
|
+
* - nargout=1: a C expression (`(a + b)`,
|
|
20
|
+
* `mtoc2_tensor_plus_tt(a, b)`)
|
|
21
|
+
* - nargout≥2: a full call including out-pointer args
|
|
22
|
+
* (`mtoc2_sort_real_2(a, &v, &i)`). `outArgsC` holds those
|
|
23
|
+
* pre-built `&v`, `&i` strings in the order the call site
|
|
24
|
+
* requested.
|
|
25
|
+
* Activate any runtime snippets this emit-output references by
|
|
26
|
+
* calling `useRuntime(name)`.
|
|
27
|
+
*
|
|
28
|
+
* emitJs({argsJs, argTypes, nargout, outTargetsJs?, useRuntime}) —
|
|
29
|
+
* optional. JS codegen. Returns a JS expression (or call
|
|
30
|
+
* sequence) ready to splice. Multi-output calls receive
|
|
31
|
+
* `outTargetsJs` pre-built as `o1`, `o2`, … the secondary
|
|
32
|
+
* outputs land in these locals via the framework's destructuring
|
|
33
|
+
* wrapper. Activates JS-side runtime snippets via `useRuntime`.
|
|
34
|
+
*
|
|
35
|
+
* call({args, argTypes, nargout, ctx}) — optional. Direct JS
|
|
36
|
+
* function used by the interpreter and as a JIT bailout target.
|
|
37
|
+
* Returns one runtime value per output slot. The args shape
|
|
38
|
+
* mirrors the emit hooks' shape so dispatch on `argTypes` /
|
|
39
|
+
* `nargout` stays parallel across all three.
|
|
40
|
+
*
|
|
41
|
+
* elementwise? — when true, every defined emit hook (and `call`)
|
|
42
|
+
* must also produce a correct scalar output when called with
|
|
43
|
+
* scalar argTypes and scalar argsC/argsJs/args. The framework
|
|
44
|
+
* uses this for same-shape tensor fusion (and, later, broadcast
|
|
45
|
+
* / reduction-inner / mask / stencil fusion). Absence = "do not
|
|
46
|
+
* fuse me; use the regular emit on the full tensor types."
|
|
47
|
+
*
|
|
48
|
+
* Each backend selector requires the matching hook to be defined on
|
|
49
|
+
* every builtin in the call's transitive reach; the framework
|
|
50
|
+
* computes the maximum compatible backend per call site.
|
|
51
|
+
*/
|
|
52
|
+
import type { Type } from "../lowering/types.js";
|
|
53
|
+
import type { RuntimeValue } from "../runtime/value.js";
|
|
54
|
+
import type { RuntimeContext } from "../runtime/context.js";
|
|
55
|
+
/** Common across every hook — the type-level call descriptor. */
|
|
56
|
+
interface CommonArgs {
|
|
57
|
+
/** Per-arg type (after lowering / inference). */
|
|
58
|
+
argTypes: Type[];
|
|
59
|
+
/** Number of outputs requested at the call site. */
|
|
60
|
+
nargout: number;
|
|
61
|
+
}
|
|
62
|
+
export interface EmitCArgs extends CommonArgs {
|
|
63
|
+
/** Per-arg C expression. In fused contexts this is scalar form
|
|
64
|
+
* (e.g. `<var>.real[i]`); in the regular path it's whatever the
|
|
65
|
+
* framework's `emitExpr` produced. */
|
|
66
|
+
argsC: string[];
|
|
67
|
+
/** Out-pointer C expressions for multi-output calls (length =
|
|
68
|
+
* nargout when nargout≥2; otherwise undefined). The framework
|
|
69
|
+
* pre-builds these as `&v`, `&i`, … so `emit` just splices them
|
|
70
|
+
* in. */
|
|
71
|
+
outArgsC?: string[];
|
|
72
|
+
/** Activate a runtime C snippet on the current translation unit.
|
|
73
|
+
* See `runtime.ts` for the registry and `InlineSnippet` for the
|
|
74
|
+
* user-supplied form. */
|
|
75
|
+
useRuntime(spec: string | InlineSnippet): void;
|
|
76
|
+
}
|
|
77
|
+
export interface EmitJsArgs extends CommonArgs {
|
|
78
|
+
/** Per-arg JS expression. */
|
|
79
|
+
argsJs: string[];
|
|
80
|
+
/** Out-target JS expressions for multi-output calls. The
|
|
81
|
+
* framework pre-builds these as `o1`, `o2`, … and destructures
|
|
82
|
+
* the call's return into them. Length equals `nargout-1` when
|
|
83
|
+
* `nargout≥2` (the primary output is the expression's value).
|
|
84
|
+
* Undefined for `nargout≤1`. */
|
|
85
|
+
outTargetsJs?: string[];
|
|
86
|
+
/** Activate a JS-side runtime snippet. Snippets are inlined once
|
|
87
|
+
* per build at the top of the emitted module, so the call site
|
|
88
|
+
* invokes them by bare name. Mirrors the C-side `useRuntime` —
|
|
89
|
+
* same registry, paired `.h`/`.js` source files. An `InlineSnippet`
|
|
90
|
+
* (with a `jsCode` body) defines a one-off helper from a builtin. */
|
|
91
|
+
useRuntime(spec: string | InlineSnippet): void;
|
|
92
|
+
}
|
|
93
|
+
export interface CallArgs extends CommonArgs {
|
|
94
|
+
/** Per-arg runtime values, evaluated by the interpreter at the
|
|
95
|
+
* call site. */
|
|
96
|
+
args: RuntimeValue[];
|
|
97
|
+
/** Host bag — `helpers.write` for stdout, future hooks for plot /
|
|
98
|
+
* error / time. */
|
|
99
|
+
ctx: RuntimeContext;
|
|
100
|
+
}
|
|
101
|
+
export interface Builtin {
|
|
102
|
+
/** Source-level name (registry key). */
|
|
103
|
+
name: string;
|
|
104
|
+
/** Required: output Type per output slot. Pure — safe to invoke
|
|
105
|
+
* as a probe (the framework calls this for bare-identifier 0-arg
|
|
106
|
+
* detection). */
|
|
107
|
+
transfer(argTypes: Type[], nargout: number): Type[];
|
|
108
|
+
/** Optional: C codegen. */
|
|
109
|
+
emitC?(args: EmitCArgs): string;
|
|
110
|
+
/** Optional: JS codegen. */
|
|
111
|
+
emitJs?(args: EmitJsArgs): string;
|
|
112
|
+
/** Optional: direct JS function — interpreter / JIT bailout. */
|
|
113
|
+
call?(args: CallArgs): RuntimeValue[];
|
|
114
|
+
/** Elementwise = result is computed pointwise. */
|
|
115
|
+
elementwise?: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** Inline-defined runtime snippet supplied by a user `.mtoc2.js`
|
|
118
|
+
* builtin's `emitC` / `emitJs`. Re-exported from `runtime.ts` — kept
|
|
119
|
+
* here for doc-locality with the `Builtin` contract. */
|
|
120
|
+
export interface InlineSnippet {
|
|
121
|
+
name: string;
|
|
122
|
+
/** C body (required for `emitC` consumers; ignored on the JS path). */
|
|
123
|
+
code: string;
|
|
124
|
+
/** Optional JS body (required for `emitJs` consumers). */
|
|
125
|
+
jsCode?: string;
|
|
126
|
+
headers?: ReadonlyArray<string>;
|
|
127
|
+
deps?: ReadonlyArray<string>;
|
|
128
|
+
}
|
|
129
|
+
export declare function registerBuiltin(b: Builtin): void;
|
|
130
|
+
export declare function getBuiltin(name: string): Builtin | undefined;
|
|
131
|
+
/** Names of every registered builtin. Drives Monaco syntax highlighting. */
|
|
132
|
+
export declare function allBuiltinNames(): readonly string[];
|
|
133
|
+
export type Backend = "c" | "js" | "interpreter";
|
|
134
|
+
export declare function builtinSupports(b: Builtin, backend: Backend): boolean;
|
|
135
|
+
export declare function requireEmitC(b: Builtin): (args: EmitCArgs) => string;
|
|
136
|
+
export declare function requireEmitJs(b: Builtin): (args: EmitJsArgs) => string;
|
|
137
|
+
export declare function requireCall(b: Builtin): (args: CallArgs) => RuntimeValue[];
|
|
138
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Construct a cell from a flat slot list (column-major) and a shape.
|
|
2
|
+
* Caller has already produced fresh slot values (deep_clone'd where
|
|
3
|
+
* the slot was an owned alias), so we simply build the wrapper. */
|
|
4
|
+
export function mtoc2_cell_make(slots: any, shape: any): {
|
|
5
|
+
mtoc2Tag: string;
|
|
6
|
+
shape: any;
|
|
7
|
+
data: any;
|
|
8
|
+
};
|
|
9
|
+
/** `cell(n)` / `cell(n, m)` / `cell(n, m, k, ...)`. The 1-arg square
|
|
10
|
+
* form has already been expanded to two dim args at lowering time so
|
|
11
|
+
* this helper is dim-symmetric.
|
|
12
|
+
*
|
|
13
|
+
* Each axis is coerced to a non-negative integer (matching numbl —
|
|
14
|
+
* `Math.floor` then clamp at 0). The slot count is the dim product;
|
|
15
|
+
* each slot is the empty-double sentinel. */
|
|
16
|
+
export function mtoc2_cell_empty(dims: any): {
|
|
17
|
+
mtoc2Tag: string;
|
|
18
|
+
shape: any;
|
|
19
|
+
data: any[];
|
|
20
|
+
};
|
|
21
|
+
/** Format a cell value to match numbl's `formatCell` byte-for-byte:
|
|
22
|
+
* `{e1, e2, ...}` with chars in `'...'`, strings in `"..."`, other
|
|
23
|
+
* values via `formatValue`. Empty cell renders as `{}`. */
|
|
24
|
+
export function mtoc2_format_cell(c: any): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_loop_count(start: any, end: any, step: any): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_range_value(start: any, step: any, end: any, count: any, i: any): any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Linear (column-major) 0-based offset for a 1-based MATLAB index. */
|
|
2
|
+
export function mtoc2_idx_lin_js(t: any, k: any): number;
|
|
3
|
+
/** Per-axis (0-based for the axis index, 1-based for the value)
|
|
4
|
+
* bounds-checked subscript. */
|
|
5
|
+
export function mtoc2_idx_axis_js(t: any, axis: any, k: any): number;
|
|
6
|
+
/** Linear (1-arg) store subscript: 0-based offset in bounds, grow-bail
|
|
7
|
+
* past the end, RangeError on sub-1. */
|
|
8
|
+
export function mtoc2_idx_lin_grow_js(t: any, k: any): number;
|
|
9
|
+
/** Per-axis (N-arg) store subscript. Same contract as
|
|
10
|
+
* `mtoc2_idx_lin_grow_js` against a single axis's dim. */
|
|
11
|
+
export function mtoc2_idx_axis_grow_js(t: any, axis: any, k: any): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_assert_scalar_fmt(cond: any, fmt: any, ...args: any[]): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_disp_complex(z: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_disp_double(x: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_disp_struct(v: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_disp_tensor(t: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_disp_tensor_complex(t: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_format_complex(z: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_format_double(x: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_sprintf_format(fmt: any, args: any): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_fprintf(fmt: any, ...args: any[]): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_plot_dispatch(name: any, ...args: any[]): void;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export * from "./cell/cell.js";
|
|
2
|
+
export * from "./indexing/loop_count.js";
|
|
3
|
+
export * from "./indexing/range_value.js";
|
|
4
|
+
export * from "./indexing/scalar_index.js";
|
|
5
|
+
export * from "./indexing/tensor_make_range.js";
|
|
6
|
+
export * from "./io/assert_fmt.js";
|
|
7
|
+
export * from "./io/disp_complex.js";
|
|
8
|
+
export * from "./io/disp_double.js";
|
|
9
|
+
export * from "./io/disp_struct.js";
|
|
10
|
+
export * from "./io/disp_tensor.js";
|
|
11
|
+
export * from "./io/disp_tensor_complex.js";
|
|
12
|
+
export * from "./io/error_fmt.js";
|
|
13
|
+
export * from "./io/format_complex.js";
|
|
14
|
+
export * from "./io/format_double.js";
|
|
15
|
+
export * from "./io/format_engine.js";
|
|
16
|
+
export * from "./io/fprintf.js";
|
|
17
|
+
export * from "./io/sprintf.js";
|
|
18
|
+
export * from "./io/warning_fmt.js";
|
|
19
|
+
export * from "./plot/plot_dispatch.js";
|
|
20
|
+
export * from "./system/cdiv.js";
|
|
21
|
+
export * from "./system/cscalar.js";
|
|
22
|
+
export * from "./system/deep_clone.js";
|
|
23
|
+
export * from "./system/isequal.js";
|
|
24
|
+
export * from "./system/tictoc.js";
|
|
25
|
+
export * from "./tensor/tensor.js";
|
|
26
|
+
export * from "./tensor/tensor_alloc.js";
|
|
27
|
+
export * from "./tensor/tensor_alloc_complex.js";
|
|
28
|
+
export * from "./tensor/tensor_alloc_nd.js";
|
|
29
|
+
export * from "./tensor/tensor_alloc_nd_complex.js";
|
|
30
|
+
export * from "./tensor/tensor_copy_complex.js";
|
|
31
|
+
export * from "./tensor/tensor_from_matrix.js";
|
|
32
|
+
export * from "./tensor/tensor_from_matrix_complex.js";
|
|
33
|
+
export * from "./tensor/tensor_from_row.js";
|
|
34
|
+
export * from "./tensor/tensor_from_row_complex.js";
|
|
35
|
+
export * from "./tensor_ops/tensor_cat.js";
|
|
36
|
+
export * from "./tensor_ops/tensor_cumulative.js";
|
|
37
|
+
export * from "./tensor_ops/tensor_diag.js";
|
|
38
|
+
export * from "./tensor_ops/tensor_diff.js";
|
|
39
|
+
export * from "./tensor_ops/tensor_dot.js";
|
|
40
|
+
export * from "./tensor_ops/tensor_elemwise_complex.js";
|
|
41
|
+
export * from "./tensor_ops/tensor_elemwise_real.js";
|
|
42
|
+
export * from "./tensor_ops/tensor_elemwise_real_fn.js";
|
|
43
|
+
export * from "./tensor_ops/tensor_eye.js";
|
|
44
|
+
export * from "./tensor_ops/tensor_fill_nd.js";
|
|
45
|
+
export * from "./tensor_ops/tensor_fill_square.js";
|
|
46
|
+
export * from "./tensor_ops/tensor_flip.js";
|
|
47
|
+
export * from "./tensor_ops/tensor_linspace.js";
|
|
48
|
+
export * from "./tensor_ops/tensor_logical_real.js";
|
|
49
|
+
export * from "./tensor_ops/tensor_logspace.js";
|
|
50
|
+
export * from "./tensor_ops/tensor_meshgrid.js";
|
|
51
|
+
export * from "./tensor_ops/tensor_mtimes_complex.js";
|
|
52
|
+
export * from "./tensor_ops/tensor_mtimes_real.js";
|
|
53
|
+
export * from "./tensor_ops/tensor_norm.js";
|
|
54
|
+
export * from "./tensor_ops/tensor_ones_nd.js";
|
|
55
|
+
export * from "./tensor_ops/tensor_ones_square.js";
|
|
56
|
+
export * from "./tensor_ops/tensor_predicate.js";
|
|
57
|
+
export * from "./tensor_ops/tensor_reduce_complex.js";
|
|
58
|
+
export * from "./tensor_ops/tensor_reduce_real.js";
|
|
59
|
+
export * from "./tensor_ops/tensor_repmat.js";
|
|
60
|
+
export * from "./tensor_ops/tensor_reshape_nd.js";
|
|
61
|
+
export * from "./tensor_ops/tensor_reshape_nd_complex.js";
|
|
62
|
+
export * from "./tensor_ops/tensor_size.js";
|
|
63
|
+
export * from "./tensor_ops/tensor_sort_real.js";
|
|
64
|
+
export * from "./tensor_ops/tensor_transpose.js";
|
|
65
|
+
export * from "./tensor_ops/tensor_transpose_complex.js";
|
|
66
|
+
export * from "./tensor_ops/tensor_triangular.js";
|
|
67
|
+
export * from "./tensor_ops/tensor_unary_complex_math.js";
|
|
68
|
+
export * from "./tensor_ops/tensor_unary_real_math.js";
|
|
69
|
+
export * from "./tensor_ops/tensor_uniquetol.js";
|
|
70
|
+
export * from "./tensor_ops/tensor_var.js";
|
|
71
|
+
export * from "./tensor_ops/tensor_zeros_nd.js";
|
|
72
|
+
export * from "./tensor_ops/tensor_zeros_square.js";
|
|
73
|
+
export * from "./text/strcmp.js";
|
|
74
|
+
/** C snippet bodies, keyed by basename (e.g. `disp_double.h`). */
|
|
75
|
+
export declare const C_SNIPPETS: Record<string, string>;
|
|
76
|
+
/** JS snippet bodies (with `export` keywords stripped), keyed by
|
|
77
|
+
* basename (e.g. `disp_double.js`). Inlined into emitted JS. The
|
|
78
|
+
* functions may reference host hooks (`$write`, …) as free
|
|
79
|
+
* variables that resolve to `globalThis.<name>` at call time. */
|
|
80
|
+
export declare const JS_SNIPPETS: Record<string, string>;
|
|
81
|
+
/** Per-JS-snippet list of basenames it imports from sibling JS
|
|
82
|
+
* snippets (e.g. `tensor_elemwise_real.js` →
|
|
83
|
+
* `['tensor_alloc_nd.js']`). The codegen path converts each entry
|
|
84
|
+
* to a registered snippet name (`mtoc2_<basename without .js>`) so
|
|
85
|
+
* cross-snippet JS deps activate alongside the explicit C deps. */
|
|
86
|
+
export declare const JS_IMPORTS: Record<string, string[]>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export function mtoc2_cmake(re: any, im: any): {
|
|
2
|
+
re: any;
|
|
3
|
+
im: any;
|
|
4
|
+
};
|
|
5
|
+
export function mtoc2_creal(z: any): any;
|
|
6
|
+
export function mtoc2_cimag(z: any): any;
|
|
7
|
+
export function mtoc2_cadd(a: any, b: any): {
|
|
8
|
+
re: any;
|
|
9
|
+
im: any;
|
|
10
|
+
};
|
|
11
|
+
export function mtoc2_csub(a: any, b: any): {
|
|
12
|
+
re: number;
|
|
13
|
+
im: number;
|
|
14
|
+
};
|
|
15
|
+
export function mtoc2_cmul(a: any, b: any): {
|
|
16
|
+
re: number;
|
|
17
|
+
im: number;
|
|
18
|
+
};
|
|
19
|
+
export function mtoc2_cneg(z: any): {
|
|
20
|
+
re: number;
|
|
21
|
+
im: number;
|
|
22
|
+
};
|
|
23
|
+
export function mtoc2_cconj(z: any): {
|
|
24
|
+
re: any;
|
|
25
|
+
im: number;
|
|
26
|
+
};
|
|
27
|
+
export function mtoc2_cabs(z: any): number;
|
|
28
|
+
export function mtoc2_cangle(z: any): number;
|
|
29
|
+
export function mtoc2_cnonzero(z: any): boolean;
|
|
30
|
+
export function mtoc2_ceq(a: any, b: any): boolean;
|
|
31
|
+
export function mtoc2_cne(a: any, b: any): boolean;
|
|
32
|
+
export function mtoc2_cpow(a: any, b: any): {
|
|
33
|
+
re: number;
|
|
34
|
+
im: number;
|
|
35
|
+
};
|
|
36
|
+
export function mtoc2_csqrt(z: any): {
|
|
37
|
+
re: number;
|
|
38
|
+
im: number;
|
|
39
|
+
};
|
|
40
|
+
export function mtoc2_cexp(z: any): {
|
|
41
|
+
re: number;
|
|
42
|
+
im: number;
|
|
43
|
+
};
|
|
44
|
+
export function mtoc2_clog(z: any): {
|
|
45
|
+
re: number;
|
|
46
|
+
im: number;
|
|
47
|
+
};
|
|
48
|
+
export function mtoc2_clog2(z: any): {
|
|
49
|
+
re: number;
|
|
50
|
+
im: number;
|
|
51
|
+
};
|
|
52
|
+
export function mtoc2_clog10(z: any): {
|
|
53
|
+
re: number;
|
|
54
|
+
im: number;
|
|
55
|
+
};
|
|
56
|
+
export function mtoc2_csin(z: any): {
|
|
57
|
+
re: number;
|
|
58
|
+
im: number;
|
|
59
|
+
};
|
|
60
|
+
export function mtoc2_ccos(z: any): {
|
|
61
|
+
re: number;
|
|
62
|
+
im: number;
|
|
63
|
+
};
|
|
64
|
+
export function mtoc2_ctan(z: any): {
|
|
65
|
+
re: number;
|
|
66
|
+
im: number;
|
|
67
|
+
};
|
|
68
|
+
export function mtoc2_catan(z: any): {
|
|
69
|
+
re: number;
|
|
70
|
+
im: number;
|
|
71
|
+
};
|
|
72
|
+
export function mtoc2_csinh(z: any): {
|
|
73
|
+
re: number;
|
|
74
|
+
im: number;
|
|
75
|
+
};
|
|
76
|
+
export function mtoc2_ccosh(z: any): {
|
|
77
|
+
re: number;
|
|
78
|
+
im: number;
|
|
79
|
+
};
|
|
80
|
+
export function mtoc2_ctanh(z: any): {
|
|
81
|
+
re: number;
|
|
82
|
+
im: number;
|
|
83
|
+
};
|
|
84
|
+
export function mtoc2_cfloor(z: any): {
|
|
85
|
+
re: number;
|
|
86
|
+
im: number;
|
|
87
|
+
};
|
|
88
|
+
export function mtoc2_cceil(z: any): {
|
|
89
|
+
re: number;
|
|
90
|
+
im: number;
|
|
91
|
+
};
|
|
92
|
+
export function mtoc2_cround(z: any): {
|
|
93
|
+
re: number;
|
|
94
|
+
im: number;
|
|
95
|
+
};
|
|
96
|
+
export function mtoc2_cfix(z: any): {
|
|
97
|
+
re: number;
|
|
98
|
+
im: number;
|
|
99
|
+
};
|
|
100
|
+
export function mtoc2_csign(z: any): {
|
|
101
|
+
re: number;
|
|
102
|
+
im: number;
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mtoc2_deep_clone(v: any): any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function mtoc2_tensor_cat(dim: any, nin: any, xs: any): {
|
|
2
|
+
mtoc2Tag: string;
|
|
3
|
+
shape: any;
|
|
4
|
+
data: any;
|
|
5
|
+
};
|
|
6
|
+
export function mtoc2_tensor_cat_complex(dim: any, nin: any, xs: any): {
|
|
7
|
+
mtoc2Tag: string;
|
|
8
|
+
shape: any[];
|
|
9
|
+
data: Float64Array<ArrayBuffer>;
|
|
10
|
+
imag: Float64Array<ArrayBuffer>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function mtoc2_tensor_cumsum_dim(t: any, dim: any): {
|
|
2
|
+
mtoc2Tag: string;
|
|
3
|
+
shape: any;
|
|
4
|
+
data: any;
|
|
5
|
+
};
|
|
6
|
+
export function mtoc2_tensor_cumprod_dim(t: any, dim: any): {
|
|
7
|
+
mtoc2Tag: string;
|
|
8
|
+
shape: any;
|
|
9
|
+
data: any;
|
|
10
|
+
};
|
|
11
|
+
export function mtoc2_tensor_cummax_dim(t: any, dim: any): {
|
|
12
|
+
mtoc2Tag: string;
|
|
13
|
+
shape: any;
|
|
14
|
+
data: any;
|
|
15
|
+
};
|
|
16
|
+
export function mtoc2_tensor_cummin_dim(t: any, dim: any): {
|
|
17
|
+
mtoc2Tag: string;
|
|
18
|
+
shape: any;
|
|
19
|
+
data: any;
|
|
20
|
+
};
|
|
21
|
+
export function mtoc2_tensor_cumsum_complex_dim(t: any, dim: any): {
|
|
22
|
+
mtoc2Tag: string;
|
|
23
|
+
shape: any[];
|
|
24
|
+
data: Float64Array<ArrayBuffer>;
|
|
25
|
+
imag: Float64Array<ArrayBuffer>;
|
|
26
|
+
};
|
|
27
|
+
export function mtoc2_tensor_cumprod_complex_dim(t: any, dim: any): {
|
|
28
|
+
mtoc2Tag: string;
|
|
29
|
+
shape: any[];
|
|
30
|
+
data: Float64Array<ArrayBuffer>;
|
|
31
|
+
imag: Float64Array<ArrayBuffer>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function mtoc2_tensor_diag_from_scalar(v: any, k: any): {
|
|
2
|
+
mtoc2Tag: string;
|
|
3
|
+
shape: any;
|
|
4
|
+
data: any;
|
|
5
|
+
};
|
|
6
|
+
export function mtoc2_tensor_diag_construct(v: any, k: any): {
|
|
7
|
+
mtoc2Tag: string;
|
|
8
|
+
shape: any;
|
|
9
|
+
data: any;
|
|
10
|
+
};
|
|
11
|
+
export function mtoc2_tensor_diag_extract(a: any, k: any): {
|
|
12
|
+
mtoc2Tag: string;
|
|
13
|
+
shape: any;
|
|
14
|
+
data: any;
|
|
15
|
+
};
|
|
16
|
+
export function mtoc2_tensor_diag_from_scalar_complex(re: any, im: any, k: any): {
|
|
17
|
+
mtoc2Tag: string;
|
|
18
|
+
shape: any[];
|
|
19
|
+
data: Float64Array<ArrayBuffer>;
|
|
20
|
+
imag: Float64Array<ArrayBuffer>;
|
|
21
|
+
};
|
|
22
|
+
export function mtoc2_tensor_diag_construct_complex(v: any, k: any): {
|
|
23
|
+
mtoc2Tag: string;
|
|
24
|
+
shape: any[];
|
|
25
|
+
data: Float64Array<ArrayBuffer>;
|
|
26
|
+
imag: Float64Array<ArrayBuffer>;
|
|
27
|
+
};
|
|
28
|
+
export function mtoc2_tensor_diag_extract_complex(a: any, k: any): {
|
|
29
|
+
mtoc2Tag: string;
|
|
30
|
+
shape: any[];
|
|
31
|
+
data: Float64Array<ArrayBuffer>;
|
|
32
|
+
imag: Float64Array<ArrayBuffer>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function mtoc2_dot_real(a: any, b: any): number;
|
|
2
|
+
export function mtoc2_dot_real_matrix(a: any, b: any): {
|
|
3
|
+
mtoc2Tag: string;
|
|
4
|
+
shape: any;
|
|
5
|
+
data: any;
|
|
6
|
+
};
|
|
7
|
+
export function mtoc2_dot_complex(a: any, b: any): {
|
|
8
|
+
re: number;
|
|
9
|
+
im: number;
|
|
10
|
+
};
|
|
11
|
+
export function mtoc2_dot_complex_matrix(a: any, b: any): {
|
|
12
|
+
mtoc2Tag: string;
|
|
13
|
+
shape: any[];
|
|
14
|
+
data: Float64Array<ArrayBuffer>;
|
|
15
|
+
imag: Float64Array<ArrayBuffer>;
|
|
16
|
+
};
|