MCPcopy Create free account
hub / github.com/numpy/numpy / npyv_rev64_u8

Function npyv_rev64_u8

numpy/core/src/common/simd/vec/reorder.h:151–165  ·  view source on GitHub ↗

Reverse elements of each 64-bit lane

Source from the content-addressed store, hash-verified

149
150// Reverse elements of each 64-bit lane
151NPY_FINLINE npyv_u8 npyv_rev64_u8(npyv_u8 a)
152{
153#if defined(NPY_HAVE_VSX3) && ((defined(__GNUC__) && __GNUC__ > 7) || defined(__IBMC__))
154 return (npyv_u8)vec_revb((npyv_u64)a);
155#elif defined(NPY_HAVE_VSX3) && defined(NPY_HAVE_VSX_ASM)
156 npyv_u8 ret;
157 __asm__ ("xxbrd %x0,%x1" : "=wa" (ret) : "wa" (a));
158 return ret;
159#else
160 const npyv_u8 idx = npyv_set_u8(
161 7, 6, 5, 4, 3, 2, 1, 0,/*64*/15, 14, 13, 12, 11, 10, 9, 8
162 );
163 return vec_perm(a, a, idx);
164#endif
165}
166NPY_FINLINE npyv_s8 npyv_rev64_s8(npyv_s8 a)
167{ return (npyv_s8)npyv_rev64_u8((npyv_u8)a); }
168

Callers 2

npyv_rev64_s8Function · 0.70
pack_innerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected