llama-cpp-turboquant/examples/godot_examples/gdnative_shared/src/KomputeSummator.hpp
Fabian Sauter 24cd307042 Added .clang-format file and formatted everything
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
2022-05-02 15:11:40 +02:00

35 lines
605 B
C++

#pragma once
#include <Godot.hpp>
#include <Node2D.hpp>
#include <memory>
#include "kompute/Kompute.hpp"
namespace godot {
class KomputeSummator : public Node2D
{
private:
GODOT_CLASS(KomputeSummator, Node2D);
public:
KomputeSummator();
void add(float value);
void reset();
float get_total() const;
void _process(float delta);
void _init();
static void _register_methods();
private:
kp::Manager mManager;
std::shared_ptr<kp::Sequence> mSequence;
std::shared_ptr<kp::Tensor> mPrimaryTensor;
std::shared_ptr<kp::Tensor> mSecondaryTensor;
};
}