Ignore:
Timestamp:
Dec 5, 2016, 1:08:23 PM (3 years ago)
Author:
cameron
Message:

Automate instance creation

Location:
icGREP/icgrep-devel/icgrep/editd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/editd/editd.cpp

    r5217 r5220  
    245245    MatchResults.allocateBuffer();
    246246   
    247     Value * editdInstance = editdk.createInstance({});
    248     Value * scanMatchInstance = editdScanK.createInstance({});
    249    
    250     generatePipelineLoop(iBuilder, {&editdk, &editdScanK}, {editdInstance, scanMatchInstance}, fileSize);
     247    generatePipelineLoop(iBuilder, {&editdk, &editdScanK}, fileSize);
    251248       
    252249    iBuilder->CreateRetVoid();
     
    319316    CCResults.setStreamSetBuffer(outputStream, fileSize);
    320317   
    321     Value * s2pInstance = s2pk.createInstance({});
    322     Value * cccInstance = ccck.createInstance({});
    323    
    324     generatePipelineLoop(iBuilder, {&s2pk, &ccck}, {s2pInstance, cccInstance}, fileSize);
     318    generatePipelineLoop(iBuilder, {&s2pk, &ccck}, fileSize);
    325319       
    326320    iBuilder->CreateRetVoid();
     
    491485    iBuilder->CreateStore(Constant::getNullValue(strideCarryTy), strideCarry);
    492486
    493     Value * editdInstance = editdk.createInstance({pattStream, strideCarry});
     487    editdk.setInitialArguments({pattStream, strideCarry});
    494488   
    495     generatePipelineLoop(iBuilder, {&editdk}, {editdInstance}, inputSize);
     489    generatePipelineLoop(iBuilder, {&editdk}, inputSize);
    496490       
    497491    iBuilder->CreateRetVoid();
     
    607601
    608602    MatchResults.setStreamSetBuffer(inputStream, fileSize);
    609     Value * scanMatchInstance = editdScanK.createInstance({});
    610603   
    611     generatePipelineLoop(iBuilder, {&editdScanK}, {scanMatchInstance}, fileSize);
     604    generatePipelineLoop(iBuilder, {&editdScanK}, fileSize);
    612605       
    613606    iBuilder->CreateRetVoid();
  • icGREP/icgrep-devel/icgrep/editd/editdscan_kernel.cpp

    r5202 r5220  
    3838
    3939    std::vector<Value * > matchWordVectors;
    40     for(int d = 0; d <= mEditDistance; d++){
     40    for(unsigned d = 0; d <= mEditDistance; d++){
    4141        Value * matches = iBuilder->CreateBlockAlignedLoad(matchResultsPtr, {iBuilder->getInt32(0), iBuilder->getInt32(d)});
    4242        matchWordVectors.push_back(iBuilder->CreateBitCast(matches, scanwordVectorType));
     
    4444   
    4545    for(unsigned i = 0; i < fieldCount; ++i){       
    46         for(int d = 0; d <= mEditDistance; d++){
     46        for(unsigned d = 0; d <= mEditDistance; d++){
    4747            Value * matchWord = iBuilder->CreateExtractElement(matchWordVectors[d], ConstantInt::get(T, i));
    4848            iBuilder->CreateCall(scanWordFunction, {matchWord, iBuilder->getInt32(d), scanwordPos});
Note: See TracChangeset for help on using the changeset viewer.