Ignore:
Timestamp:
Jun 24, 2018, 1:24:36 AM (10 months ago)
Author:
xwa163
Message:
  1. Cleanup LZ4 AIO related kernels
  2. Improve LZ4ParallelByteStreamAIOKernel
  3. Implement simd_cttz
File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r6110 r6111  
    427427    } else {
    428428        return CreatePopcount(fwCast(fw, a));
     429    }
     430}
     431
     432Value * IDISA_Builder::simd_cttz(unsigned fw, Value * a) {
     433    if (fw == 1) {
     434        return simd_not(a);
     435    } else {
     436        Value* v = simd_sub(fw, a, simd_fill(fw, getIntN(fw, 1)));
     437        v = simd_or(v, a);
     438        v = simd_xor(v, a);
     439        v = simd_popcount(fw, v);
     440        return v;
    429441    }
    430442}
Note: See TracChangeset for help on using the changeset viewer.