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

Functions

template<domain D :shared3p >
D bool any (D bool b)
 
template<domain D :shared3p >
D bool any (D bool[[1]] vec)
 
template<domain D :shared3p >
D bool any (D bool[[1]] vec, uint k)
 
template<domain D :shared3p , dim N>
D bool any (D bool[[N]] arr)
 

Detailed Description

Function for checking if any value of the input vector is true.

Note
D - shared3p protection domain
Supported types - bool
Returns
true if any of the input bits is set
false if all input bits are not set
Note
performs one vectorized cast, and one comparison against zero
Leakage
None

Function Documentation

◆ any() [1/4]

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

◆ any() [2/4]

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

◆ any() [3/4]

D bool any ( D bool[[1]]  vec,
uint  k 
)
Parameters
vec- boolean 1-dimensional vector
k- an uint type value that shows in how many subarrays must any be found

◆ any() [4/4]

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