MCPcopy Create free account
hub / github.com/RenderKit/embree / xchg

Function xchg

kernels/common/stack_item.h:22–28  ·  view source on GitHub ↗

! use SSE instructions to swap stack items */

Source from the content-addressed store, hash-verified

20
21 /*! use SSE instructions to swap stack items */
22 __forceinline static void xchg(StackItemT& a, StackItemT& b)
23 {
24 const vfloat4 sse_a = vfloat4::load((float*)&a);
25 const vfloat4 sse_b = vfloat4::load((float*)&b);
26 vfloat4::store(&a,sse_b);
27 vfloat4::store(&b,sse_a);
28 }
29
30 /*! Sort 2 stack items. */
31 __forceinline friend void sort(StackItemT& s1, StackItemT& s2) {

Callers 1

sortFunction · 0.70

Calls 2

storeFunction · 0.85
loadFunction · 0.50

Tested by

no test coverage detected