MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / get_memory_offset

Method get_memory_offset

framework/core/allocated.h:607–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605
606template <vkb::BindingType bindingType, typename HandleType>
607inline typename Allocated<bindingType, HandleType>::DeviceSizeType Allocated<bindingType, HandleType>::get_memory_offset() const
608{
609 VmaAllocationInfo alloc_info;
610 vmaGetAllocationInfo(get_memory_allocator(), allocation, &alloc_info);
611 if constexpr (bindingType == vkb::BindingType::Cpp)
612 {
613 return static_cast<vk::DeviceSize>(alloc_info.offset);
614 }
615 else
616 {
617 return alloc_info.offset;
618 }
619}
620
621template <vkb::BindingType bindingType, typename HandleType>
622inline uint8_t *Allocated<bindingType, HandleType>::map()

Callers 4

prepare_input_tensorMethod · 0.80
prepare_output_tensorMethod · 0.80
prepare_input_tensorMethod · 0.80
prepare_output_tensorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected