Ignore:
Timestamp:
Apr 24, 2018, 2:57:34 PM (18 months ago)
Author:
nmedfort
Message:

Restructured MultiBlock? kernel. Removal of Swizzled buffers. Inclusion of PopCount? rates / non-linear access. Modifications to several kernels to better align them with the kernel and pipeline changes.

File:
1 edited

Legend:

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

    r5540 r5985  
    2929class SwizzledDeleteByPEXTkernel final : public BlockOrientedKernel {
    3030public:
    31     SwizzledDeleteByPEXTkernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount, unsigned PEXT_width = 64);
     31    SwizzledDeleteByPEXTkernel(const std::unique_ptr<kernel::KernelBuilder> & b, unsigned streamCount, unsigned PEXT_width = 64);
    3232    bool isCachable() const override { return true; }
    3333    bool hasSignature() const override { return false; }
    3434protected:
    35     void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
    36     void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * remainingBytes) override;
    37     std::vector<llvm::Value *> get_PEXT_masks(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * del_mask);
    38     void generateProcessingLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks,
    39                                 llvm::Value * delMask);
    40     void generatePEXTAndSwizzleLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks, std::vector<llvm::Value *> counts);
    41     std::vector<llvm::Value *> apply_PEXT_deletion_with_swizzle(const std::unique_ptr<KernelBuilder> & iBuilder,
    42                                                                 const std::vector<llvm::Value *> & masks, std::vector<llvm::Value *> strms);
    43     llvm::Value * apply_PEXT_deletion(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks,
    44                                       llvm::Value * strm);
     35    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & b) override;
     36    void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & b, llvm::Value * remainingBytes) override;
    4537private:
    46     const unsigned mDelCountFieldWidth;
     38    void generateProcessingLoop(const std::unique_ptr<KernelBuilder> & b, llvm::Value * delMask, const bool flush);
     39    std::vector<std::vector<llvm::Value *>> makeSwizzleSets(const std::unique_ptr<KernelBuilder> & b, llvm::Value * delMask);
     40private:
    4741    const unsigned mStreamCount;
    4842    const unsigned mSwizzleFactor;
    4943    const unsigned mSwizzleSetCount;
    5044    const unsigned mPEXTWidth;
    51     static constexpr const char* mOutputSwizzleNameBase = "outputStreamSet";
    5245};
    5346
     
    6760class DeleteByPEXTkernel final : public BlockOrientedKernel {
    6861public:
    69     DeleteByPEXTkernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount, bool shouldSwizzle);
     62    DeleteByPEXTkernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount, unsigned PEXT_width = 64);
    7063    bool isCachable() const override { return true; }
    7164    bool hasSignature() const override { return false; }
     
    7366    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
    7467    void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * remainingBytes) override;
    75     void generatePEXTAndSwizzleLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks);
    76     void generatePEXTLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks);
    77     void generateProcessingLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks, llvm::Value * delMask);
     68    void generateProcessingLoop(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * delMask);
    7869private:
    7970    const unsigned mDelCountFieldWidth;
    8071    const unsigned mStreamCount;
    8172    const unsigned mSwizzleFactor;
    82     const bool mShouldSwizzle;
    83     static constexpr const char* mOutputSwizzleNameBase = "outputStreamSet";
     73    const unsigned mPEXTWidth;
    8474};
    8575   
Note: See TracChangeset for help on using the changeset viewer.