Lluvia
ll Namespace Reference

Namespaces

 impl
 
 vulkan
 

Classes

class  Buffer
 Objects to manage raw portions of allocated memory. More...
 
class  CommandBuffer
 Class for command buffer. More...
 
struct  DeviceDescriptor
 
class  Duration
 
class  Flags
 
class  ErrorCategory
 Class for error code category. More...
 
class  Image
 Objects to manage images. More...
 
class  ImageDescriptor
 Stores all relevant information for creating ll::Image objects. More...
 
class  ImageView
 Represents portions of a ll::Image to be sent as parameter to a GLSL shader. More...
 
class  ImageViewDescriptor
 Descriptor for ll::ImageView objects. More...
 
class  Interpreter
 
struct  VkHeapInfo
 Vulkan heap information. More...
 
class  Memory
 Class to manage allocation of objects into a specific type of memory. More...
 
struct  MemoryAllocationInfo
 Structure to hold the allocation information of objects in memory. More...
 
class  ComputeNode
 Class representing compute nodes. More...
 
class  ComputeNodeDescriptor
 Class for describing a compute node node. More...
 
class  ContainerNode
 
class  ContainerNodeDescriptor
 Class for describing a container node. More...
 
class  Node
 
struct  NodeBuilderDescriptor
 Describes the attributes of a node builder. More...
 
class  Parameter
 
class  PortDescriptor
 
class  PushConstants
 
class  Object
 Base class for all types that can be used in computer shaders. More...
 
class  Program
 Class representing Vulkan shader modules in SPIR-V representation. More...
 
class  Session
 Class that contains all the state required to run compute operations on a compute device. More...
 
class  SessionDescriptor
 
struct  vec3
 3-vector More...
 

Typedefs

using BufferUsageFlags = ll::Flags< BufferUsageFlagBits, ll::enum_t >
 
using enum_t = uint32_t
 
using ImageUsageFlags = ll::Flags< ImageUsageFlagBits, ll::enum_t >
 
using MemoryPropertyFlags = ll::Flags< MemoryPropertyFlagBits, ll::enum_t >
 
using vec3ui = vec3< uint32_t >
 

Enumerations

enum class  BufferUsageFlagBits : ll::enum_t { StorageBuffer = static_cast<ll::enum_t>(vk::BufferUsageFlagBits::eStorageBuffer) , TransferDst = static_cast<ll::enum_t>(vk::BufferUsageFlagBits::eTransferDst) , TransferSrc = static_cast<ll::enum_t>(vk::BufferUsageFlagBits::eTransferSrc) , UniformBuffer = static_cast<ll::enum_t>(vk::BufferUsageFlagBits::eUniformBuffer) }
 
enum class  ComputeDimension : ll::enum_t { D1 = 1 , D2 = 2 , D3 = 3 }
 Supported compute dimensions. More...
 
enum class  DeviceType : ll::enum_t {
  Other = static_cast<ll::enum_t>(vk::PhysicalDeviceType::eOther) , DiscreteGPU = static_cast<ll::enum_t>(vk::PhysicalDeviceType::eDiscreteGpu) , IntegratedGPU = static_cast<ll::enum_t>(vk::PhysicalDeviceType::eIntegratedGpu) , VirtualGPU = static_cast<ll::enum_t>(vk::PhysicalDeviceType::eVirtualGpu) ,
  CPU = static_cast<ll::enum_t>(vk::PhysicalDeviceType::eCpu)
}
 Image axis enumeration. More...
 
enum class  ErrorCode : ll::enum_t {
  EnumConversionFailed , MemoryMapFailed , ObjectAllocationError , PortBindingError ,
  InvalidShaderFunctionName , InvalidShaderProgram , BufferCopyError , ProgramCompilationError ,
  InvalidLocalShape , InvalidGridShape , BadEnumCasting , PhysicalDevicesNotFound ,
  KeyNotFound , MemoryCreationError , InvalidNodeState , InterpreterError ,
  PushConstantError , IOError , InvalidArgument , InstanceCreationError ,
  SessionLost , LayerNotFound , ExtensionNotFound , PipelineCreationError ,
  VulkanError , InvalidParameterType
}
 Error codes. More...
 
enum class  FloatPrecision : ll::enum_t { FP16 = 0 , FP32 = 1 , FP64 = 2 }
 Floating point precision. More...
 
enum class  ImageAddressMode : uint32_t {
  Repeat = 0 , MirroredRepeat = 1 , ClampToEdge = 2 , ClampToBorder = 3 ,
  MirrorClampToEdge = 4
}
 Image address mode. More...
 
