Ignore:
Timestamp:
Aug 4, 2017, 6:32:41 AM (22 months ago)
Author:
cameron
Message:

Simplification of MultiBlockKernel? builder: stream set pointers are to the block base position

File:
1 edited

Legend:

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

    r5553 r5594  
    938938    }
    939939    for (unsigned i = 0; i < mStreamSetInputs.size(); i++) {
    940         Value * bufPtr = kb->getRawInputPointer(mStreamSetInputs[i].name, kb->getInt32(0), processedItemCount[i]);
    941         bufPtr = kb->CreatePointerCast(bufPtr, mStreamSetInputBuffers[i]->getPointerType());
    942         doMultiBlockArgs.push_back(bufPtr);
     940        //Value * bufPtr = kb->getRawInputPointer(mStreamSetInputs[i].name, kb->getInt32(0), processedItemCount[i]);
     941        //bufPtr = kb->CreatePointerCast(bufPtr, mStreamSetInputBuffers[i]->getPointerType());
     942        doMultiBlockArgs.push_back(inputBlockPtr[i]);
    943943    }
    944944    for (unsigned i = 0; i < mStreamSetOutputs.size(); i++) {
    945         Value * bufPtr = kb->getRawOutputPointer(mStreamSetOutputs[i].name, kb->getInt32(0), producedItemCount[i]);
    946         bufPtr = kb->CreatePointerCast(bufPtr, mStreamSetOutputBuffers[i]->getPointerType());
    947         doMultiBlockArgs.push_back(bufPtr);
     945        //Value * bufPtr = kb->getRawOutputPointer(mStreamSetOutputs[i].name, kb->getInt32(0), producedItemCount[i]);
     946        //bufPtr = kb->CreatePointerCast(bufPtr, mStreamSetOutputBuffers[i]->getPointerType());
     947        doMultiBlockArgs.push_back(outputBlockPtr[i]);
    948948    }
    949949
     
    10741074                kb->SetInsertPoint(copyDone);
    10751075            }
    1076             Value * itemAddress = kb->getRawInputPointer(mStreamSetInputs[i].name, kb->getInt32(0), processedItemCount[i]);
    1077             itemAddress = kb->CreatePtrToInt(itemAddress, intAddrTy);
    1078             Value * baseAddress = inputBlockPtr[i];
    1079             baseAddress = kb->CreatePtrToInt(baseAddress, intAddrTy);
    1080             Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddrTy), kb->CreateSub(itemAddress, baseAddress));
    1081             tempArgs.push_back(kb->CreateIntToPtr(tempAddress, bufPtrType));
     1076            tempArgs.push_back(tempBufPtr);
    10821077        }
    10831078        else {
     
    10951090        outputBasePos[i] = kb->CreateAnd(producedItemCount[i], blockBaseMask);
    10961091        mStreamSetOutputBuffers[i]->createBlockAlignedCopy(kb.get(), tempBufPtr, outputBlockPtr[i], kb->CreateSub(producedItemCount[i], outputBasePos[i]));
    1097         Value * itemAddress = kb->CreatePtrToInt(kb->getRawOutputPointer(mStreamSetOutputs[i].name, kb->getInt32(0), producedItemCount[i]), intAddrTy);
    1098         Value * outputPtr = kb->getOutputStreamBlockPtr(mStreamSetOutputs[i].name, kb->getInt32(0));
    1099         Value * baseAddress = kb->CreatePtrToInt(outputPtr, intAddrTy);
    1100         Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddrTy), kb->CreateSub(itemAddress, baseAddress));
    1101         tempArgs.push_back(kb->CreateIntToPtr(tempAddress, bufPtrType));
     1092        tempArgs.push_back(tempBufPtr);
    11021093    }
    11031094
Note: See TracChangeset for help on using the changeset viewer.