Hacker News
new
past
comments
ask
show
jobs
points
by
tredre3
3 hours ago
|
comments
by
misev
3 hours ago
|
next
[-]
You could rewrite it to
int* ptr = ((v != 0) * lwr) + ((v == 0) * rwr);
I doubt it would be faster than the ternary though.
reply
by
xyzsparetimexyz
2 hours ago
|
prev
|
[-]
Does any standard library have a glsl-like select(condition, true_val, false_val) that is more or less guaranteed to correspond to a csel?
reply