Data transfer¶
Data transfer instructions¶
-
template<class T1, class T2 = T1>
simd_return_type<T1, T2> 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> load_aligned(const T1 *src)¶ Loads the memory array pointed to by
src
into a batch and returns it.src
is 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 load_aligned(const T1 *src, simd_type<T2> &dst)¶ Loads the memory array pointed to by
src
into the batchdst
.src
is 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> load_aligned(const T1 *real_src, const T1 *imag_src)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into a batch of complex numbers and returns it.real_src
andimag_src
are 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 load_aligned(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into the batchdst
.real_src
andimag_src
are 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> load_unaligned(const T1 *src)¶ Loads the memory array pointed to by
src
into a batch and returns it.src
is 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 load_unaligned(const T1 *src, simd_type<T2> &dst)¶ Loads the memory array pointed to by
src
into the batchdst
.src
is 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> load_unaligned(const T1 *real_src, const T1 *imag_src)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into a batch of complex numbers and returns it.real_src
andimag_src
are 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 load_unaligned(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into the batchdst
.real_src
andimag_src
are 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 store_aligned(T1 *dst, const simd_type<T2> &src)¶ Stores the batch
src
into the memory array pointed to bydst
.dst
is required to be aligned.- Parameters
dst
: the pointer to the memory array.src
: the batch to store.
-
template<class T1, class T2 = T1>
void store_aligned(T1 *dst, const simd_bool_type<T2> &src)¶ Stores the boolean batch
src
into the memory array pointed to bydst
.dst
is 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 store_unaligned(T1 *dst, const simd_type<T2> &src)¶ Stores the batch
src
into the memory array pointed to bydst
.dst
is 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 store_unaligned(T1 *dst, const simd_bool_type<T2> &src)¶ Stores the boolean batch
src
into the memory array pointed to bydst
.dst
is 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 store_aligned(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src)¶ Stores the batch of complex numbers
src
into the memory arrays pointed to byreal_dst
andimag_dst
.real_dst
andimag_dst
are 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 store_unaligned(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src)¶ Stores the batch of complex numbers
src
into the memory arrays pointed to byreal_dst
andimag_dst
.real_dst
andimag_dst
are 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> load_simd(const T1 *src, aligned_mode)¶ Loads the memory array pointed to by
src
into a batch and returns it.src
is 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 load_simd(const T1 *src, simd_type<T2> &dst, aligned_mode)¶ Loads the memory array pointed to by
src
into the batchdst
.src
is 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> load_simd(const T1 *real_src, const T1 *imag_src, aligned_mode)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into a batch of complex numbers and returns it.real_src
andimag_src
are 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 load_simd(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst, aligned_mode)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into the batchdst
.real_src
andimag_src
are 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> load_simd(const T1 *src, unaligned_mode)¶ Loads the memory array pointed to by
src
into a batch and returns it.src
is 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 load_simd(const T1 *src, simd_type<T2> &dst, unaligned_mode)¶ Loads the memory array pointed to by
src
into the batchdst
.src
is 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> load_simd(const T1 *real_src, const T1 *imag_src, unaligned_mode)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into a batch of complex numbers and returns it.real_src
andimag_src
are 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 load_simd(const T1 *real_src, const T1 *imag_src, simd_type<T2> &dst, unaligned_mode)¶ Loads the memory arrays pointed to by
real_src
andimag_src
into the batchdst
.real_src
andimag_src
are 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 store_simd(T1 *dst, const simd_type<T2> &src, aligned_mode)¶ Stores the batch
src
into the memory array pointed to bydst
.dst
is required to be aligned.- Parameters
dst
: the pointer to the memory array.src
: the batch to store.
-
template<class T1, class T2 = T1>
void store_simd(T1 *dst, const simd_bool_type<T2> &src, aligned_mode)¶ Stores the boolean batch
src
into the memory array pointed to bydst
.dst
is 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 store_simd(T1 *dst, const simd_type<T2> &src, unaligned_mode)¶ Stores the batch
src
into the memory array pointed to bydst
.dst
is 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 store_simd(T1 *dst, const simd_bool_type<T2> &src, unaligned_mode)¶ Stores the boolean batch
src
into the memory array pointed to bydst
.dst
is 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 store_simd(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src, aligned_mode)¶ Stores the batch of complex numbers
src
into the memory arrays pointed to byreal_dst
andimag_dst
.real_dst
andimag_dst
are 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 store_simd(T1 *real_dst, T1 *imag_dst, const simd_type<T2> &src, unaligned_mode)¶ Stores the batch of complex numbers
src
into the memory arrays pointed to byreal_dst
andimag_dst
.real_dst
andimag_dst
are 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.