9#include <spdlog/spdlog.h>
16 spdlog::error(
"[WorkingImageHalide::initializeHalide]: Cannot initialize Halide buffer: data span is empty.");
23 m_halide_buffer = Halide::Buffer<float>::make_interleaved(data.data(), width, height, channels);
26 spdlog::error(
"[WorkingImageHalide::initializeHalide]: Failed to define Halide::Buffer.");
28 spdlog::debug(
"[WorkingImageHalide::initializeHalide]: Halide buffer initialized ({}x{}, {} ch, zero-copy).",
29 width, height, channels);
Common::ImageSize getDataSizeByHalide() const noexcept
Gets the total data element count from the Halide buffer.
void initializeHalide(std::span< float > data, Common::ImageDim width, Common::ImageDim height, Common::ImageChan channels)
Creates a Halide buffer view over existing pixel data.
Halide::Buffer< float > m_halide_buffer
Internal Halide buffer holding the image data. Managed directly by this object. Halide::Buffer handle...
Common::ImageChan getChannelsByHalide() const noexcept
Gets the number of color channels from the Halide buffer.
Common::ImageSize getPixelCountByHalide() const noexcept
Gets the total pixel count from the Halide buffer.
std::pair< Common::ImageDim, Common::ImageDim > getSizeByHalide() const noexcept
bool isHalideBufferValid() const noexcept
Checks if the Halide buffer is defined.
std::size_t ImageSize
Type for data size (element count).
std::uint8_t ImageChan
Type for channel count.
std::size_t ImageDim
Type for image dimensions (width, height).
Base class for Halide-based working image implementations.