Ignore:
Timestamp:
Apr 29, 2016, 4:05:57 PM (3 years ago)
Author:
lindanl
Message:

Passing file index instead of file name as internal state.

File:
1 edited

Legend:

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

    r5014 r5017  
    6262    Type * const inputType = PointerType::get(ArrayType::get(StructType::get(mMod->getContext(), std::vector<Type *>({ArrayType::get(mBitBlockType, 8)})), 1), 0);
    6363
    64     Function * const main = cast<Function>(mMod->getOrInsertFunction("Main", Type::getVoidTy(mMod->getContext()), inputType, int64ty, int8PtrTy, iBuilder->getInt1Ty(), nullptr));
     64    Function * const main = cast<Function>(mMod->getOrInsertFunction("Main", Type::getVoidTy(mMod->getContext()), inputType, int64ty, int64ty, iBuilder->getInt1Ty(), nullptr));
    6565    main->setCallingConv(CallingConv::C);
    6666    Function::arg_iterator args = main->arg_begin();
     
    7070    Value * const bufferSize = &*(args++);
    7171    bufferSize->setName("bufferSize");
    72     Value * const fileName = &*(args++);
    73     fileName->setName("fileName");
     72    Value * const fileIdx = &*(args++);
     73    fileIdx->setName("fileIdx");
    7474    Value * const finalLineUnterminated = &*(args++);
    7575    finalLineUnterminated->setName("finalLineUnterminated");
     
    101101    scanMatchInstance->setInternalState("FileBuf", iBuilder->CreateBitCast(inputStream, int8PtrTy));
    102102    scanMatchInstance->setInternalState("FileSize", bufferSize);
    103     scanMatchInstance->setInternalState("FileName", fileName);
     103    scanMatchInstance->setInternalState("FileIdx", fileIdx);
    104104
    105105    Value * initialBufferSize = nullptr;
Note: See TracChangeset for help on using the changeset viewer.