lanl/singularity-eos
Consider replacing ternary expressions with multiplicative conditionals
开放
#319 创建于 2023年10月27日
Performancegood first issue
仓库指标
- 星标
- (36 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
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.