--- layout: stdlib-reference --- # storeAligned ## Description Store a value to a pointer with a known alignment. Aligned stores are more efficient than unaligned stores on some platforms. ## Signature
void storeAligned<alignment:int, T>(
    Ptr<T> ptr,
    T value);

## Generic Parameters #### alignment : int The alignment of the store operation. #### T ## Parameters #### ptr : [Ptr](../types/ptr-0/index.html)\<[T](../types/ptr-0/index.html#typeparam-T)\> The pointer to store value to. #### value : [T](storealigned-5.html#typeparam-T) The value to store. ## Remarks When targeting SPIRV, this function maps to an OpStore instruction with the Aligned memory operand. The functions maps to normal store operation on other targets.