--- 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<int alignment, T>(Ptr<T, Access.ReadWrite, AddressSpace.Device> 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), Access\.ReadWrite, AddressSpace\.Device\> 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.