Skip to content

Commit 82fa0de

Browse files
authored
Minor Updates (#4723)
* Update documentation on Parser. * Remove obsolete comment. * Make IParser consistent with Parser.
1 parent 2e583c2 commit 82fa0de

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Docs/sphinx_documentation/source/Basics.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,9 @@ the parser.
669669
parser.registerVariables({"x","y","z"});
670670
auto f = parser.compile<3>(); // 3 because there are three variables.
671671

672-
// f can be used in both host and device code. It takes 3 arguments in
673-
// this example. The parser object must be alive for f to be valid.
672+
// ParserExecutor<3> f is thread-safe, and can be used in both host and
673+
// device code. It takes 3 arguments in this example. The parser object
674+
// must be alive for f to be valid.
674675
for (int k = 0; ...) {
675676
for (int j = 0; ...) {
676677
for (int i = 0; ...) {
@@ -685,7 +686,7 @@ Local automatic variables can be defined in the expression. For example,
685686
686687
::
687688

688-
Parser parser("r2=x*x+y*y; r=sqrt(r2); cos(a+r2)*log(r)"
689+
Parser parser("r2=x*x+y*y; r=sqrt(r2); cos(a+r2)*log(r)");
689690
parser.setConstant("a", ...);
690691
parser.registerVariables({"x","y"});
691692
auto f = parser.compile<2>(); // 2 because there are two variables.

Src/Base/AMReX_Utility.H

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ namespace amrex
9494
void UtilCreateCleanDirectory (const std::string &path,
9595
bool callbarrier = true);
9696

97-
///
98-
/**
99-
Create a new directory, removing old one if it exists.
100-
This will only work on unix systems, as it has a system call.
101-
*/
97+
//! Create a new directory, removing old one if it exists.
10298
void UtilCreateDirectoryDestructive(const std::string &path,
10399
bool callbarrier = true);
104100

Src/Base/Parser/AMReX_IParser.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ IParserExecutor<N>
111111
IParser::compileHost () const
112112
{
113113
if (m_data && m_data->m_iparser) {
114-
AMREX_ASSERT(N == m_data->m_nvars);
114+
AMREX_ALWAYS_ASSERT(N == m_data->m_nvars);
115115

116116
if (!(m_data->m_host_executor)) {
117117
int stack_size;

0 commit comments

Comments
 (0)