Add VectorLoad(word32 arr[4]) overloads

pull/703/head
Jeffrey Walton 2018-08-15 02:12:27 -04:00
parent 6f1caab7c2
commit 1253bccf06
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 46 additions and 0 deletions

View File

@ -459,6 +459,29 @@ inline uint32x4_p VectorLoad(int off, const byte src[16])
#endif
}
/// \brief Loads a vector from a word array
/// \param src the word array
/// \details Loads a vector in native endian format from a word array.
/// \note VectorLoad does not require an aligned array.
/// \sa Reverse(), VectorLoadBE(), VectorLoad()
/// \since Crypto++ 6.0
inline uint32x4_p VectorLoad(const word32 src[4])
{
return VectorLoad((const byte*)src);
}
/// \brief Loads a vector from a word array
/// \param src the word array
/// \param off offset into the src word array
/// \details Loads a vector in native endian format from a word array.
/// \note VectorLoad does not require an aligned array.
/// \sa Reverse(), VectorLoadBE(), VectorLoad()
/// \since Crypto++ 6.0
inline uint32x4_p VectorLoad(int off, const word32 src[4])
{
return VectorLoad(off, (const byte*)src);
}
/// \brief Stores a vector to a byte array
/// \tparam T vector type
/// \param src the vector
@ -588,6 +611,29 @@ inline uint32x4_p VectorLoad(int off, const byte src[16])
}
}
/// \brief Loads a vector from a word array
/// \param src the word array
/// \details Loads a vector in native endian format from a word array.
/// \note VectorLoad does not require an aligned array.
/// \sa Reverse(), VectorLoadBE(), VectorLoad()
/// \since Crypto++ 6.0
inline uint32x4_p VectorLoad(const word32 src[4])
{
return VectorLoad((const byte*)src);
}
/// \brief Loads a vector from a word array
/// \param src the word array
/// \param off offset into the src word array
/// \details Loads a vector in native endian format from a word array.
/// \note VectorLoad does not require an aligned array.
/// \sa Reverse(), VectorLoadBE(), VectorLoad()
/// \since Crypto++ 6.0
inline uint32x4_p VectorLoad(int off, const word32 src[4])
{
return VectorLoad(off, (const byte*)src);
}
/// \brief Loads a vector from a byte array
/// \param src the byte array
/// \details Loads a vector in big endian format from a byte array.