#pragma once #include #include #include "fuck_intel.h" #include #include "constants.h" #include "typedefs.h" struct Pixels { Counters counters{}; std::array pixels{0.f}; Pixels& operator+=(const Pixels& other); Pixels& operator/=(const float divider); // TODO: tests for everything everywhere /*! * \brief load - load binary pixels from file * \param filename - file path * \return Pixels on success, empty std::optional otherwise */ [[nodiscard]] static std::optional load(const QString& filename); /*! * \brief save - save binary profile to file * \param filename - file path * \return - true on success, false otherwise */ [[nodiscard]] bool save(const QString& filename); operator bool() const; // TODO: forbid copying // Pixels() = default; // Pixels(Pixels &&) = default; // Pixels &operator=(Pixels &&) = default; // Pixels(Pixels &) = delete; // Pixels(const Pixels &) = delete; // Pixels &operator=(Pixels &) = delete; // Pixels &operator=(const Pixels &) = delete; /*! * \brief lock - lock any write operations on this `Pixels` * \return lock guard */ // std::lock_guard lock(); // private: // std::mutex m_mtx; };