Ignore:
Timestamp:
Nov 18, 2016, 1:46:55 PM (2 years ago)
Author:
nmedfort
Message:

Merged PabloFunction? and PabloKernel? classes. Updated projects where necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pe_var.h

    r5202 r5217  
    2323    friend class PabloBlock;
    2424    friend class PabloAST;
    25     friend class PabloFunction;
     25    friend class PabloKernel;
    2626    friend class Statement;
    2727public:
     
    5353        return getOperand(0);
    5454    }
    55     inline Integer * getIndex() const {
    56         return cast<Integer>(getOperand(1));
     55    inline PabloAST * getIndex() const {
     56        return getOperand(1);
    5757    }
    5858protected:
    59     Extract(PabloAST * array, PabloAST * const index, const String * const name)
    60     : Statement(ClassTypeId::Extract, cast<ArrayType>(array->getType())->getArrayElementType(), {array, cast<Integer>(index)}, name) {
     59    Extract(PabloAST * array, PabloAST * const index, const String * const name, Type * type)
     60    : Statement(ClassTypeId::Extract, type, {array, index}, name) {
    6161
    6262    }
    6363};
    64 
    65 //class Extract : public PabloAST {
    66 //    friend class PabloBlock;
    67 //public:
    68 //    static inline bool classof(const PabloAST * e) {
    69 //        return e->getClassTypeId() == ClassTypeId::Extract;
    70 //    }
    71 //    static inline bool classof(const void *) {
    72 //        return false;
    73 //    }
    74 //    virtual ~Extract(){
    75 //    }
    76 //    inline const String * getName() const {
    77 //        if (isa<Parameter>(mArray)) {
    78 //            return cast<Parameter>(mArray)->getName();
    79 //        } else {
    80 //            return cast<Statement>(mArray)->getName();
    81 //        }
    82 //    }
    83 //    inline const PabloAST * getArray() const {
    84 //        return mArray;
    85 //    }
    86 //    inline const Integer * getIndex() const {
    87 //        return mIndex;
    88 //    }
    89 //protected:
    90 //    Extract(PabloAST * array, PabloAST * const index)
    91 //    : PabloAST(ClassTypeId::Extract, array->getType()->getIndexedType())
    92 //    , mArray(array)
    93 //    , mIndex(cast<Integer>(index)) {
    94 //        assert (isa<Parameter>(array) || isa<Statement>(array));
    95 //    }
    96 //private:
    97 //    PabloAST * mArray;
    98 //    Integer * mIndex;
    99 //};
    100 
    101 //class ParameterBinding {
    102 //    using Allocator = SlabAllocator<Parameter *>;
    103 
    104 //public:
    105 
    106 //    void add(Parameter * const param);
    107 
    108 //private:
    109 //    std::vector<Parameter *, Allocator> mParameters;
    110 //};
    111 
    11264
    11365}
Note: See TracChangeset for help on using the changeset viewer.