8 #ifndef LLUVIA_CORE_UTILS_H_
9 #define LLUVIA_CORE_UTILS_H_
20 #include <type_traits>
26 class ImageDescriptor;
28 class ImageViewDescriptor;
42 std::string
toBase64(
const void* ptr,
const size_t size);
55 std::vector<uint8_t>
fromBase64(
const std::string& code);
68 std::shared_ptr<ll::Session>& session,
69 std::shared_ptr<ll::Memory>& memory,
85 std::shared_ptr<ll::Session>& session,
86 std::shared_ptr<ll::Memory>& memory,
Stores all relevant information for creating ll::Image objects.
Definition: ImageDescriptor.h:189
Descriptor for ll::ImageView objects.
Definition: ImageViewDescriptor.h:41
ImageLayout
Definition: ImageLayout.h:16
std::shared_ptr< ll::ImageView > createAndInitImageView(std::shared_ptr< ll::Session > &session, std::shared_ptr< ll::Memory > &memory, const ll::ImageDescriptor &imgDescriptor, const ll::ImageViewDescriptor &viewDescriptor, const ll::ImageLayout initialLayout=ll::ImageLayout::General)
Creates and initialize a ll::ImageView object.
std::vector< uint8_t > fromBase64(const std::string &code)
Converts a std::string with base-64 characters to binary.
std::string toBase64(const void *ptr, const size_t size)
Converts a binary array to base-64 string.
std::shared_ptr< ll::Image > createAndInitImage(std::shared_ptr< ll::Session > &session, std::shared_ptr< ll::Memory > &memory, const ll::ImageDescriptor &desc, const ll::ImageLayout initialLayout=ll::ImageLayout::General)
Creates and initialize a ll::Image object.