mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-05-13 03:00:24 -04:00
35 lines
551 B
C++
35 lines
551 B
C++
/*
|
|
* BufferScope.h
|
|
*
|
|
*/
|
|
|
|
#ifndef PROTOCOLS_BUFFERSCOPE_H_
|
|
#define PROTOCOLS_BUFFERSCOPE_H_
|
|
|
|
template<class T> class BufferPrep;
|
|
template<class T> class Preprocessing;
|
|
|
|
#include "Processor/OnlineOptions.h"
|
|
|
|
template<class T>
|
|
class BufferScope
|
|
{
|
|
T& prep;
|
|
int bak;
|
|
|
|
public:
|
|
BufferScope(T& prep, int buffer_size) :
|
|
prep(prep)
|
|
{
|
|
bak = this->prep.buffer_size;
|
|
this->prep.buffer_size = buffer_size;
|
|
}
|
|
|
|
~BufferScope()
|
|
{
|
|
prep.buffer_size = bak;
|
|
}
|
|
};
|
|
|
|
#endif /* PROTOCOLS_BUFFERSCOPE_H_ */
|