/* * MatrixFile.h * */ #ifndef PROTOCOLS_MATRIXFILE_H_ #define PROTOCOLS_MATRIXFILE_H_ #include "Processor/Data_Files.h" #include "ShareMatrix.h" template class MatrixFile : public Preprocessing> { typedef Preprocessing> super; array dims; ifstream file; public: MatrixFile(array dims, DataPositions& usage, Player& P) : super(usage), dims(dims) { string filename = PrepBase::get_matrix_prefix( get_prep_sub_dir(P.num_players()), dims) + "-P" + to_string(P.my_num()); file.open(filename); check_file_signature(file, filename); } void get_three_no_count(Dtype type, ShareMatrix& A, ShareMatrix& B, ShareMatrix& C) { assert(type == DATA_TRIPLE); A = {dims[0], dims[1]}; B = {dims[1], dims[2]}; C = {dims[0], dims[2]}; A.input(file); B.input(file); C.input(file); } }; #endif /* PROTOCOLS_MATRIXFILE_H_ */