lanl/singularity-eos

Consider replacing ternary expressions with multiplicative conditionals

Offen

#319 geöffnet am 27.10.2023

 (2 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (21 Forks)auto 404
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.

Contributor Guide