Page MenuHomec4science

double_buffer.h
No OneTemporary

File Metadata

Created
Sat, Nov 9, 00:10

double_buffer.h

//
// Created by Arnaud Pannatier on 06.05.18.
// Based on the code of :
// - Nicolas Richart <nicolas.richart@epfl.ch>
// - Vincent Keller <vincent.keller@epfl.ch>
// - Vittoria Rezzonico <vittoria.rezzonico@epfl.ch>
// See the files AUTHORS and COPYRIGHT for the concerning informations
//
#ifndef PHPCTSUNAMIPROJECT_DOUBLE_BUFFER_H
#define PHPCTSUNAMIPROJECT_DOUBLE_BUFFER_H
#include <memory>
#include "grid.h"
class DoubleBuffer {
public:
DoubleBuffer(std::size_t m, std::size_t n);
Grid & current();
Grid & old();
void swap();
private:
std::unique_ptr<Grid> m_current;
std::unique_ptr<Grid> m_old;
};
#endif //PHPCTSUNAMIPROJECT_DOUBLE_BUFFER_H

Event Timeline