I am wondering what this line of code mean?
b = (gen_rand_uniform()>0.5)?1:0;
The gren_rand_uniform() is a function to generate
gren_rand_uniform()
Conditional assignment:
variable = condition ? value_if_true : value_if_false;
which is equal to:
if (condition) { variable = value_if_true; } else { variable = value_if_false; }
The code you give us is just random bool. It will return either 1 or 0.