Ignore:
Timestamp:
Jun 7, 2018, 11:59:41 AM (11 months ago)
Author:
xwa163
Message:

fix some warning in lz4 related kernels

File:
1 edited

Legend:

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

    r6055 r6066  
    5656        std::vector<PHINode*> bufferPhiArray(mNumberOfStream, NULL);
    5757        std::vector<Value*> bufferArray(mNumberOfStream, NULL);
    58         for (int iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
     58        for (unsigned iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
    5959            PHINode * const bufferPhi = b->CreatePHI(b->getIntNTy(pdepWidth), 2);
    6060            bufferPhi->addIncoming(Constant::getNullValue(b->getIntNTy(pdepWidth)), entry);
     
    101101
    102102            std::vector<PHINode * > updatedBufferArray(mNumberOfStream, NULL);
    103             for (int iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
     103            for (unsigned iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
    104104                Value* buffer = bufferArray[iStreamIndex];
    105105                PHINode * const updatedBuffer = b->CreatePHI(buffer->getType(), 2);
     
    114114            Value * const swizzleOffset = b->CreateURem(updatedSourceOffset, PDEP_WIDTH);
    115115
    116             for (int iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
     116            for (unsigned iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
    117117                Value * const swizzleBlock = b->CreateBlockAlignedLoad(b->getInputStreamBlockPtr("source", b->getSize(iStreamIndex), blockOffset));
    118118
     
    147147            // Apply PDEP to each element of the combined swizzle using the current PDEP mask
    148148            Value * const mask = b->CreateExtractElement(selectors, i);
    149             for (int iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
     149            for (unsigned iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
    150150                Value * source_field = bufferArray[iStreamIndex];
    151151
     
    161161        }
    162162
    163         for (int iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
     163        for (unsigned iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
    164164            // Store the result
    165165            Value * const outputStreamPtr = b->getOutputStreamBlockPtr("output", b->getSize(iStreamIndex), strideIndex);
     
    170170        sourceOffsetPhi->addIncoming(sourceOffset, finishedBlock);
    171171        bufferSizePhi->addIncoming(bufferSize, finishedBlock);
    172         for (int iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
     172        for (unsigned iStreamIndex = 0; iStreamIndex < mNumberOfStream; iStreamIndex++) {
    173173            bufferPhiArray[iStreamIndex]->addIncoming(bufferArray[iStreamIndex], finishedBlock);
    174174        }
Note: See TracChangeset for help on using the changeset viewer.