--- layout: stdlib-reference --- # 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](../types/ptr-0/index.html)\<[T](../types/ptr-0/index.html#typeparam-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.