enum class  ImageAxis : ll::enum_t { U = 0 , V = 1 , W = 2 }
 Image axis enumeration. More...
 
enum class  ChannelType : ll::enum_t {
  Uint8 = 0 , Int8 = 1 , Uint16 = 2 , Int16 = 3 ,
  Float16 = 4 , Uint32 = 5 , Int32 = 6 , Float32 = 7 ,
  Uint64 = 8 , Int64 = 9 , Float64 = 10
}
 Supported image channel types. More...
 
enum class  ChannelCount : ll::enum_t { C1 = 1 , C2 = 2 , C3 = 3 , C4 = 4 }
 Supported image channel count. More...
 
enum class  ImageFilterMode : ll::enum_t { Nearest = 0 , Linear = 1 }
 Image filter modes. More...
 
enum class  ImageLayout : ll::enum_t {
  Undefined = static_cast<ll::enum_t>(vk::ImageLayout::eUndefined) , General = static_cast<ll::enum_t>(vk::ImageLayout::eGeneral) , ShaderReadOnlyOptimal = static_cast<ll::enum_t>(vk::ImageLayout::eShaderReadOnlyOptimal) , TransferSrcOptimal = static_cast<ll::enum_t>(vk::ImageLayout::eTransferSrcOptimal) ,
  TransferDstOptimal = static_cast<ll::enum_t>(vk::ImageLayout::eTransferDstOptimal) , Preinitialized = static_cast<ll::enum_t>(vk::ImageLayout::ePreinitialized)
}
 
enum class  ImageTiling : ll::enum_t { Optimal = static_cast<ll::enum_t>(vk::ImageTiling::eOptimal) , Linear = static_cast<ll::enum_t>(vk::ImageTiling::eLinear) }
 
enum class  ImageUsageFlagBits : ll::enum_t { TransferSrc = static_cast<ll::enum_t>(vk::ImageUsageFlagBits::eTransferSrc) , TransferDst = static_cast<ll::enum_t>(vk::ImageUsageFlagBits::eTransferDst) , Sampled = static_cast<ll::enum_t>(vk::ImageUsageFlagBits::eSampled) , Storage = static_cast<ll::enum_t>(vk::ImageUsageFlagBits::eStorage) }
 
enum class  MemoryPropertyFlagBits : ll::enum_t { DeviceLocal = static_cast<ll::enum_t>(vk::MemoryPropertyFlagBits::eDeviceLocal) , HostVisible = static_cast<ll::enum_t>(vk::MemoryPropertyFlagBits::eHostVisible) , HostCoherent = static_cast<ll::enum_t>(vk::MemoryPropertyFlagBits::eHostCoherent) , HostCached = static_cast<ll::enum_t>(vk::MemoryPropertyFlagBits::eHostCached) }
 
enum class  NodeState : ll::enum_t { Created = 0 , Init = 1 }
 Class for node state. More...
 
enum class  NodeType : ll::enum_t { Compute = 0 , Container = 1 }
 Class for node type. More...
 
enum class  ParameterType : ll::enum_t { Int = 0 , Float = 1 , String = 2 }
 
enum class  PortDirection : ll::enum_t { In = 0 , Out = 1 }
 Class for port direction. More...
 
enum class  PortType : ll::enum_t { Buffer = 0 , ImageView = 1 , SampledImageView = 2 , UniformBuffer = 3 }
 Port types. More...
 
enum class  ObjectType : ll::enum_t { Buffer = 0 , Image = 1 , ImageView = 2 }
 Object types. More...
 

Functions

constexpr BufferUsageFlags operator| (BufferUsageFlagBits bit0, BufferUsageFlagBits bit1) noexcept
 
constexpr BufferUsageFlags operator& (BufferUsageFlagBits bit0, BufferUsageFlagBits bit1) noexcept
 
constexpr BufferUsageFlags operator^ (BufferUsageFlagBits bit0, BufferUsageFlagBits bit1) noexcept
 
ll::BufferUsageFlags vectorStringToBufferUsageFlags (const std::vector< std::string > &flagsVector) noexcept
 Converts from a string vector to Vulkan BufferUsageFlags. More...
 
std::vector< std::string > bufferUsageFlagsToVectorString (const ll::BufferUsageFlags flags) noexcept
 Converst from Vulkan BufferUsageFlags to a vector of strings. More...
 
template<typename T = std::string>
deviceTypeToString (ll::DeviceType &&deviceType) noexcept
 
template<typename T >
ll::DeviceType stringToDeviceType (T &&stringValue)
 
template<typename T = std::string>
errorCodeToString (ll::ErrorCode &&value) noexcept
 Converts from ll::ErrorCode enum value to std::string. More...
 
