Skip to content

Commit 0bcb0ea

Browse files
committed
Now OPM_ERROR_IF executes condition also on GPU even with NDEBUG defined.
1 parent aaf1a57 commit 0bcb0ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opm/common/ErrorMacros.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
/**
126126
* @brief assert(condition) is only used on the GPU, as throwing exceptions is not supported.
127127
*/
128-
#define OPM_ERROR_IF(condition, message) \
129-
assert(condition)
128+
#define OPM_ERROR_IF(condition, message) \
129+
do {if(condition){assert(false);}} while(false)
130130
#endif // GPU
131131
#endif // OPM_ERRORMACROS_HPP

0 commit comments

Comments
 (0)