Changeset 6003


Ignore:
Timestamp:
Apr 29, 2018, 7:14:55 PM (3 weeks ago)
Author:
cameron
Message:

Non-aligned input for s2p

File:
1 edited

Legend:

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

    r6002 r6003  
    131131    Value * bytepack[8];
    132132    for (unsigned i = 0; i < 8; i++) {
    133         bytepack[i] = kb->loadInputStreamPack("byteStream", ZERO, kb->getInt32(i), blockOffsetPhi);
     133        if (mAligned) {
     134            bytepack[i] = kb->loadInputStreamPack("byteStream", ZERO, kb->getInt32(i), blockOffsetPhi);
     135        } else {
     136            Value * ptr = kb->getInputStreamPackPtr("byteStream", ZERO, kb->getInt32(i), blockOffsetPhi);
     137            // CreateLoad defaults to aligned here, so we need to force the alignment to 1 byte.
     138            bytepack[i] = kb->CreateAlignedLoad(ptr, 1);
     139        }
    134140    }
    135141    Value * basisbits[8];
Note: See TracChangeset for help on using the changeset viewer.