Ignore:
Timestamp:
Feb 19, 2016, 2:03:50 PM (3 years ago)
Author:
lindanl
Message:

Minor fixes.

File:
1 edited

Legend:

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

    r4931 r4932  
    1818: mMod(m)
    1919, iBuilder(b)
    20 , mFilePosIdx(2)
     20, mFileBufIdx(7)
     21, mFileSizeIdx(8)
     22, mFileNameIdx(9)
    2123, mBitBlockType(b->getBitBlockType())
    2224, mBlockSize(b->getBitBlockWidth()){
     
    8991    Value * scanMatchKernelStruct = mScanMatchKernel->generateKernelInstance();
    9092
    91     Value * gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(7)});
     93    Value * gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(mFileBufIdx)});
    9294    Value* filebuf = iBuilder->CreateBitCast(input_param, S);
    9395    iBuilder->CreateStore(filebuf, gep);
    94     gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(8)});
     96    gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(mFileSizeIdx)});
    9597    iBuilder->CreateStore(buffersize_param, gep);
    96     gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(9)});
     98    gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(mFileNameIdx)});
    9799    iBuilder->CreateStore(filename_param, gep);
    98100
     
    148150    iBuilder->SetInsertPoint(pipeline_Unterminated_block);
    149151
    150     Value * remaining = iBuilder->CreateBitCast(remaining_phi, iBuilder->getIntNTy(128));
     152    Value * remaining = iBuilder->CreateZExt(remaining_phi, iBuilder->getIntNTy(128));
    151153    Value * EOF_mask = iBuilder->CreateShl(ConstantInt::get(iBuilder->getIntNTy(128), 1), remaining);
    152154    EOF_mask = iBuilder->CreateSub(EOF_mask, ConstantInt::get(iBuilder->getIntNTy(128), 1));
Note: See TracChangeset for help on using the changeset viewer.