lanl/singularity-eos
View on GitHubConsider replacing ternary expressions with multiplicative conditionals
Open
#319 opened on Oct 27, 2023
Performancegood first issue
Repository metrics
- Stars
- (36 stars)
- PR merge metrics
- (PR metrics pending)
Description
Per @Yurlungur we may want to replace
x = cond ? a : b
with
x = (cond) * a + (1 - cond) * b
to reduce branching and improve GPU performance.
This might be premature optimization, but it also might be a good way to specify default handling of NaNs as well.