Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65661970
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
Wed, Jun 5, 09:12
Size
583 B
Mime Type
text/x-c++
Expires
Fri, Jun 7, 09:12 (2 d)
Engine
blob
Format
Raw Data
Handle
18108761
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
=
0
,
int
n
=
0
);
void
resize
(
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