rps-cuda/server/gpu.hpp
2026-11-26 09:07:21 +03:00

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);
};