MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / reshape_shared_array

Function reshape_shared_array

ciphercore-base/src/mpc/mpc_psi.rs:104–114  ·  view source on GitHub ↗
(a: Node, new_t: Type)

Source from the content-addressed store, hash-verified

102}
103
104fn reshape_shared_array(a: Node, new_t: Type) -> Result<Node> {
105 if is_shared(&a)? {
106 let mut shares = vec![];
107 for share_id in 0..PARTIES as u64 {
108 shares.push(a.tuple_get(share_id)?.reshape(new_t.clone())?);
109 }
110 a.get_graph().create_tuple(shares)
111 } else {
112 a.reshape(new_t)
113 }
114}
115
116fn merge_mask_data(mask: Node, data: Node) -> Result<Node> {
117 let g = mask.get_graph();

Callers 2

apply_maskFunction · 0.85
instantiateMethod · 0.85

Calls 7

is_sharedFunction · 0.85
cloneMethod · 0.80
pushMethod · 0.45
reshapeMethod · 0.45
tuple_getMethod · 0.45
create_tupleMethod · 0.45
get_graphMethod · 0.45

Tested by

no test coverage detected