Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdpar/src/lulesh-util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void VerifyAndWriteFinalOutput(Real_t elapsed_time,

if (MaxAbsDiff <AbsDiff) MaxAbsDiff = AbsDiff;

Real_t RelDiff = AbsDiff / locDom.e(k*nx+j);
Real_t RelDiff = FABS(locDom.e(k*nx+j)) > 1e-8 ? AbsDiff / locDom.e(k*nx+j) : 0.0;

if (MaxRelDiff <RelDiff) MaxRelDiff = RelDiff;
}
Expand Down
2 changes: 1 addition & 1 deletion stdpar/src/lulesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef long double real10 ; // 10 bytes on x86
typedef int32_t Int4_t ;
typedef int64_t Int8_t ;
typedef Int4_t Index_t ; // array subscript and loop index
typedef real4 Real_t ; // floating point representation
typedef real8 Real_t ; // floating point representation
typedef Int4_t Int_t ; // integer representation

enum { VolumeError = -1, QStopError = -2 } ;
Expand Down