Changeset 5044 for icGREP


Ignore:
Timestamp:
Jun 9, 2016, 1:43:42 PM (3 years ago)
Author:
cameron
Message:

Stream set declaraations and buffers

Location:
icGREP/icgrep-devel/icgrep/kernels
Files:
1 added
1 edited

Legend:

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

    r4986 r5044  
     1/*
     2 *  Copyright (c) 2016 International Characters.
     3 *  This software is licensed to the public under the Open Software License 3.0.
     4 */
     5
    16#ifndef STREAMSET_H
    27#define STREAMSET_H
    38
     9#include <string>
     10#include <vector>
     11#include <IDISA/idisa_builder.h>
     12#include <llvm/IR/Type.h>
     13   
    414namespace kernel {
    515
     16class StreamSetType {
     17public:
     18    StreamSetType(int count, int width) : mStreamCount(count), mFieldWidth(width) {}
     19    int StreamCount() { return mStreamCount;}
     20    int StreamFieldWidth() { return mFieldWidth;}
     21   
     22    llvm::Type * getStreamSetBlockType(IDISA::IDISA_Builder * iBuilder);
     23   
     24private:
     25    int mStreamCount;
     26    int mFieldWidth;
     27};
    628
     29class StreamSetBuffer {
     30public:
     31    StreamSetBuffer(IDISA::IDISA_Builder * b, StreamSetType ss_type, unsigned SegmentSize) :
     32    iBuilder(b), mStreamSetType(ss_type), mSegmentSize(SegmentSize), mStreamSetBufferPtr(nullptr) {}
    733
     34    llvm::Type * getStreamSetBlockType();
     35   
     36    llvm::Type * getStreamSetBufferType();
     37   
     38    void setStreamSetBuffer(llvm::Value * ptr) {mStreamSetBufferPtr = ptr;}
     39   
     40    llvm::Value * allocateBuffer();
     41   
     42    llvm::Value * getBlockPointer(llvm::Value * blockNo);
     43private:
     44    IDISA::IDISA_Builder * iBuilder;
     45    StreamSetType mStreamSetType;
     46    unsigned mSegmentSize;
     47    llvm::Value * mStreamSetBufferPtr;
     48   
    849
    9 
     50};
    1051}
    11 
    1252#endif // STREAMSET_H
Note: See TracChangeset for help on using the changeset viewer.