XMVectorShiftLeft

Shifts a vector left by a given number of 32-bit elements, filling the vacated elements with elements from a second vector.

Overload list

Name Description
XMVectorShiftLeft (XMVECTOR, XMVECTOR) Shifts a vector left by a given number of 32-bit elements, filling the vacated elements with elements from a second vector.
XMVectorShiftLeft (XMVECTOR, XMVECTOR, uint32_t) Shifts a vector left by a given number of 32-bit elements, filling the vacated elements with elements from a second vector.

Remarks

The following code demonstrates how this function might be used.

XMVECTOR v1 = XMVectorSet( 10.0f, 20.0f, 30.0f, 40.0f );
XMVECTOR v2 = XMVectorSet( 50.0f, 60.0f, 70.0f, 80.0f );
XMVECTOR result = XMVectorShiftLeft( v1, v2, 1 );  

The shifted vector (result) will be <20.0f, 30.0f, 40.0f, 50.0f>.

In the case of a constant shift value, it is more efficient to use the template form of XMVectorShiftLeft:

template<uint32_t Elements>
    XMVECTOR XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2)

Example: XMVectorShiftLeft<1>( v1, v2 );