Documentation ¶
Index ¶
- func Float64frombytes(bytes []byte) float64
- func MatMult4Stream(cryptoParams *crypto.CryptoParams, A crypto.CipherMatrix, fs *FileStream, ...) (crypto.CipherMatrix, []float64, []float64)
- func MatMult4StreamPreprocess(cryptoParams *crypto.CryptoParams, fs *FileStream, maxLevel int, ...)
- type Config
- type FileStream
- type ProtocolInfo
- func (g *ProtocolInfo) CachePath(filename string) string
- func (prot *ProtocolInfo) DistributedPCA(X, XT *FileStream, Xcache, XTcache string) (Q crypto.CipherMatrix)
- func (prot *ProtocolInfo) GetConfig() *Config
- func (prot *ProtocolInfo) PCA()
- func (g *ProtocolInfo) SyncAndTerminate(closeChannelFlag bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64frombytes ¶
func MatMult4Stream ¶
func MatMult4Stream(cryptoParams *crypto.CryptoParams, A crypto.CipherMatrix, fs *FileStream, maxLevel int, computeSquaredSum bool, nproc int) (crypto.CipherMatrix, []float64, []float64)
func MatMult4StreamPreprocess ¶
func MatMult4StreamPreprocess(cryptoParams *crypto.CryptoParams, fs *FileStream, maxLevel int, cacheFilePrefix string)
Types ¶
type Config ¶
type Config struct { NumMainParties int `toml:"num_main_parties"` HubPartyId int `toml:"hub_party_id"` CkksParams string `toml:"ckks_params"` DivSqrtMaxLen int `toml:"div_sqrt_max_len"` NumRows []int `toml:"num_rows"` NumColumns int `toml:"num_columns"` ItersPerEval int `toml:"iter_per_eigenval"` NumPCs int `toml:"num_pcs_to_remove"` NumOversample int `toml:"num_oversampling"` NumPowerIters int `toml:"num_power_iters"` BindingIP string `toml:"binding_ipaddr"` Servers map[string]mpc.Server InputFile string `toml:"input_file"` // for pca OutDir string `toml:"output_dir"` CacheDir string `toml:"cache_dir"` MpcFieldSize int `toml:"mpc_field_size"` MpcDataBits int `toml:"mpc_data_bits"` MpcFracBits int `toml:"mpc_frac_bits"` MpcNumThreads int `toml:"mpc_num_threads"` LocalNumThreads int `toml:"local_num_threads"` MemoryLimit uint64 `toml:"memory_limit"` Debug bool `toml:"debug"` }
type FileStream ¶
type FileStream struct {
// contains filtered or unexported fields
}
func NewFileStream ¶
func NewFileStream(filename string, numRows, numCols uint64) *FileStream
func (*FileStream) CheckEOF ¶
func (fs *FileStream) CheckEOF() bool
func (*FileStream) NextRow ¶
func (fs *FileStream) NextRow() []float64
func (*FileStream) NumCols ¶
func (fs *FileStream) NumCols() uint64
func (*FileStream) NumRows ¶
func (fs *FileStream) NumRows() uint64
func (*FileStream) Reset ¶
func (fs *FileStream) Reset()
type ProtocolInfo ¶
type ProtocolInfo struct {
// contains filtered or unexported fields
}
func InitializePCAProtocol ¶
func InitializePCAProtocol(config *Config, pid int, mpcOnly bool) (pcaProt *ProtocolInfo)
func (*ProtocolInfo) CachePath ¶
func (g *ProtocolInfo) CachePath(filename string) string
func (*ProtocolInfo) DistributedPCA ¶
func (prot *ProtocolInfo) DistributedPCA(X, XT *FileStream, Xcache, XTcache string) (Q crypto.CipherMatrix)
func (*ProtocolInfo) GetConfig ¶
func (prot *ProtocolInfo) GetConfig() *Config
func (*ProtocolInfo) PCA ¶
func (prot *ProtocolInfo) PCA()
func (*ProtocolInfo) SyncAndTerminate ¶
func (g *ProtocolInfo) SyncAndTerminate(closeChannelFlag bool)
Click to show internal directories.
Click to hide internal directories.