lanl/singularity-eos
Consider replacing ternary expressions with multiplicative conditionals
Offen
#319 geöffnet am 27.10.2023
Performancegood first issue
Repository-Metriken
- Stars
- (36 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
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.