Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81415342
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
Thu, Sep 5, 23:06
Size
545 B
Mime Type
text/x-c++
Expires
Sat, Sep 7, 23:06 (2 d)
Engine
blob
Format
Raw Data
Handle
20325833
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