@sdeverywhere/runtime 0.2.3 → 0.2.5
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/dist/index.cjs +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -962,4 +962,18 @@ declare class ModelScheduler {
|
|
|
962
962
|
private runWasmModelNow;
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
|
|
965
|
+
/**
|
|
966
|
+
* Return a timestamp that can be passed to `perfElapsed` for calculating the elapsed
|
|
967
|
+
* time of an operation.
|
|
968
|
+
*
|
|
969
|
+
* @hidden This is not part of the public API; exposed only for use in performance testing.
|
|
970
|
+
*/
|
|
971
|
+
declare function perfNow(): unknown;
|
|
972
|
+
/**
|
|
973
|
+
* Return the elapsed time between the given timestamp (created by `perfNow`) and now.
|
|
974
|
+
*
|
|
975
|
+
* @hidden This is not part of the public API; exposed only for use in performance testing.
|
|
976
|
+
*/
|
|
977
|
+
declare function perfElapsed(t0: unknown): number;
|
|
978
|
+
|
|
979
|
+
export { BufferedRunModelParams, type GeneratedModel, type InputCallbacks, type InputValue, type InputVarId, type JsModel, type JsModelFunctionContext, type JsModelFunctions, type LookupDef, MockJsModel, MockWasmModule, ModelListing, type ModelListingSpecs, type ModelRunner, ModelScheduler, type OnEvalAux, type OnRunModel, type OutputVarId, Outputs, type ParseError, type Point, ReferencedRunModelParams, type RunModelOptions, type RunModelParams, type RunnableModel, Series, type VarId, type VarName, type VarRef, type VarSpec, type WasmModule, createInputValue, createLookupDef, createRunnableModel, createSynchronousModelRunner, decodeLookups, encodeLookups, encodeVarIndices, execJsModel, getEncodedLookupBufferLengths, getEncodedVarIndicesLength, getJsModelFunctions, initJsModel, initWasmModel, perfElapsed, perfNow };
|
package/dist/index.d.ts
CHANGED
|
@@ -962,4 +962,18 @@ declare class ModelScheduler {
|
|
|
962
962
|
private runWasmModelNow;
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
|
|
965
|
+
/**
|
|
966
|
+
* Return a timestamp that can be passed to `perfElapsed` for calculating the elapsed
|
|
967
|
+
* time of an operation.
|
|
968
|
+
*
|
|
969
|
+
* @hidden This is not part of the public API; exposed only for use in performance testing.
|
|
970
|
+
*/
|
|
971
|
+
declare function perfNow(): unknown;
|
|
972
|
+
/**
|
|
973
|
+
* Return the elapsed time between the given timestamp (created by `perfNow`) and now.
|
|
974
|
+
*
|
|
975
|
+
* @hidden This is not part of the public API; exposed only for use in performance testing.
|
|
976
|
+
*/
|
|
977
|
+
declare function perfElapsed(t0: unknown): number;
|
|
978
|
+
|
|
979
|
+
export { BufferedRunModelParams, type GeneratedModel, type InputCallbacks, type InputValue, type InputVarId, type JsModel, type JsModelFunctionContext, type JsModelFunctions, type LookupDef, MockJsModel, MockWasmModule, ModelListing, type ModelListingSpecs, type ModelRunner, ModelScheduler, type OnEvalAux, type OnRunModel, type OutputVarId, Outputs, type ParseError, type Point, ReferencedRunModelParams, type RunModelOptions, type RunModelParams, type RunnableModel, Series, type VarId, type VarName, type VarRef, type VarSpec, type WasmModule, createInputValue, createLookupDef, createRunnableModel, createSynchronousModelRunner, decodeLookups, encodeLookups, encodeVarIndices, execJsModel, getEncodedLookupBufferLengths, getEncodedVarIndicesLength, getJsModelFunctions, initJsModel, initWasmModel, perfElapsed, perfNow };
|
package/dist/index.js
CHANGED
|
@@ -547,8 +547,14 @@ var BufferedRunModelParams = class {
|
|
|
547
547
|
}
|
|
548
548
|
// from RunModelParams interface
|
|
549
549
|
storeOutputs(array) {
|
|
550
|
-
|
|
551
|
-
|
|
550
|
+
if (this.outputs.view === void 0) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
if (array.length > this.outputs.view.length) {
|
|
554
|
+
this.outputs.view.set(array.subarray(0, this.outputs.view.length));
|
|
555
|
+
} else {
|
|
556
|
+
this.outputs.view.set(array);
|
|
557
|
+
}
|
|
552
558
|
}
|
|
553
559
|
// from RunModelParams interface
|
|
554
560
|
getLookups() {
|
|
@@ -1880,6 +1886,8 @@ export {
|
|
|
1880
1886
|
getEncodedVarIndicesLength,
|
|
1881
1887
|
getJsModelFunctions,
|
|
1882
1888
|
initJsModel,
|
|
1883
|
-
initWasmModel
|
|
1889
|
+
initWasmModel,
|
|
1890
|
+
perfElapsed,
|
|
1891
|
+
perfNow
|
|
1884
1892
|
};
|
|
1885
1893
|
//# sourceMappingURL=index.js.map
|