Skip to content

LiteFX::Rendering::IDeviceMemory::size

Gets the size (in bytes) of the aligned memory chunk.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] virtual size_t size() const noexcept = 0;

Description

The size of the device memory block depends on different factors. The actual used memory of one element can be obtained by calling by the elementSize. For different reasons, though, elements may be required to be aligned to a certain size. The size of one aligned element is returned by alignedElementSize. The size of the memory block, the elements get aligned to is returned by elementAlignment.

Return Value

The size (in bytes) of the memory chunk.

See Also

elements

elementSize

elementAlignment

alignedElementSize