Ignore:
Timestamp:
Jun 23, 2016, 8:26:09 PM (3 years ago)
Author:
cameron
Message:

Update u8u16 to use new kernel infrastructure

File:
1 edited

Legend:

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

    r5002 r5071  
    66#define DELETION_H
    77
     8#include "streamset.h"
     9#include "interface.h"
     10#include "kernel.h"
    811
    912
     
    3033llvm::Value * apply_parallel_prefix_deletion(IDISA::IDISA_Builder * iBuilder, unsigned fw, llvm::Value * del_mask, std::vector<llvm::Value *> mv, llvm::Value * strm);
    3134
    32 namespace kernel {
    33  
    34     class KernelBuilder;
     35using namespace kernel;
    3536
    36     void generateDeletionKernel(llvm::Module * m, IDISA::IDISA_Builder * iBuilder, unsigned fw, unsigned stream_count, KernelBuilder * kBuilder);
    37 
    38 }
     37class deletionKernel : public kernel::KernelBuilder {
     38public:
     39    deletionKernel(IDISA::IDISA_Builder * iBuilder, unsigned fw, unsigned stream_count) :
     40    KernelBuilder(iBuilder, "del",
     41                  {StreamSetBinding{StreamSetType(stream_count + 2, 1), "inputStreamSet"}},
     42                  {StreamSetBinding{StreamSetType(stream_count, 1), "outputStreamSet"}, StreamSetBinding{StreamSetType(1, 1), "deletionCounts"}},
     43                  {}, {}, {}),
     44    mDeletionFieldWidth(fw),
     45    mStreamCount(stream_count) {}
     46   
     47    void generateKernel() override;
     48private:
     49    unsigned mDeletionFieldWidth;
     50    unsigned mStreamCount;
     51};
     52   
    3953#endif
    4054
Note: See TracChangeset for help on using the changeset viewer.