Data transfer¶
Data transfer instructions¶
- template <class T1, class T2 = T1>
-
simd_return_type<T1, T2>
xsimd::set_simd(const T1 &value)¶ Returns a batch with all values initialized to
value.- Return
the batch wrapping the highest available instruction set.
- Parameters
value: the scalar used to initialize the batch.
- template <class T1, class T2 = T1>
-
simd_return_type<T1, T2>
xsimd::load_aligned(const T1 *src)¶ Loads the memory array pointed to by
srcinto a batch and returns it.srcis required to be aligned.- Return
the batch wrapping the highest available instruction set.
- Parameters
src: the pointer to the memory array to load.
- template <class T1, class T2 = T1>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::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.- Return
the batch of complex wrapping the highest available instruction set.
- 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.
- template <class T1, class T2>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::load_unaligned(const T1 *src)¶ Loads the memory array pointed to by
srcinto a batch and returns it.srcis not required to be aligned.- Return
the batch wrapping the highest available instruction set.
- Parameters
src: the pointer to the memory array to load.
- template <class T1, class T2 = T1>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::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.- Return
the batch of complex wrapping the highest available instruction set.
- 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.
- template <class T1, class T2>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::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.- Return
the batch wrapping the highest available instruction set.
- Parameters
src: the pointer to the memory array to load.
- template <class T1, class T2 = T1>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::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.- Return
the batch of complex wrapping the highest available instruction set.
- 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.
- template <class T1, class T2>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::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.- Return
the batch wrapping the highest available instruction set.
- Parameters
src: the pointer to the memory array to load.
- template <class T1, class T2 = T1>
-
void
xsimd::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>
-
simd_return_type<T1, T2>
xsimd::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.- Return
the batch of complex wrapping the highest available instruction set.
- 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.
- template <class T1, class T2>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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>
-
void
xsimd::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.