mitsuba-af602c6fd98a/src/libcore/random.cpp
/**
 * This function simulates SIMD 128-bit left shift by the standard C.
 * The 128-bit integer given in in is shifted by (shift * 8) bits.
 * This function simulates the LITTLE ENDIAN SIMD.
 * \param out the output of this function
 * \param in the 128-bit data to be shifted
 * \param shift the shift value
 */
This function simulates SIMD 128-bit left shift by the standard C.
The 128-bit integer given in in is shifted by (shift * 8) bits.
This function simulates the LITTLE ENDIAN SIMD.
\param out the output of this function
\param in the 128-bit data to be shifted
\param shift the shift value
This function simulates SIMD 128 - bit left shift by the standard C . The 128 - bit integer given in in is shifted by ( shift * 8 ) bits . This function simulates the LITTLE ENDIAN SIMD . \ param out the output of this function \ param in the 128 - bit data to be shifted \ param shift the shift value
inline static void lshift128(w128_t &out, const w128_t &in, const int shift) {
	uint64_t oh, ol;
	const uint64_t &th = in.u64[1];
	const uint64_t &tl = in.u64[0];
	oh = th << (shift * 8);
	ol = tl << (shift * 8);
	oh |= tl >> (64 - shift * 8);
	out.u64[0] = ol;
	out.u64[1] = oh;
}
inline static void lshift128 ( w128_t & out , const w128_t & in , const int shift ) { uint64_t oh , ol ; const uint64_t & th = in . u64 [ 1 ] ; const uint64_t & tl = in . u64 [ 0 ] ; oh = th << ( shift * 8 ) ; ol = tl << ( shift * 8 ) ; oh |= tl >> ( 64 - shift * 8 ) ; out . u64 [ 0 ] = ol ; out . u64 [ 1 ] = oh ; }
This function simulates SIMD 128-bit left shift by the standard C.
 The 128-bit integer given in in is shifted by (shift * 8) bits.
This function simulates SIMD 128 - bit left shift by the standard C . The 128 - bit integer given in in is shifted by ( shift * 8 ) bits .