Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91677202
double_buffer.cc
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
Wed, Nov 13, 09:13
Size
791 B
Mime Type
text/x-c
Expires
Fri, Nov 15, 09:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22303887
Attached To
R7871 phys-743-exercises
double_buffer.cc
View Options
/* -------------------------------------------------------------------------- */
#include "double_buffer.hh"
#include "grid.hh"
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
DoubleBuffer::DoubleBuffer(int m, int n)
: m_current(new Grid(m, n)), m_old(new Grid(m, n)) {}
/* -------------------------------------------------------------------------- */
Grid & DoubleBuffer::current() { return *m_current; }
/* -------------------------------------------------------------------------- */
Grid & DoubleBuffer::old() { return *m_old; }
/* -------------------------------------------------------------------------- */
void DoubleBuffer::swap() {
m_current.swap(m_old);
}
Event Timeline
Log In to Comment