Changeset 5264


Ignore:
Timestamp:
Jan 17, 2017, 12:56:19 PM (8 months ago)
Author:
cameron
Message:

Small fixes

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

Legend:

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

    r5263 r5264  
    1919
    2020ProducerTable createProducerTable(const std::vector<KernelBuilder *> & kernels) {
    21     ProducerTable producerTable;
    22     producerTable.reserve(kernels.size());
    23    
    24     std::vector<std::vector<bool>> userTable;
    25     userTable.reserve(kernels.size());
     21    ProducerTable producerTable(kernels.size());
     22   
     23    std::vector<std::vector<bool>> userTable(kernels.size());
    2624   
    2725    // First prepare a map from streamSet output buffers to their producing kernel and output index.
     
    5351        }
    5452    }
     53    /*
    5554    for (unsigned k = 0; k < kernels.size(); k++) {
    5655        auto outputSets = kernels[k]->getStreamSetOutputBuffers();
     
    6261        }
    6362    }
     63    */
    6464    return producerTable;
    6565}
  • icGREP/icgrep-devel/icgrep/kernels/stdout_kernel.cpp

    r5260 r5264  
    3939    Function::arg_iterator args = doSegmentFunction->arg_begin();
    4040    Value * self = &*(args++);
    41     Value * blocksToDo = &*(args);
     41    Value * doFinal = &*(args++);
     42    Value * producerPos = &*(args++);
    4243    ////iBuilder->CallPrintInt("blocksToDo", blocksToDo);
    4344    Value * streamStructPtr = getStreamSetStructPtr(self, "codeUnitBuffer");
    4445    //iBuilder->CallPrintInt("streamStructPtr", iBuilder->CreatePtrToInt(streamStructPtr, iBuilder->getInt64Ty()));
    4546
    46     LoadInst * producerPos = iBuilder->CreateAtomicLoadAcquire(mStreamSetInputBuffers[0]->getProducerPosPtr(streamStructPtr));
    4747    //iBuilder->CallPrintInt("producerPos", producerPos);
    4848    Value * processed = getProcessedItemCount(self, "codeUnitBuffer");
    49     Value * itemsAvail = iBuilder->CreateSub(producerPos, processed);
    50     Value * itemsMax = iBuilder->CreateMul(blocksToDo, blockItems);
    51     Value * lessThanFullSegment = iBuilder->CreateICmpULT(itemsAvail, itemsMax);
    52     Value * itemsToDo = iBuilder->CreateSelect(lessThanFullSegment, itemsAvail, itemsMax);
     49    Value * itemsToDo = iBuilder->CreateSub(producerPos, processed);
    5350   
    5451    Value * blockNo = getScalarField(self, blockNoScalar);
Note: See TracChangeset for help on using the changeset viewer.