Ignore:
Timestamp:
Feb 29, 2016, 3:09:51 PM (3 years ago)
Author:
lindanl
Message:

Use kernel state methods.

File:
1 edited

Legend:

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

    r4940 r4945  
    9191    Value * scanMatchKernelStruct = mScanMatchKernel->generateKernelInstance();
    9292
    93     Value * gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(mFileBufIdx)});
    9493    Value* filebuf = iBuilder->CreateBitCast(input_param, S);
    95     iBuilder->CreateStore(filebuf, gep);
    96     gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(mFileSizeIdx)});
    97     iBuilder->CreateStore(buffersize_param, gep);
    98     gep = iBuilder->CreateGEP(scanMatchKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(mFileNameIdx)});
    99     iBuilder->CreateStore(filename_param, gep);
     94    mScanMatchKernel->changeKernelInternalState(scanMatchKernelStruct, mFileBufIdx, filebuf);
     95    mScanMatchKernel->changeKernelInternalState(scanMatchKernelStruct, mFileSizeIdx, buffersize_param);
     96    mScanMatchKernel->changeKernelInternalState(scanMatchKernelStruct, mFileNameIdx, filename_param);
    10097
    10198    Value * basis_bits = iBuilder->CreateGEP(s2pKernelStruct, {iBuilder->getInt32(0), iBuilder->getInt32(1)});
     
    115112    iBuilder->SetInsertPoint(pipeline_do_block);
    116113
    117     gep = iBuilder->CreateGEP(input_param, {blkNo_phi});
     114    Value * gep = iBuilder->CreateGEP(input_param, {blkNo_phi});
    118115    Value * update_blkNo = iBuilder->CreateAdd(blkNo_phi, iBuilder->getInt64(1));
    119116    blkNo_phi->addIncoming(update_blkNo, pipeline_do_block);
Note: See TracChangeset for help on using the changeset viewer.