Calling a Matrix Arithmetic Operator
Matrix arithmetic operators support two-party operations. The two compute nodes are set to compute nodes 0 and 1.
- Configure KCAL settings, such as communication APIs and node information, through DataGuard APIs.
- Initialize the function group for matrix arithmetic operators. This function group includes all the public APIs for matrix arithmetic operators.
- Apply the settings to KCAL during initialization.
- Set the information about all nodes.
- Exchange seed information.Compute node 0:
- Call the secret sharing API twice: once for receiving data shares of compute node 1, and again for splitting data of compute node 0 itself into shares and sending to compute node 1 the share size of compute node 0.
- Concatenate the data shares of both nodes in a specific order as input parameters for the calculate API.
- Call the calculate API to perform calculation based on the input operator type.
- Call the reveal API to obtain the final calculation output.
Compute node 1:- Call the secret sharing API twice: once for splitting data of compute node 1 itself into shares and sending the data shares to compute node 0, and again for receiving the share size of compute node 0.
- Use all the data shares as the input parameters of the calculate API.
- Call the calculate API to perform calculation based on the input operator type.
- Call the reveal API to obtain the final calculation output.
Parent topic: Calling KCAL