SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D>
D bool any (D bool b)
 
template<domain D>
D bool any (D bool[[1]] vec)
 
template<domain D, dim N>
D bool any (D bool[[N]] 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/3]

D bool any ( D bool  b)
Parameters
b- boolean scalar

◆ any() [2/3]

D bool any ( D bool[[1]]  vec)
Parameters
vec- boolean 1-dimensional vector

◆ any() [3/3]

D bool any ( D bool[[N]]  arr)
Parameters
arr- boolean any dimension array