Ignore:
Timestamp:
Apr 23, 2017, 12:44:04 PM (2 years ago)
Author:
nmedfort
Message:

Bug fixes for 32-bit systems

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

Legend:

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

    r5418 r5419  
    117117
    118118    llvm::Value * getScalarField(const std::string & fieldName) const {
    119         return iBuilder->CreateLoad(getScalarFieldPtr(fieldName));
    120     }
    121 
    122     llvm::Value * getScalarField(llvm::Value * index) const {
    123         return iBuilder->CreateLoad(getScalarFieldPtr(index));
    124     }
     119        return iBuilder->CreateLoad(getScalarFieldPtr(fieldName), fieldName);
     120    }
     121
     122//    llvm::Value * getScalarField(llvm::Value * index) const {
     123//        return iBuilder->CreateLoad(getScalarFieldPtr(index));
     124//    }
    125125
    126126    // Set the value of a scalar field for the current instance.
     
    129129    }
    130130
    131     void setScalarField(llvm::Value * index, llvm::Value * value) const {
    132         iBuilder->CreateStore(value, getScalarFieldPtr(index));
    133     }
     131//    void setScalarField(llvm::Value * index, llvm::Value * value) const {
     132//        iBuilder->CreateStore(value, getScalarFieldPtr(index));
     133//    }
    134134
    135135    // Synchronization actions for executing a kernel for a particular logical segment.
  • icGREP/icgrep-devel/icgrep/kernels/mmap_kernel.cpp

    r5418 r5419  
    2323    setScalarField("readableBuffer", buffer);
    2424    setScalarField("fileSize", fileSize);
    25     iBuilder->CreateMAdvise(buffer, fileSize, CBuilder::MMAP_WILLNEED);
     25    iBuilder->CreateMAdvise(buffer, fileSize, CBuilder::ADVICE_WILLNEED);
    2626}
    2727
     
    5959
    6060    iBuilder->SetInsertPoint(dropPages);
    61     iBuilder->CreateMAdvise(iBuilder->CreateIntToPtr(readableBuffer, voidPtrTy), unnecessaryBytes, CBuilder::MMAP_DONTNEED);   
     61    iBuilder->CreateMAdvise(iBuilder->CreateIntToPtr(readableBuffer, voidPtrTy), unnecessaryBytes, CBuilder::ADVICE_DONTNEED);   
    6262    readableBuffer = iBuilder->CreateIntToPtr(iBuilder->CreateAdd(readableBuffer, unnecessaryBytes), voidPtrTy);
    6363    setScalarField("readableBuffer", readableBuffer);
     
    8787
    8888void MMapSourceKernel::generateFinalizeMethod() {
    89     Value * buffer = getBaseAddress("sourceBuffer");
    90     Value * fileSize = getBufferedSize("sourceBuffer");
    91     iBuilder->CreateMUnmap(buffer, fileSize);
     89    iBuilder->CreateMUnmap(getBaseAddress("sourceBuffer"), getBufferedSize("sourceBuffer"));
    9290}
    9391
  • icGREP/icgrep-devel/icgrep/kernels/scanmatchgen.cpp

    r5411 r5419  
    201201    {Binding{iBuilder->getStreamSetTy(1, 1), "matchResult"}, Binding{iBuilder->getStreamSetTy(1, 1), "lineBreak"}, Binding{iBuilder->getStreamSetTy(1, 8), "InputStream", UnknownRate()}},
    202202    {},
    203     {Binding{iBuilder->getSizeTy(), "FileIdx"}},
     203    {Binding{iBuilder->getInt32Ty(), "FileIdx"}},
    204204    {},
    205205    {Binding{iBuilder->getSizeTy(), "BlockNo"}, Binding{iBuilder->getSizeTy(), "LineNum"}})
Note: See TracChangeset for help on using the changeset viewer.