23 lines
520 B
C++
23 lines
520 B
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <vector>
|
|
struct Config;
|
|
class GPU {
|
|
struct Impl;
|
|
std::unique_ptr<Impl> p;
|
|
|
|
public:
|
|
GPU(const Config &, int priority, bool snapshots = true);
|
|
~GPU();
|
|
void step();
|
|
void sync();
|
|
bool snapshot(bool mandatory);
|
|
const unsigned char *pixels() const;
|
|
void ack();
|
|
std::vector<unsigned char> unpack();
|
|
void benchmark();
|
|
uint64_t aggregateNs() const;
|
|
uint64_t downloadNs() const;
|
|
void loadTestCells(const std::vector<unsigned char> &cells);
|
|
};
|