lanl/singularity-eos

Consider replacing ternary expressions with multiplicative conditionals

Ouverte

#319 ouverte le 27 oct. 2023

 (2 commentaires) (1 réaction) (0 personne assignée)C++ (21 forks)auto 404
Performancegood first issue

Métriques du dépôt

Stars
 (36 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

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.

Guide contributeur