Ignore:
Timestamp:
Jan 5, 2017, 3:54:40 PM (2 years ago)
Author:
nmedfort
Message:

Code clean up to enforce proper calling order of KernelBuilder? methods

File:
1 edited

Legend:

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

    r5240 r5246  
    2525}
    2626
    27 void editdGPUKernel::generateFinalBlockMethod() {
     27void editdGPUKernel::generateFinalBlockMethod() const {
    2828    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    2929    Module * m = iBuilder->getModule();
     
    4343    /* Adjust the produced item count */
    4444    Value * produced = getProducedItemCount(self);
    45     produced = iBuilder->CreateSub(produced, ConstantInt::get(iBuilder->getSizeTy(), iBuilder->getStride()));
     45    produced = iBuilder->CreateSub(produced, iBuilder->getSize(iBuilder->getStride()));
    4646    setProducedItemCount(self, iBuilder->CreateAdd(produced, remaining));
    4747    iBuilder->CreateRetVoid();
     
    4949}
    5050   
    51 void editdGPUKernel::generateDoBlockMethod() {
     51void editdGPUKernel::generateDoBlockMethod() const {
    5252    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    5353    Module * m = iBuilder->getModule(); 
     
    124124
    125125    Value * produced = getProducedItemCount(kernelStuctParam);
    126     produced = iBuilder->CreateAdd(produced, ConstantInt::get(iBuilder->getSizeTy(), iBuilder->getStride()));
     126    produced = iBuilder->CreateAdd(produced, iBuilder->getSize(iBuilder->getStride()));
    127127    setProducedItemCount(kernelStuctParam, produced);
    128128       
Note: See TracChangeset for help on using the changeset viewer.