std::error_code createErrorCode (ll::ErrorCode errorCode)
 Creates an error code. More...
 
template<typename T >
void throwSystemErrorIf (bool condition, ll::ErrorCode errorCode, T &&msg)
 Throws a std::system_error exception if the condition passed is true. More...
 
template<typename T >
void throwSystemError (ll::ErrorCode errorCode, T &&msg)
 Throws a std::system_error exception with error code and message. More...
 
template<typename T = std::string>
imageAddressModeToString (ll::ImageAddressMode &&value) noexcept
 Converts from ll::ImageAddressMode enum value to std::string. More...
 
template<typename T >
ll::ImageAddressMode stringToImageAddressMode (T &&stringValue)
 Converts from a string-like object to ll::ImageAddressMode enum. More...
 
template<typename T = std::string>
imageAxisToString (ll::ImageAxis &&axis) noexcept
 
template<typename T >
ll::ImageAxis stringToImageAxis (T &&stringValue)
 
template<typename T = std::string>
channelTypeToString (ll::ChannelType &&value) noexcept
 Converts from ll::ChannelType enum value to std::string. More...
 
template<typename T = std::string>
channelTypeToString (const ll::ChannelType &value) noexcept
 
template<typename T >
ll::ChannelType stringToChannelType (T &&stringValue)
 Converts from a string-like object to ll::ChannelType enum. More...
 
template<typename T = uint32_t>
ll::ChannelCount castChannelCount (T c)
 
uint64_t getChannelTypeSize (ll::ChannelType type)
 Gets size in bytes of a given channel type. More...
 
vk::Format getVulkanImageFormat (ll::ChannelCount channelCount, ll::ChannelType channelType) noexcept
 Gets the vulkan image format for a given channel count and type. More...
 
template<typename T = std::string>
imageFilterModeToString (ll::ImageFilterMode &&value) noexcept
 Converts from ll::ImageFilterMode enum value to std::string. More...
 
template<typename T >
ll::ImageFilterMode stringToImageFilterMode (T &&stringValue)
 Converts from a string-like object to ll::ImageFilterMode enum. More...
 
template<typename T = std::string>
imageLayoutToString (ll::ImageLayout &&layout) noexcept
 Converts from vk::ImageLayout enum value to string. More...
 
template<typename T >
ll::ImageLayout stringToImageLayout (T &&stringValue)
 Converts from a string-like object to ll::ImageLayout. More...
 
template<typename T = std::string>
ImageTilingToString (ll::ImageTiling &&layout) noexcept
 Converts from ll::ImageTiling enum value to string. More...
 
template<typename T >
ll::ImageTiling stringToImageTiling (T &&stringValue)
 Converts from a string-like object to ll::ImageTiling. More...
 
constexpr ImageUsageFlags operator| (ImageUsageFlagBits bit0, ImageUsageFlagBits bit1) noexcept
 
constexpr ImageUsageFlags operator& (ImageUsageFlagBits bit0, ImageUsageFlagBits bit1) noexcept
 
constexpr ImageUsageFlags operator^ (ImageUsageFlagBits bit0, ImageUsageFlagBits bit1) noexcept
 
ll::ImageUsageFlags vectorStringToImageUsageFlags (const std::vector< std::string > &flagsVector) noexcept
 Converts from a string vector to Vulkan ImageUsageFlags. More...
 
std::vector< std::string > ImageUsageFlagsToVectorString (const ll::ImageUsageFlags flags) noexcept
 Converst from Vulkan ImageUsageFlags to a vector of strings. More...
 
constexpr MemoryPropertyFlags operator| (MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1) noexcept
 
constexpr MemoryPropertyFlags operator& (MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1) noexcept
 
constexpr MemoryPropertyFlags operator^ (MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1) noexcept
 
ll::MemoryPropertyFlags vectorStringToMemoryPropertyFlags (const std::vector< std::string > &flagsVector) noexcept
 Converts from a string vector to Vulkan MemoryPropertyFlags. More...
 
std::vector< std::string > memoryPropertyFlagsToVectorString (const ll::MemoryPropertyFlags flags) noexcept
 Converts from Vulkan MemoryPropertyFlags to a vector of strings. More...
 
template<typename T = std::string>
portTypeToString (ll::PortType &&value) noexcept
 Converts from ll::PortType enum value to string. More...
 
template<typename T = std::string>
portTypeToString (const ll::PortType &value) noexcept
 
vk::DescriptorType portTypeToVkDescriptorType (const ll::PortType &param)
 Converts from ll::PortType enum to Vulkan DescriptorType. More...
 
