Ignore:
Timestamp:
Feb 14, 2017, 12:45:42 PM (2 years ago)
Author:
cameron
Message:

Simplify stream set access; better naming of access functions

File:
1 edited

Legend:

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

    r5310 r5317  
    3535   
    3636    Value * byteOffset = iBuilder->CreateMul(iBuilder->CreateAnd(processed, blockItems), itemBytes);
    37     Value * bytePtr = iBuilder->CreatePointerCast(getInputStream("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
     37    Value * bytePtr = iBuilder->CreatePointerCast(getInputStreamBlockPtr("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
    3838    bytePtr = iBuilder->CreateGEP(bytePtr, byteOffset);
    3939
     
    5252        // Calculate from the updated value of processed;
    5353        byteOffset = iBuilder->CreateMul(iBuilder->CreateAnd(processed, blockItems), itemBytes);
    54         Value * bytePtr = iBuilder->CreatePointerCast(getInputStream("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
     54        Value * bytePtr = iBuilder->CreatePointerCast(getInputStreamBlockPtr("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
    5555        bytePtr = iBuilder->CreateGEP(bytePtr, byteOffset);
    5656
     
    105105   
    106106    Value * byteOffset = iBuilder->CreateMul(iBuilder->CreateURem(processed, blockItems), itemBytes);
    107     Value * bytePtr = iBuilder->CreatePointerCast(getInputStream("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
     107    Value * bytePtr = iBuilder->CreatePointerCast(getInputStreamBlockPtr("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
    108108    bytePtr = iBuilder->CreateGEP(bytePtr, byteOffset);
    109109
     
    123123        // Calculate from the updated value of processed;
    124124        byteOffset = iBuilder->CreateMul(iBuilder->CreateURem(processed, blockItems), itemBytes);
    125         Value * bytePtr = iBuilder->CreatePointerCast(getInputStream("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
     125        Value * bytePtr = iBuilder->CreatePointerCast(getInputStreamBlockPtr("codeUnitBuffer", iBuilder->getInt32(0)), i8PtrTy);
    126126        bytePtr = iBuilder->CreateGEP(bytePtr, byteOffset);
    127127        itemsToDo = iBuilder->CreateSub(producerPos[0], processed);
Note: See TracChangeset for help on using the changeset viewer.