source: trunk/symbol_table/src/transpose.hpp @ 2274

Last change on this file since 2274 was 2274, checked in by ksherdy, 7 years ago

Updated svn:externals.

File size: 1.0 KB
Line 
1#ifndef TRANSPOSE_HPP
2#define TRANSPOSE_HPP
3
4#include <simd-lib/bitblock.hpp>
5#include <simd-lib/s2p.hpp>
6#include "basis_bits.hpp"
7
8static IDISA_ALWAYS_INLINE void s2p_do_block(BytePack U8[], Basis_bits & basis_bits) {
9  s2p(U8[0], U8[1], U8[2], U8[3], U8[4], U8[5], U8[6], U8[7],
10        basis_bits.bit_0, basis_bits.bit_1, basis_bits.bit_2, basis_bits.bit_3, basis_bits.bit_4, basis_bits.bit_5, basis_bits.bit_6, basis_bits.bit_7);
11}
12
13static IDISA_ALWAYS_INLINE void s2p_do_final_block(BytePack U8[], Basis_bits & basis_bits, BitBlock EOF_mask) {
14  s2p_do_block(U8, basis_bits);
15  basis_bits.bit_0 = simd_and(basis_bits.bit_0, EOF_mask);
16  basis_bits.bit_1 = simd_and(basis_bits.bit_1, EOF_mask);
17  basis_bits.bit_2 = simd_and(basis_bits.bit_2, EOF_mask);
18  basis_bits.bit_3 = simd_and(basis_bits.bit_3, EOF_mask);
19  basis_bits.bit_4 = simd_and(basis_bits.bit_4, EOF_mask);
20  basis_bits.bit_5 = simd_and(basis_bits.bit_5, EOF_mask);
21  basis_bits.bit_6 = simd_and(basis_bits.bit_6, EOF_mask);
22  basis_bits.bit_7 = simd_and(basis_bits.bit_7, EOF_mask);
23}
24
25#endif // TRANSPOSE_HPP
Note: See TracBrowser for help on using the repository browser.