Skip to content
Snippets Groups Projects
Commit 0f1d06bb authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

formatting.

parent 8850cba7
Branches
Tags
1 merge request!284Space rebuild
......@@ -51,7 +51,8 @@
* @brief Swap the contents of two elements in-place.
*
* Keep in mind that this function works best when the underlying data
* is aligned to the vector length, e.g. with the @c __attribute__((aligned(32)))
* is aligned to the vector length, e.g. with the @c
* __attribute__((aligned(32)))
* syntax, and the code is compiled with @c -funroll-loops.
*
* @param a Pointer to the first element.
......@@ -62,21 +63,21 @@ __attribute__((always_inline)) inline void memswap(void *void_a, void *void_b,
size_t bytes) {
char *a = (char *)void_a, *b = (char *)void_b;
#ifdef __AVX512F__
swap_loop(__m512i, a, b, bytes)
swap_loop(__m512i, a, b, bytes);
#endif
#ifdef __AVX__
swap_loop(__m256i, a, b, bytes)
swap_loop(__m256i, a, b, bytes);
#endif
#ifdef __SSE2__
swap_loop(__m128i, a, b, bytes)
swap_loop(__m128i, a, b, bytes);
#endif
#ifdef __ALTIVEC__
swap_loop(vector int, a, b, bytes)
swap_loop(vector int, a, b, bytes);
#endif
swap_loop(size_t, a, b, bytes)
swap_loop(int, a, b, bytes)
swap_loop(short, a, b, bytes)
swap_loop(char, a, b, bytes)
swap_loop(size_t, a, b, bytes);
swap_loop(int, a, b, bytes);
swap_loop(short, a, b, bytes);
swap_loop(char, a, b, bytes);
}
#endif /* SWIFT_MEMSWAP_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment