Data transfer¶
Data transfer instructions¶
-
template<class T1, class T2 = T1>
inline simd_return_type<T1, T2> set_simd(const T1 &value)¶ Returns a batch with all values initialized to
value.- Parameters
value – the scalar used to initialize the batch.
- Returns
the batch wrapping the highest available instruction set.
-
template<class T1, class T2 = T1>
inline simd_return_type<T1, T2> load_aligned(const T1 *src)¶ Loads the memory array pointed to by
srcinto a batch and returns it.srcis required to be aligned.- Parameters
src – the pointer to the memory array to load.
- Returns
the batch wrapping the highest available instruction set.
-
template<class T1, class T2 = T1>
inline void load_aligned(const T1 *src, simd_type<T2> &dst)¶ Loads the memory array pointed to by
srcinto the batchdst.srcis required to be aligned.- Parameters
src – the pointer to the memory array to load.
dst – the destination batch.
-
template<class T1, class T2>
inline simd_return_type<T1, T2> load_aligned(const T1 *real_src, const T1 *imag_src)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto a batch of complex numbers and returns it.real_srcandimag_srcare required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
- Returns
the batch of complex wrapping the highest available instruction set.
-
template<class T1, class T2>
inline void load_aligned(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto the batchdst.real_srcandimag_srcare required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
dst – the destination batch.
-
template<class T1, class T2 = T1>
inline simd_return_type<T1, T2> load_unaligned(const T1 *src)¶ Loads the memory array pointed to by
srcinto a batch and returns it.srcis not required to be aligned.- Parameters
src – the pointer to the memory array to load.
- Returns
the batch wrapping the highest available instruction set.
-
template<class T1, class T2 = T1>
inline void load_unaligned(const T1 *src, simd_type<T2> &dst)¶ Loads the memory array pointed to by
srcinto the batchdst.srcis not required to be aligned.- Parameters
src – the pointer to the memory array to load.
dst – the destination batch.
-
template<class T1, class T2>
inline simd_return_type<T1, T2> load_unaligned(const T1 *real_src, const T1 *imag_src)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto a batch of complex numbers and returns it.real_srcandimag_srcare not required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
- Returns
the batch of complex wrapping the highest available instruction set.
-
template<class T1, class T2>
inline void load_unaligned(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto the batchdst.real_srcandimag_srcare not required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
dst – the destination batch.
-
template<class T1, class T2 = T1>
inline void store_aligned(T1 *dst, const simd_type<T2> &src)¶ Stores the batch
srcinto the memory array pointed to bydst.dstis required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the batch to store.
-
template<class T1, class T2 = T1>
inline void store_aligned(T1 *dst, const simd_bool_type<T2> &src)¶ Stores the boolean batch
srcinto the memory array pointed to bydst.dstis required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the boolean batch to store.
-
template<class T1, class T2 = T1>
inline void store_unaligned(T1 *dst, const simd_type<T2> &src)¶ Stores the batch
srcinto the memory array pointed to bydst.dstis not required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the batch to store.
-
template<class T1, class T2 = T1>
inline void store_unaligned(T1 *dst, const simd_bool_type<T2> &src)¶ Stores the boolean batch
srcinto the memory array pointed to bydst.dstis not required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the boolean batch to store.
-
template<class T1, class T2>
inline void store_aligned(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src)¶ Stores the batch of complex numbers
srcinto the memory arrays pointed to byreal_dstandimag_dst.real_dstandimag_dstare required to be aligned.- Parameters
real_dst – the pointer to the memory array of the real part.
imag_dst – the pointer to the memory array of the imaginary part.
src – the batch to store.
-
template<class T1, class T2>
inline void store_unaligned(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src)¶ Stores the batch of complex numbers
srcinto the memory arrays pointed to byreal_dstandimag_dst.real_dstandimag_dstare not required to be aligned.- Parameters
real_dst – the pointer to the memory array of the real part.
imag_dst – the pointer to the memory array of the imaginary part.
src – the batch to store.
Generic load and store¶
-
template<class T1, class T2 = T1>
inline simd_return_type<T1, T2> load_simd(const T1 *src, aligned_mode)¶ Loads the memory array pointed to by
srcinto a batch and returns it.srcis required to be aligned.- Parameters
src – the pointer to the memory array to load.
- Returns
the batch wrapping the highest available instruction set.
-
template<class T1, class T2 = T1>
inline void load_simd(const T1 *src, simd_type<T2> &dst, aligned_mode)¶ Loads the memory array pointed to by
srcinto the batchdst.srcis required to be aligned.- Parameters
src – the pointer to the memory array to load.
dst – the destination batch.
-
template<class T1, class T2>
inline simd_return_type<T1, T2> load_simd(const T1 *real_src, const T1 *imag_src, aligned_mode)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto a batch of complex numbers and returns it.real_srcandimag_srcare required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
- Returns
the batch of complex wrapping the highest available instruction set.
-
template<class T1, class T2>
inline void load_simd(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst, aligned_mode)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto the batchdst.real_srcandimag_srcare required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
dst – the destination batch.
-
template<class T1, class T2 = T1>
inline simd_return_type<T1, T2> load_simd(const T1 *src, unaligned_mode)¶ Loads the memory array pointed to by
srcinto a batch and returns it.srcis not required to be aligned.- Parameters
src – the pointer to the memory array to load.
- Returns
the batch wrapping the highest available instruction set.
-
template<class T1, class T2 = T1>
inline void load_simd(const T1 *src, simd_type<T2> &dst, unaligned_mode)¶ Loads the memory array pointed to by
srcinto the batchdst.srcis not required to be aligned.- Parameters
src – the pointer to the memory array to load.
dst – the destination batch.
-
template<class T1, class T2>
inline simd_return_type<T1, T2> load_simd(const T1 *real_src, const T1 *imag_src, unaligned_mode)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto a batch of complex numbers and returns it.real_srcandimag_srcare not required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
- Returns
the batch of complex wrapping the highest available instruction set.
-
template<class T1, class T2>
inline void load_simd(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst, unaligned_mode)¶ Loads the memory arrays pointed to by
real_srcandimag_srcinto the batchdst.real_srcandimag_srcare not required to be aligned.- Parameters
real_src – the pointer to the memory array containing the real part.
imag_src – the pointer to the memory array containing the imaginary part.
dst – the destination batch.
-
template<class T1, class T2 = T1>
inline void store_simd(T1 *dst, const simd_type<T2> &src, aligned_mode)¶ Stores the batch
srcinto the memory array pointed to bydst.dstis required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the batch to store.
-
template<class T1, class T2 = T1>
inline void store_simd(T1 *dst, const simd_bool_type<T2> &src, aligned_mode)¶ Stores the boolean batch
srcinto the memory array pointed to bydst.dstis required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the boolean batch to store.
-
template<class T1, class T2 = T1>
inline void store_simd(T1 *dst, const simd_type<T2> &src, unaligned_mode)¶ Stores the batch
srcinto the memory array pointed to bydst.dstis not required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the batch to store.
-
template<class T1, class T2 = T1>
inline void store_simd(T1 *dst, const simd_bool_type<T2> &src, unaligned_mode)¶ Stores the boolean batch
srcinto the memory array pointed to bydst.dstis not required to be aligned.- Parameters
dst – the pointer to the memory array.
src – the boolean batch to store.
-
template<class T1, class T2>
inline void store_simd(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src, aligned_mode)¶ Stores the batch of complex numbers
srcinto the memory arrays pointed to byreal_dstandimag_dst.real_dstandimag_dstare required to be aligned.- Parameters
real_dst – the pointer to the memory array of the real part.
imag_dst – the pointer to the memory array of the imaginary part.
src – the batch to store.
-
template<class T1, class T2>
inline void store_simd(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src, unaligned_mode)¶ Stores the batch of complex numbers
srcinto the memory arrays pointed to byreal_dstandimag_dst.real_dstandimag_dstare not required to be aligned.- Parameters
real_dst – the pointer to the memory array of the real part.
imag_dst – the pointer to the memory array of the imaginary part.
src – the batch to store.