loadAligned¶
Description¶
Load a value from a pointer with a known alignment. Aligned loads are more efficient than unaligned loads on some platforms.
Signature¶
T loadAligned<alignment:int, T>(Ptr<T> ptr);
Generic Parameters¶
alignment : int¶
The alignment of the load operation.
T¶
Parameters¶
ptr : Ptr<T>¶
The pointer to load from.
Return value¶
The value loaded from the pointer.
Remarks¶
When targeting SPIRV, this function maps to an OpLoad instruction with the Aligned memory operand. The functions maps to normal load operation on other targets.