Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Feb 14, 2022
1 parent fe084aa commit 0fd77bb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const r = await mean.evalAsync(inputArray);
### Table of Contents

* [toString](#tostring)
* [allocator](#allocator)
* [expression](#expression)
* [maxActive](#maxactive)
* [maxParallel](#maxparallel)
Expand All @@ -146,7 +147,9 @@ const r = await mean.evalAsync(inputArray);
* [reduce](#reduce)
* [Parameters](#parameters-3)
* [Examples](#examples-3)
* [allocator](#allocator-1)
* [maxParallel](#maxparallel-1)
* [type](#type-1)
* [Expression](#expression-1)
* [Parameters](#parameters-4)
* [Examples](#examples-4)
Expand All @@ -157,6 +160,12 @@ Get a string representation of this object

Returns **string** 

## allocator

Return the data type constructor

Type: TypedArrayConstructor

## expression

Return the expression as a string
Expand Down Expand Up @@ -239,8 +248,14 @@ const result = new Float32Array(P.length);
// sync
density.cwise({phi, T, P, R, Md, Mv}, result);

// sync multithreaded
density.cwise(os.cpus().length, {phi, T, P, R, Md, Mv}, result);

// async
await density.cwiseAsync({phi, T, P, R, Md, Mv}, result);

// async multithreaded
await density.cwiseAsync(os.cpus().length, {phi, T, P, R, Md, Mv}, result);
```

Returns **TypedArray\<T>**&#x20;
Expand Down Expand Up @@ -313,9 +328,9 @@ const r2 = expr.map(array, 'x', {f: 0, c: 0});
expr.mapAsync(array, 'x', 0, 1000, (e,r) => console.log(e, r));
expr.mapAsync(array, 'x', {f: 0, c: 0}, (e,r) => console.log(e, r));

// Using 4 multiple parallel threads (OpenMP-style parallelism)
// Using multiple (4) parallel threads (OpenMP-style parallelism)
const r1 = expr.map(4, array, 'x', 0, 1000);
const r2 = expr.map(4, array, 'x', {f: 0, c: 0});
const r2 = await expr.mapAsync(4, array, 'x', {f: 0, c: 0});
```

Returns **TypedArray\<T>**&#x20;
Expand Down Expand Up @@ -356,13 +371,25 @@ const sumSq = await sum.reduceAsync(array, 'x', {'a' : 0}, (e,r) => console.log(

Returns **number**&#x20;

## allocator

Return the data type constructor

Type: TypedArrayConstructor

## maxParallel

Get the number of threads available for evaluating expressions.
Set by the `EXPRTKJS_THREADS` environment variable.

Type: number

## type

Return the type as a string

Type: string

## Expression

### Parameters
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"codecov": "cd coverage && curl -s https://codecov.io/bash | bash"
},
"name": "exprtk.js",
"version": "2.0.0-alpha.0",
"version": "2.0.0",
"description": "JS Mathematical Expression Toolkit Library",
"repository": {
"type": "git",
Expand Down

0 comments on commit 0fd77bb

Please sign in to comment.