Ignore:
Timestamp:
Jan 25, 2018, 2:03:09 PM (15 months ago)
Author:
cameron
Message:

CC Compiler refactoring step

File:
1 edited

Legend:

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

    r5793 r5843  
    4646    }
    4747
     48    // Return the number of streams for a static stream set or 0 for an expandable stream set.
     49    unsigned getNumOfStreams () const {
     50        if (mBufferKind == BufferKind::ExpandableBuffer) return 0;
     51        size_t numStreams = 1;
     52        if (mBaseType->isArrayTy()) {
     53            numStreams = mBaseType->getArrayNumElements();
     54        }
     55        return numStreams;
     56    }
     57   
     58    unsigned getStreamFieldWidth () const {
     59        if (mBaseType->isArrayTy()) {
     60            return mBaseType->getArrayElementType()->getScalarSizeInBits();
     61        }
     62        return mBaseType->getScalarSizeInBits();
     63    }
     64   
    4865    unsigned getAddressSpace() const {
    4966        return mAddressSpace;
Note: See TracChangeset for help on using the changeset viewer.