Skip to content

Commit

Permalink
reword unrolling hints
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Oct 7, 2021
1 parent bab6632 commit b11c500
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/viewcopy/viewcopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ auto memcpy_avx2(void* dst, const void* src, size_t n) noexcept -> void*
constexpr auto bytesPerIteration = 32 * unrollFactor;
while(n >= bytesPerIteration)
{
# ifndef __INTEL_LLVM_COMPILER
# if defined(__GNUC__) || defined(__clang__) || defined(__INTEL_LLVM_COMPILER)
# pragma GCC unroll unrollFactor
# else
# pragma unroll
# endif
# pragma GCC unroll unrollFactor
for(auto i = 0; i < unrollFactor; i++)
_mm256_stream_si256(
reinterpret_cast<__m256i*>(d) + i,
Expand Down

0 comments on commit b11c500

Please sign in to comment.