#pragma once
#include <cstddef>
#include <initializer_list>
#include "vt/backend.h"
#include "vt/tensor.h"
namespace vt {
class StepArena {
public:
StepArena(Device device, size_t capacity_bytes);
~StepArena();
StepArena(const StepArena&) = delete;
StepArena& operator=(const StepArena&) = delete;
Tensor Alloc(DType dtype, std::initializer_list<int64_t> shape);
void Reset();
size_t Used() const { return used_; }
size_t HighWater() const { return high_water_; }
size_t Capacity() const { return capacity_; }
private:
Device device_;
char* base_ = nullptr;
size_t capacity_ = 0;
size_t used_ = 0;
size_t high_water_ = 0;
};
}