// (C) 2017 University of Bristol. See License.txt /* * InputTuple.h * */ #ifndef PROCESSOR_INPUTTUPLE_H_ #define PROCESSOR_INPUTTUPLE_H_ template struct InputTuple { Share share; T value; static int size() { return Share::size() + T::size(); } static string type_string() { return T::type_string(); } void assign(const char* buffer) { share.assign(buffer); value.assign(buffer + Share::size()); } }; template struct RefInputTuple { Share& share; T& value; RefInputTuple(Share& share, T& value) : share(share), value(value) {} void operator=(InputTuple& other) { share = other.share; value = other.value; } }; #endif /* PROCESSOR_INPUTTUPLE_H_ */