Ignore:
Timestamp:
Apr 24, 2017, 2:58:47 PM (2 years ago)
Author:
cameron
Message:

lz4d - LZ4 decompressor - initial check-in

File:
1 edited

Legend:

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

    r5391 r5422  
    124124    Value * bytepack[8];
    125125    for (unsigned i = 0; i < 8; i++) {
    126         bytepack[i] = loadInputStreamPack("byteStream", iBuilder->getInt32(0), iBuilder->getInt32(i));
     126        if (mAligned) {
     127            bytepack[i] = loadInputStreamPack("byteStream", iBuilder->getInt32(0), iBuilder->getInt32(i));
     128        } else {
     129            Value * ptr = getInputStreamPackPtr("byteStream", iBuilder->getInt32(0), iBuilder->getInt32(i));
     130            // CreateLoad defaults to aligned here, so we need to force the alignment to 1 byte.
     131            bytepack[i] = iBuilder->CreateAlignedLoad(ptr, 1);
     132        }
    127133    }
    128134    Value * basisbits[8];
     
    161167}
    162168
    163 S2PKernel::S2PKernel(IDISA::IDISA_Builder * builder)
    164 : BlockOrientedKernel(builder, "Parabix:s2p",
    165     {Binding{builder->getStreamSetTy(1, 8), "byteStream"}}, {Binding{builder->getStreamSetTy(8, 1), "basisBits"}}, {}, {}, {}) {
     169S2PKernel::S2PKernel(IDISA::IDISA_Builder * builder, bool aligned)
     170: BlockOrientedKernel(builder, aligned ? "Parabix:s2p" : "Parabix:s2p_unaligned",
     171    {Binding{builder->getStreamSetTy(1, 8), "byteStream"}}, {Binding{builder->getStreamSetTy(8, 1), "basisBits"}}, {}, {}, {}),
     172  mAligned(aligned) {
    166173    setNoTerminateAttribute(true);
    167174}
Note: See TracChangeset for help on using the changeset viewer.