Skip to content

Commit 2a77006

Browse files
committed
Update Readme
1 parent 9c75c5d commit 2a77006

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ is designed for high-performance computing applications that solve partial
88
differential equations on block-structured adaptive meshes. This library is
99
for users who wish to utilize the parser functionality without incorporating
1010
the full AMReX framework. It supports both CPU and GPU architectures,
11-
including Nvidia, AMD, and Intel GPUs. It requires C++17 or later.
11+
including Nvidia, AMD, and Intel GPUs. While the construction and
12+
initializaion of a `Parser` object are not thread-safe, the evaluation of
13+
parsed expressions is fully thread-safe. The library requires C++17 or
14+
later.
1215

1316
## Features
1417

@@ -41,8 +44,10 @@ example of using the parser.
4144
parser.registerVariables({"x","y","z"});
4245
auto f = parser.compile<3>(); // 3 because there are three variables.
4346

44-
// f can be used in both host and device code. It takes 3 arguments in
45-
// this example. The parser object must be alive for f to be valid.
47+
// ParserExecutor<3> f is thread-safe, and can be used in both host and
48+
// device code. It takes 3 arguments in this example. The parser object
49+
// must be alive for f to be valid.
50+
4651
for (int k = 0; ...) {
4752
for (int j = 0; ...) {
4853
for (int i = 0; ...) {
@@ -55,7 +60,7 @@ example of using the parser.
5560
Local automatic variables can be defined in the expression. For example,
5661
5762
```c++
58-
Parser parser("r2=x*x+y*y; r=sqrt(r2); cos(a+r2)*log(r)"
63+
Parser parser("r2=x*x+y*y; r=sqrt(r2); cos(a+r2)*log(r)");
5964
parser.setConstant("a", ...);
6065
parser.registerVariables({"x","y"});
6166
auto f = parser.compile<2>(); // 2 because there are two variables.

0 commit comments

Comments
 (0)