Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91527172
double_buffer.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 11, 22:32
Size
545 B
Mime Type
text/x-c++
Expires
Wed, Nov 13, 22:32 (2 d)
Engine
blob
Format
Raw Data
Handle
22278492
Attached To
R7871 phys-743-exercises
double_buffer.hh
View Options
#ifndef DOUBLE_BUFFER
#define DOUBLE_BUFFER
/* -------------------------------------------------------------------------- */
#include <memory>
/* -------------------------------------------------------------------------- */
#include "grid.hh"
/* -------------------------------------------------------------------------- */
class DoubleBuffer {
public:
DoubleBuffer(int m, int n);
Grid & current();
Grid & old();
void swap();
private:
std::unique_ptr<Grid> m_current;
std::unique_ptr<Grid> m_old;
};
#endif /* DOUBLE_BUFFER */
Event Timeline
Log In to Comment