@daneren2005/shared-memory-objects 0.0.13 → 0.0.14
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/shared-memory-objects.js +389 -357
- package/dist/shared-memory-objects.js.map +1 -1
- package/dist/shared-memory-objects.umd.cjs +1 -1
- package/dist/shared-memory-objects.umd.cjs.map +1 -1
- package/dist/src/main.d.ts +1 -0
- package/dist/src/utils/atomic-math.d.ts +4 -0
- package/dist/src/utils/float32-atomics.d.ts +4 -3
- package/package.json +1 -1
package/dist/src/main.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './interfaces/typed-array';
|
|
|
12
12
|
export * from './interfaces/typed-array-constructor';
|
|
13
13
|
export * from './utils/16-from-32-array';
|
|
14
14
|
export * from './utils/16-from-64-array';
|
|
15
|
+
export * from './utils/atomic-math';
|
|
15
16
|
export * from './utils/float32-atomics';
|
|
16
17
|
export * from './utils/pointer';
|
|
17
18
|
export * from './lock/simple-lock';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function addAtomicInt(array: Uint32Array | Int32Array, index: number, amount: number, max: number): void;
|
|
2
|
+
export declare function subtractAtomicInt(array: Uint32Array | Int32Array, index: number, amount: number, min: number): void;
|
|
3
|
+
export declare function addAtomicFloat32(array: Float32Array, index: number, amount: number, max: number): void;
|
|
4
|
+
export declare function subtractAtomicFloat(array: Float32Array, index: number, amount: number, min: number): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare function loadFloat32(data: Int32Array | Uint32Array, index: number): number;
|
|
2
|
-
export declare function storeFloat32(data: Int32Array | Uint32Array, index: number, value: number): void;
|
|
1
|
+
export declare function loadFloat32(data: Int32Array | Uint32Array | Float32Array, index: number): number;
|
|
2
|
+
export declare function storeFloat32(data: Int32Array | Uint32Array | Float32Array, index: number, value: number): void;
|
|
3
3
|
export declare function convertInt32ToFloat32(value: number): number;
|
|
4
4
|
export declare function convertFloat32ToInt32(value: number): number;
|
|
5
|
-
export declare function exchangeFloat32(data: Int32Array | Uint32Array, index: number, value: number): number;
|
|
5
|
+
export declare function exchangeFloat32(data: Int32Array | Uint32Array | Float32Array, index: number, value: number): number;
|
|
6
|
+
export declare function compareExchangeFloat32(data: Int32Array | Uint32Array | Float32Array, index: number, expectedValue: number, replacementValue: number): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daneren2005/shared-memory-objects",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"author": "daneren2005@gmail.com",
|
|
5
5
|
"description": "Creating objects with a SharedArrayBuffer",
|
|
6
6
|
"homepage": "https://github.com/daneren2005/shared-memory-objects#readme",
|