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

Functions

template<domain D :shared3p >
D float32 vectorUpdate (D float32 vec, D uint index, D float32 newValue)
 
template<domain D :shared3p >
D float64 vectorUpdate (D float64 vec, D uint index, D float64 newValue)
 

Detailed Description

Function for obliviously updating an element in the input vector.

Note
D - shared3p protection domain
Supported types - float64 / float32
Parameters
vec- a 1-dimensional vector of supported type
index- an uint type scalar for specifying the element to replace
newValue- a scalar value of the same type as the input vector
Returns
returns a vector with the value at position index replaced by newValue
Leakage
None

Function Documentation

◆ vectorUpdate() [1/2]

template<domain D :shared3p >
D float32 vectorUpdate ( D float32  vec,
D uint  index,
D float32  newValue 
)

◆ vectorUpdate() [2/2]

template<domain D :shared3p >
D float64 vectorUpdate ( D float64  vec,
D uint  index,
D float64  newValue 
)