SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
choose(multiple conditions)

Function for obliviously choosing pointwise from the inputs.

Note
D - all protection domains
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64
Parameters
cond- a boolean array
first- values for true case
second- values for false case
Returns
pointwise check if cond at a certain position is true or false. if true the element of first at that position is returned else the element of second at that position is returned
Leakage
None