Ignore:
Timestamp:
Mar 6, 2016, 8:30:36 PM (3 years ago)
Author:
cameron
Message:

Alternative transposition strategies with AVX2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/s2p_kernel.cpp

    r4939 r4957  
    77#include <iostream>
    88
     9const int PACK_LANES = 1;
    910
    1011void s2p_step(IDISA::IDISA_Builder * iBuilder, Value * s0, Value * s1, Value * hi_mask, unsigned shift, Value * &p0, Value * &p1) {
    11     Value * t0 = iBuilder->hsimd_packh(16, s0, s1);
    12     Value * t1 = iBuilder->hsimd_packl(16, s0, s1);
     12    Value * t0 = nullptr;
     13    Value * t1 = nullptr;
     14    if ((iBuilder->getBitBlockWidth() == 256) && (PACK_LANES == 2)) {
     15        Value * x0 = iBuilder->esimd_mergel(128, s0, s1);
     16        Value * x1 = iBuilder->esimd_mergeh(128, s0, s1);
     17        t0 = iBuilder->hsimd_packh_in_lanes(PACK_LANES, 16, x0, x1);
     18        t1 = iBuilder->hsimd_packl_in_lanes(PACK_LANES, 16, x0, x1);
     19    }
     20    else {
     21        t0 = iBuilder->hsimd_packh(16, s0, s1);
     22        t1 = iBuilder->hsimd_packl(16, s0, s1);
     23    }
    1324    p0 = iBuilder->simd_if(1, hi_mask, t0, iBuilder->simd_srli(16, t1, shift));
    1425    p1 = iBuilder->simd_if(1, hi_mask, iBuilder->simd_slli(16, t0, shift), t1);
Note: See TracChangeset for help on using the changeset viewer.