Ignore:
Timestamp:
Jan 17, 2017, 11:40:09 PM (3 years ago)
Author:
cameron
Message:

Fixes

File:
1 edited

Legend:

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

    r5264 r5266  
    134134       
    135135        iBuilder->SetInsertPoint(segmentLoopBody[k]);
     136       
     137        //iBuilder->CallPrintInt(kernels[k]->getName() + " segment #", segNo);
    136138        if (k == last_kernel) {
    137139            segNo->addIncoming(iBuilder->CreateAdd(segNo, ConstantInt::get(size_ty, threadNum)), segmentLoopBody[last_kernel]);
    138140        }
    139        
    140        
    141        
    142        
    143141        std::vector<Value *> doSegmentArgs = {instancePtrs[k], doFinal};
    144142        for (unsigned j = 0; j < kernels[k]->getStreamInputs().size(); j++) {
     
    146144            std::tie(producerKernel, outputIndex) = producerTable[k][j];
    147145            doSegmentArgs.push_back(ProducerPos[producerKernel][outputIndex]);
     146            //iBuilder->CallPrintInt(kernels[k]->getName() + " producerPos[" + std::to_string(j) + "] ", doSegmentArgs.back());
     147
    148148        }
    149149        kernels[k]->createDoSegmentCall(doSegmentArgs);
     
    158158        }
    159159        kernels[k]->releaseLogicalSegmentNo(instancePtrs[k], nextSegNo);
    160         if (k == last_kernel) {
    161             iBuilder->CreateCondBr(doFinal, exitThreadBlock, segmentLoop);
    162         }
    163         else {
    164             iBuilder->CreateBr(segmentWait[k+1]);
    165         }
    166     }
    167    
     160        if (k == last_kernel) break;
     161        iBuilder->CreateBr(segmentWait[k+1]);
     162    }
     163    iBuilder->CreateCondBr(doFinal, exitThreadBlock, segmentLoop);
     164
    168165    iBuilder->SetInsertPoint(exitThreadBlock);
    169166    Value * nullVal = Constant::getNullValue(voidPtrTy);
Note: See TracChangeset for help on using the changeset viewer.