ll::PortType vkDescriptorTypeToPortType (const vk::DescriptorType &vkDescType)
 Converts from Vulkan DescriptorType to ll::PortType enum. More...
 
template<typename T >
ll::PortType stringToPortType (T &&stringValue)
 Converts from a string-like object to ll::PortType enum. More...
 
template<typename T = std::string>
objectTypeToString (ll::ObjectType &&value) noexcept
 Converts from ll::ObjectType enum value to std::string. More...
 
template<typename T >
ll::ObjectType stringToObjectType (T &&stringValue)
 Converts from a string-like object to ll::ObjectType enum. More...
 
std::string toBase64 (const void *ptr, const size_t size)
 Converts a binary array to base-64 string. More...
 
std::vector< uint8_t > fromBase64 (const std::string &code)
 Converts a std::string with base-64 characters to binary. More...
 
std::shared_ptr< ll::ImagecreateAndInitImage (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. More...
 
std::shared_ptr< ll::ImageViewcreateAndInitImageView (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. More...
 

Typedef Documentation

◆ BufferUsageFlags

◆ enum_t

using ll::enum_t = typedef uint32_t

◆ ImageUsageFlags

◆ MemoryPropertyFlags

◆ vec3ui

using ll::vec3ui = typedef vec3<uint32_t>

uint32_t 3-vector.

Enumeration Type Documentation

◆ BufferUsageFlagBits

Enumerator
StorageBuffer 
TransferDst 
TransferSrc 
UniformBuffer 

◆ ChannelCount

Supported image channel count.

Enumerator
C1 
C2 
C3 
C4 

◆ ChannelType

enum ll::ChannelType : ll::enum_t
strong

Supported image channel types.

See also
ll::impl::ChannelTypeStrings string values for this enumeration.
Enumerator
Uint8 

8-bit unsigned int.

Int8 

8-bit signed int.

Uint16 

16-bit unsigned int.

Int16 

16-bit signed int.

Float16 

16-bit floating point.

Uint32 

32-bit unsigned int.

Int32 

32-bit signed int.

Float32 

32-bit floating point.

Uint64 

64-bit unsigned int.

Int64 

64-bit signed int.

Float64 

64-bit floating point.

◆ ComputeDimension

Supported compute dimensions.

Enumerator
D1 
D2 
D3 

◆ DeviceType

enum ll::DeviceType : ll::enum_t
strong

Image axis enumeration.

Enumerator
Other 
DiscreteGPU 
IntegratedGPU 
VirtualGPU 
CPU 

◆ ErrorCode

enum ll::ErrorCode : ll::enum_t
strong

Error codes.

Enumerator
EnumConversionFailed 

Conversion between enum types failed

MemoryMapFailed 

Memory mapping operation (map or unmap) failed

ObjectAllocationError 

Error trying to allocate objects in a memory

PortBindingError 

Error binding a port to a ll::Node

InvalidShaderFunctionName 

Shader function name has invalid name, such as empty string

InvalidShaderProgram 

Shader program is not valid

BufferCopyError 

Error copying data between buffers

ProgramCompilationError 

Error compiling shader module for program

InvalidLocalShape 

Local shape passed to a Compute node is invalid

InvalidGridShape 

Grid shape for a ComputeNode is invalid

BadEnumCasting 

Bad casting of integral value to enum type

PhysicalDevicesNotFound 

No physical devices found

KeyNotFound 

Key not found in a given look up method

MemoryCreationError 

Error creating ll::Memory object

InvalidNodeState 

Invalid ll::Node state

InterpreterError 

Error evaluating interpreter script

PushConstantError 

Error regarding push constant operation

IOError 

IO Error accessing files

InvalidArgument 

Invalid argument

InstanceCreationError 

Incompatible driver

SessionLost 

An object is trying to access a Session already destroyed

LayerNotFound 

A layer required to create a Session was not found

ExtensionNotFound 

An extension required to create a Session was not found

PipelineCreationError 

Error creating a vulkan pipeline object

VulkanError 

Error calling a vulkan function that does not fit on any of the categories above

InvalidParameterType 

Invalid parameter type

◆ FloatPrecision

Floating point precision.

Enumerator
FP16 
FP32 
FP64 

◆ ImageAddressMode

enum ll::ImageAddressMode : uint32_t
strong

Image address mode.

Defines the behaviour when accessing image values outside of its boundaries.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#_vksampleraddressmode_3 for more information on the aviable address modes.

See also
ll::impl::ImageAddressModeStrings string values for this enum.
Enumerator
Repeat 
MirroredRepeat 
ClampToEdge 
ClampToBorder 
MirrorClampToEdge 

◆ ImageAxis

enum ll::ImageAxis : ll::enum_t
strong

Image axis enumeration.

Enumerator

value for U or X axis.

value for V or Y axis.

value for W or Z axis.

◆ ImageFilterMode

Image filter modes.

See also
ll::impl::ImageFilterModeStrings string values for this enum.
Enumerator
Nearest 

Nearest filter.

Linear 

Linear filter.

◆ ImageLayout

enum ll::ImageLayout : ll::enum_t
strong
Enumerator
Undefined 
General 
ShaderReadOnlyOptimal 
TransferSrcOptimal 
TransferDstOptimal 
Preinitialized 

◆ ImageTiling

enum ll::ImageTiling : ll::enum_t
strong
Enumerator
Optimal 
Linear 

◆ ImageUsageFlagBits

Enumerator
TransferSrc 
TransferDst 
Sampled 
Storage 

◆ MemoryPropertyFlagBits

Enumerator
DeviceLocal 
HostVisible 
HostCoherent 
HostCached 

◆ NodeState

enum ll::NodeState : ll::enum_t
strong

Class for node state.

See also
ll::Node
Enumerator
Created 
Init 

◆ NodeType

enum ll::NodeType : ll::enum_t
strong

Class for node type.

Enumerator
Compute 

value for ll::ComputeNode type.

Container 

value for ll::ContainerNode type.

◆ ObjectType

enum ll::ObjectType : ll::enum_t
strong

Object types.

Each value represent one of the ll::Object child classes.

See also
ll::impl::ObjectTypeStrings string values for this enum.
Enumerator
Buffer 

value for ll::Buffer.

Image 

value for ll::Image.

ImageView 

value for ll::ImageView.

◆ ParameterType

Enumerator
Int 
Float 
String 

◆ PortDirection

Class for port direction.

Enumerator
In 

The port is an input to this node.

Out 

The port is an output to this node.

◆ PortType

enum ll::PortType : ll::enum_t
strong

Port types.

See also
ll::impl::ParameterTypeStrings string values for this enum.
Enumerator
Buffer 

value for ll::Buffer type.

ImageView 

value for ll::ImageView without pixel sampler.

SampledImageView 

value for ll::ImageView objects coupled with a pixel sampler.

UniformBuffer 

value for ll::Buffer objects allocated to be used as uniform buffer.

Function Documentation

◆ bufferUsageFlagsToVectorString()

std::vector<std::string> ll::bufferUsageFlagsToVectorString ( const ll::BufferUsageFlags  flags)
inlinenoexcept

Converst from Vulkan BufferUsageFlags to a vector of strings.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkBufferUsageFlagBits for more information.

Parameters
[in]flagsThe Vulkan flags.
Returns
A vector of string values. Each element is one of impl::VkBufferUsageFlagBitsStrings

◆ castChannelCount()

template<typename T = uint32_t>
ll::ChannelCount ll::castChannelCount ( c)

◆ channelTypeToString() [1/2]

template<typename T = std::string>
T ll::channelTypeToString ( const ll::ChannelType value)
inlinenoexcept

◆ channelTypeToString() [2/2]

template<typename T = std::string>
T ll::channelTypeToString ( ll::ChannelType &&  value)
inlinenoexcept

Converts from ll::ChannelType enum value to std::string.

Parameters
[in]value
Template Parameters
Tfunction return type. Defaults to std::string.
Returns
Returns the corresponding std::string in ll::impl::ChannelTypeStrings for the enum value.

◆ createAndInitImage()

std::shared_ptr<ll::Image> ll::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.

Parameters
sessionThe session used for initiliazing the image.
memoryThe memory the image will be create from.
[in]descThe image descriptor.
[in]initialLayoutThe initial layout. Defaults to vk::ImageLayout::eGeneral
Returns
A new ll::Image object.

◆ createAndInitImageView()

std::shared_ptr<ll::ImageView> ll::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.

Parameters
sessionThe session used for initiliazing the underlying ll::Image object.
memoryThe memory used for allocating the image.
[in]imgDescriptorThe image descriptor.
[in]viewDescriptorThe view descriptor.
[in]initialLayoutThe initial layout. Defaults to ll::ImageLayout::eGeneral.
Returns
A new ll::ImageViewObject.

◆ createErrorCode()

std::error_code ll::createErrorCode ( ll::ErrorCode  errorCode)
inline

Creates an error code.

Parameters
[in]errorCodeThe error code
Returns
a std::error_code instance.

◆ deviceTypeToString()

template<typename T = std::string>
T ll::deviceTypeToString ( ll::DeviceType &&  deviceType)
inlinenoexcept

◆ errorCodeToString()

template<typename T = std::string>
T ll::errorCodeToString ( ll::ErrorCode &&  value)
inlinenoexcept

Converts from ll::ErrorCode enum value to std::string.

Parameters
[in]value
Template Parameters
Tfunction return type. Defaults to std::string.
Returns
Returns the corresponding std::string in ll::impl::ErrorCodeStrings for the enum value.

◆ fromBase64()

std::vector<uint8_t> ll::fromBase64 ( const std::string &  code)

Converts a std::string with base-64 characters to binary.

Parameters
[in]codeThe base-64 code.
Returns
The decoded base-64 binary array.
Exceptions
std::runtime_errorif any character in code does not belong to the base-64 alphabet.
See also
ll::toBase64 Converts a binary array to base-64 string.

◆ getChannelTypeSize()

uint64_t ll::getChannelTypeSize ( ll::ChannelType  type)

Gets size in bytes of a given channel type.

Parameters
[in]typeThe channel type.
Returns
The channel type size in bytes.

◆ getVulkanImageFormat()

vk::Format ll::getVulkanImageFormat ( ll::ChannelCount  channelCount,
ll::ChannelType  channelType 
)
noexcept

Gets the vulkan image format for a given channel count and type.

Parameters
[in]channelsThe channel count
[in]typeThe channel type
Returns
The vulkan image format.

◆ imageAddressModeToString()

template<typename T = std::string>
T ll::imageAddressModeToString ( ll::ImageAddressMode &&  value)
inlinenoexcept

Converts from ll::ImageAddressMode enum value to std::string.

Parameters
[in]value
Template Parameters
Tfunction return type. Defaults to std::string.
Returns
Returns the corresponding std::string in ll::impl::ImageAddressModeStrings for the enum value.

◆ imageAxisToString()

template<typename T = std::string>
T ll::imageAxisToString ( ll::ImageAxis &&  axis)
inlinenoexcept

◆ imageFilterModeToString()

template<typename T = std::string>
T ll::imageFilterModeToString ( ll::ImageFilterMode &&  value)
inlinenoexcept

Converts from ll::ImageFilterMode enum value to std::string.

Parameters
[in]value
Template Parameters
Tfunction return type. Defaults to std::string.
Returns
Returns the corresponding std::string in ll::impl::ImageFilterModeStrings for the enum value.

◆ imageLayoutToString()

template<typename T = std::string>
T ll::imageLayoutToString ( ll::ImageLayout &&  layout)
inlinenoexcept

Converts from vk::ImageLayout enum value to string.

Parameters
[in]layoutVulkan image layout enum.
Template Parameters
Tfunction return type. Defaults to std::string-
Returns
Returns the corresponding std::string in ll::impl::VkImageLayoutStrings for the enum value.

◆ ImageTilingToString()

template<typename T = std::string>
T ll::ImageTilingToString ( ll::ImageTiling &&  layout)
inlinenoexcept

Converts from ll::ImageTiling enum value to string.

Parameters
[in]layoutVulkan image layout enum.
Template Parameters
Tfunction return type. Defaults to std::string-
Returns
Returns the corresponding std::string in ll::impl::VkImageTilingStrings for the enum value.

◆ ImageUsageFlagsToVectorString()

std::vector<std::string> ll::ImageUsageFlagsToVectorString ( const ll::ImageUsageFlags  flags)
inlinenoexcept

Converst from Vulkan ImageUsageFlags to a vector of strings.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkImageUsageFlagBits for more information.

Parameters
[in]flagsThe Vulkan flags.
Returns
A vector of string values. Each element is one of impl::ImageUsageFlagBitsStrings

◆ memoryPropertyFlagsToVectorString()

std::vector<std::string> ll::memoryPropertyFlagsToVectorString ( const ll::MemoryPropertyFlags  flags)
inlinenoexcept

Converts from Vulkan MemoryPropertyFlags to a vector of strings.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkMemoryPropertyFlagBits for more information.

Parameters
[in]flagsThe Vulkan flags.
Returns
A vector of string values. Each element is one of impl::VkMemoryPropertyFlagBitsStrings

◆ objectTypeToString()

template<typename T = std::string>
T ll::objectTypeToString ( ll::ObjectType &&  value)
inlinenoexcept

Converts from ll::ObjectType enum value to std::string.

Parameters
[in]value
Template Parameters
Tfunction return type. Defaults to std::string.
Returns
Returns the corresponding std::string in ll::impl::ObjectTypeStrings for the enum value.

◆ operator&() [1/3]

constexpr BufferUsageFlags ll::operator& ( BufferUsageFlagBits  bit0,
BufferUsageFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator&() [2/3]

constexpr ImageUsageFlags ll::operator& ( ImageUsageFlagBits  bit0,
ImageUsageFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator&() [3/3]

constexpr MemoryPropertyFlags ll::operator& ( MemoryPropertyFlagBits  bit0,
MemoryPropertyFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator^() [1/3]

constexpr BufferUsageFlags ll::operator^ ( BufferUsageFlagBits  bit0,
BufferUsageFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator^() [2/3]

constexpr ImageUsageFlags ll::operator^ ( ImageUsageFlagBits  bit0,
ImageUsageFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator^() [3/3]

constexpr MemoryPropertyFlags ll::operator^ ( MemoryPropertyFlagBits  bit0,
MemoryPropertyFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator|() [1/3]

constexpr BufferUsageFlags ll::operator| ( BufferUsageFlagBits  bit0,
BufferUsageFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator|() [2/3]

constexpr ImageUsageFlags ll::operator| ( ImageUsageFlagBits  bit0,
ImageUsageFlagBits  bit1 
)
inlineconstexprnoexcept

◆ operator|() [3/3]

constexpr MemoryPropertyFlags ll::operator| ( MemoryPropertyFlagBits  bit0,
MemoryPropertyFlagBits  bit1 
)
inlineconstexprnoexcept

◆ portTypeToString() [1/2]

template<typename T = std::string>
T ll::portTypeToString ( const ll::PortType value)
inlinenoexcept

◆ portTypeToString() [2/2]

template<typename T = std::string>
T ll::portTypeToString ( ll::PortType &&  value)
inlinenoexcept

Converts from ll::PortType enum value to string.

Parameters
[in]value
Template Parameters
Tfunction return type. Defaults to std::string.
Returns
Returns the corresponding std::string in ll::impl::PortTypeStrings for the enum value.

◆ portTypeToVkDescriptorType()

vk::DescriptorType ll::portTypeToVkDescriptorType ( const ll::PortType param)

Converts from ll::PortType enum to Vulkan DescriptorType.

Parameters
[in]paramThe parameter.
Returns
The corresponding Vulkan descriptor type for param.

◆ stringToChannelType()

template<typename T >
ll::ChannelType ll::stringToChannelType ( T &&  stringValue)
inline

Converts from a string-like object to ll::ChannelType enum.

This function can be used either with string literals, const char* or std::string objects. stringValue parameter is compared against the values in ll::impl::ChannelTypeStrings and the corresponding enum value is returned. The comparison is case sensitive.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::ChannelType value corresponding to stringValue.
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::ObjectTypeStrings.

◆ stringToDeviceType()

template<typename T >
ll::DeviceType ll::stringToDeviceType ( T &&  stringValue)
inline

◆ stringToImageAddressMode()

template<typename T >
ll::ImageAddressMode ll::stringToImageAddressMode ( T &&  stringValue)
inline

Converts from a string-like object to ll::ImageAddressMode enum.

This function can be used either with string literals, const char* or std::string objects. stringValue parameter is compared against the values in ll::impl::ImageAddressModeStrings and the corresponding enum value is returned. The comparison is case sensitive.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::ImageAddressMode value corresponding to stringValue
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::ImageAddressModeStrings.

◆ stringToImageAxis()

template<typename T >
ll::ImageAxis ll::stringToImageAxis ( T &&  stringValue)
inline

◆ stringToImageFilterMode()

template<typename T >
ll::ImageFilterMode ll::stringToImageFilterMode ( T &&  stringValue)
inline

Converts from a string-like object to ll::ImageFilterMode enum.

This function can be used either with string literals, const char* or std::string objects. stringValue parameter is compared against the values in ll::impl::ImageFilterModeStrings and the corresponding enum value is returned. The comparison is case sensitive.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::ImageFilterMode value corresponding to stringValue
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::ImageFilterModeStrings.

◆ stringToImageLayout()

template<typename T >
ll::ImageLayout ll::stringToImageLayout ( T &&  stringValue)
inline

Converts from a string-like object to ll::ImageLayout.

This function can be used either with string literals, const char* or std::string objects. stringValue parameter is compared against the values in ll::impl::VkImageLayoutStrings and the corresponding enum value is returned. The comparison is case sensitive.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::ImageLayout value corresponding to stringValue.
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::VkImageLayoutStrings.

◆ stringToImageTiling()

template<typename T >
ll::ImageTiling ll::stringToImageTiling ( T &&  stringValue)
inline

Converts from a string-like object to ll::ImageTiling.

This function can be used either with string literals, const char* or std::string objects. stringValue parameter is compared against the values in ll::impl::VkImageTilingStrings and the corresponding enum value is returned. The comparison is case sensitive.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::ImageTiling value corresponding to stringValue.
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::VkImageTilingStrings.

◆ stringToObjectType()

template<typename T >
ll::ObjectType ll::stringToObjectType ( T &&  stringValue)
inline

Converts from a string-like object to ll::ObjectType enum.

This function can be used either with string literals, const char* or std::string objects. stringValue parameter is compared against the values in ll::impl::ObjectTypeStrings and the corresponding enum value is returned. The comparison is case sensitive.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::ObjectType value corresponding to stringValue
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::ObjectTypeStrings.

◆ stringToPortType()

template<typename T >
ll::PortType ll::stringToPortType ( T &&  stringValue)
inline

Converts from a string-like object to ll::PortType enum.

Parameters
[in]stringValuestring-like parameter. String literals and std::string objects are allowed.
Template Parameters
TstringValue type. T must satisfies std::is_convertible<T, std::string>()
Returns
ll::PortType value corresponding to stringValue
Exceptions
std::out_of_rangeif stringValue is not found in ll::impl::ObjectTypeStrings.

◆ throwSystemError()

template<typename T >
void ll::throwSystemError ( ll::ErrorCode  errorCode,
T &&  msg 
)

Throws a std::system_error exception with error code and message.

Parameters
[in]conditionThe condition.
[in]errorCodeThe error code.
msgThe error message.
Template Parameters
TType of the error message. It must be convertible to std::string.

◆ throwSystemErrorIf()

template<typename T >
void ll::throwSystemErrorIf ( bool  condition,
ll::ErrorCode  errorCode,
T &&  msg 
)

Throws a std::system_error exception if the condition passed is true.

Parameters
[in]conditionThe condition.
[in]errorCodeThe error code.
msgThe error message.
Template Parameters
TType of the error message. It must be convertible to std::string.

◆ toBase64()

std::string ll::toBase64 ( const void *  ptr,
const size_t  size 
)

Converts a binary array to base-64 string.

Parameters
[in]ptrThe pointer to the binary data.
[in]sizeThe size of the data in bytes.
Returns
the encoded base-64 string.
See also
ll::fromBase64 Converts a std::string with base-64 characters to binary.

◆ vectorStringToBufferUsageFlags()

ll::BufferUsageFlags ll::vectorStringToBufferUsageFlags ( const std::vector< std::string > &  flagsVector)
inlinenoexcept

Converts from a string vector to Vulkan BufferUsageFlags.

The comparison between string values is case sensitive.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkBufferUsageFlagBits for more information.

Parameters
[in]flagsVectorThe flags vector. Their values must be contained in impl::VkBufferUsageFlagBitsStrings.
Returns
The reconstructed Vulkan BufferUsageFlags.

◆ vectorStringToImageUsageFlags()

ll::ImageUsageFlags ll::vectorStringToImageUsageFlags ( const std::vector< std::string > &  flagsVector)
inlinenoexcept

Converts from a string vector to Vulkan ImageUsageFlags.

The comparison between string values is case sensitive.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkImageUsageFlagBits for more information.

Parameters
[in]flagsVectorThe flags vector. Their values must be contained in impl::ImageUsageFlagBitsStrings.
Returns
The reconstructed Vulkan ImageUsageFlags.

◆ vectorStringToMemoryPropertyFlags()

ll::MemoryPropertyFlags ll::vectorStringToMemoryPropertyFlags ( const std::vector< std::string > &  flagsVector)
inlinenoexcept

Converts from a string vector to Vulkan MemoryPropertyFlags.

The comparison between string values is case sensitive.

See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkMemoryPropertyFlagBits for more information.

Parameters
[in]flagsVectorThe flags vector. Their values must be contained in impl::VkMemoryPropertyFlagBitsStrings.
Returns
The reconstructed Vulkan MemoryPropertyFlags.

◆ vkDescriptorTypeToPortType()

ll::PortType ll::vkDescriptorTypeToPortType ( const vk::DescriptorType &  vkDescType)

Converts from Vulkan DescriptorType to ll::PortType enum.

Parameters
[in]vkDescTypeThe Vulkan description type.
Returns
The corresponding ll::PortType.
Exceptions
std::system_errorif there is no associated ll::PortType value for vkDescType. Using the values returned by ll::portTypeToVkDescriptorType is guaranteed to not throw exception.