Skip to content

Commit

Permalink
DataServices: Qualify math functions with std:: namespace specifier (
Browse files Browse the repository at this point in the history
…#3406)

## Summary
As in the title. This fixes #3405.

## Additional background
I did briefly look at using `powi`, but I don't think the exponents are
known at compile time.

I also added some auto-generated source files to .gitignore.
  • Loading branch information
mirenradia authored Jul 6, 2023
1 parent 28df482 commit 2cd314f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,10 @@ Tutorials/EB/Donut/Exec/ls_plt*

# local config
Tools/GNUMake/Make.local
Tools/GNUMake/Make.local-pre
Tools/GNUMake/Make.local-pre

# profparser
BLProfParser.lex.yy.cpp
BLProfParser.tab.H
BLProfParser.tab.cpp
BLProfParserNC.y
4 changes: 2 additions & 2 deletions Src/Extern/amrdata/AMReX_DataServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ void DataServices::RunTimelinePF(std::map<int, std::string> &mpiFuncNames,
int ntnSize(nameTagNames.size());
ntnNumbers.resize(ntnSize, 0.0);
if(ntnSize > 0) {
ntnMultiplier = pow(10, static_cast<int>( 1 + log10(ntnSize)));
ntnMultiplier = std::pow(10, static_cast<int>( 1 + std::log10(ntnSize)));
}
for(int i(0); i < ntnSize; ++i) {
if(ntnMultiplier > 0.0) {
Expand All @@ -2501,7 +2501,7 @@ void DataServices::RunTimelinePF(std::map<int, std::string> &mpiFuncNames,
int bnSize(barrierNames.size());
bnNumbers.resize(bnSize, 0.0);
if(bnSize > 0) {
bnMultiplier = pow(10, static_cast<int>( 1 + log10(bnSize)));
bnMultiplier = std::pow(10, static_cast<int>( 1 + std::log10(bnSize)));
}
for(int i(0); i < bnSize; ++i) {
if(bnMultiplier > 0.0) {
Expand Down

0 comments on commit 2cd314f

Please sign in to comment.