Ignore:
Timestamp:
Jul 17, 2016, 11:12:34 AM (3 years ago)
Author:
cameron
Message:

Simplify kernel DoBlock? interface

File:
1 edited

Legend:

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

    r5095 r5096  
    5454    std::vector<Type *> doBlockParameters = {selfType};
    5555    std::vector<Type *> finalBlockParameters = {selfType, iBuilder->getInt64Ty()};
     56    /*
    5657    for (auto inputSet : mStreamSetInputs) {
    5758        Type * inputSetParmType = PointerType::getUnqual(inputSet.ssType.getStreamSetBlockType(iBuilder));
     
    6465        finalBlockParameters.push_back(outputSetParmType);
    6566    }
     67     */
    6668    FunctionType * doBlockFunctionType = FunctionType::get(mDoBlockReturnType, doBlockParameters, false);
    6769    std::string doBlockName = mKernelName + doBlock_suffix;
     
    9395    finalBlockArg->setName("remainingBytes");
    9496
    95     for (auto inputSet : mStreamSetInputs) {
     97/*    for (auto inputSet : mStreamSetInputs) {
    9698        doBlockArg = &*(doBlockArgs++);
    9799        finalBlockArg = &*(finalBlockArgs++);
     
    105107        finalBlockArg->setName(outputSet.ssName);
    106108    }
    107    
     109    */
    108110    // Create the doSegment function prototype.
    109111    std::vector<Type *> doSegmentParameters = {selfType, iBuilder->getInt64Ty()};
     
    169171}
    170172
    171 
    172 
    173 
    174 Value * KernelInterface::createDoBlockCall(Value * self, std::vector<Value *> streamSets) {
     173Value * KernelInterface::createDoBlockCall(Value * self) {
    175174    Module * m = iBuilder->getModule();
    176175    std::string doBlockName = mKernelName + doBlock_suffix;
     
    180179    }
    181180    std::vector<Value *> args = {self};
    182     for (auto ss : streamSets) {
    183         args.push_back(ss);
    184     }
    185181    return iBuilder->CreateCall(doBlockMethod, args);
    186182}
    187183
    188 Value * KernelInterface::createFinalBlockCall(Value * self, Value * remainingBytes, std::vector<Value *> streamSets) {
     184Value * KernelInterface::createFinalBlockCall(Value * self, Value * remainingBytes) {
    189185    Module * m = iBuilder->getModule();
    190186    std::string finalBlockName = mKernelName + finalBlock_suffix;
     
    194190    }
    195191    std::vector<Value *> args = {self, remainingBytes};
    196     for (auto ss : streamSets) {
    197         args.push_back(ss);
    198     }
    199192    return iBuilder->CreateCall(finalBlockMethod, args);
    200193}
     194
    201195
    202196Value * KernelInterface::createDoSegmentCall(Value * self, Value * blksToDo) {
Note: See TracChangeset for help on using the changeset viewer.