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

Functions

template<domain D>
D bool any (D bool b)
 
template<domain D, dim N>
D bool any (D bool arr)
 

Detailed Description

Function for checking if any element in a boolean vector is true.

Note
D - all protection domains
Supported types - bool
Returns
true if any of the input bits are set
false if all input bits are not set
Note
iteratively checks all elements in input vector and returns true when the first 1-bit is found.
Leakage
None

Function Documentation

◆ any() [1/2]

template<domain D, dim N>
D bool any ( D bool  arr)
Parameters
arr- boolean any dimension array

◆ any() [2/2]

template<domain D>
D bool any ( D bool  vec)
Parameters
b- boolean scalar
vec- boolean 1-dimensional vector